From 94f23e75e638450fa095553a5c2dc0ca6f31ca85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ce=CC=81dric=20Luthi?= Date: Wed, 10 Feb 2016 22:33:36 +0100 Subject: [PATCH 01/34] Point badges to the develop branch --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ea1fddfec..48c69a0b1 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ ## About -[![Build Status](https://img.shields.io/travis/0xced/XCDYouTubeKit/master.svg?style=flat)](https://travis-ci.org/0xced/XCDYouTubeKit) -[![Coverage Status](https://img.shields.io/coveralls/0xced/XCDYouTubeKit/master.svg?style=flat)](https://coveralls.io/r/0xced/XCDYouTubeKit?branch=master) +[![Build Status](https://img.shields.io/travis/0xced/XCDYouTubeKit/develop.svg?style=flat)](https://travis-ci.org/0xced/XCDYouTubeKit) +[![Coverage Status](https://img.shields.io/coveralls/0xced/XCDYouTubeKit/develop.svg?style=flat)](https://coveralls.io/r/0xced/XCDYouTubeKit?branch=develop) [![Platform](https://img.shields.io/cocoapods/p/XCDYouTubeKit.svg?style=flat)](http://cocoadocs.org/docsets/XCDYouTubeKit/) [![Pod Version](https://img.shields.io/cocoapods/v/XCDYouTubeKit.svg?style=flat)](https://cocoapods.org/pods/XCDYouTubeKit) [![Carthage Compatibility](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage/) From 29c262382121fefefc86eb32a20ed56fcff49ed1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ce=CC=81dric=20Luthi?= Date: Fri, 15 Apr 2016 18:15:02 +0200 Subject: [PATCH 02/34] Update to the new GoogleAPIClient pod --- XCDYouTubeKit Demo/Podfile | 17 +- XCDYouTubeKit Demo/Podfile.lock | 31 +- .../Pods/GTMSessionFetcher/LICENSE | 202 + .../Pods/GTMSessionFetcher/README.md | 23 + .../Source/GTMGatherInputStream.h | 52 + .../Source/GTMGatherInputStream.m | 185 + .../Source/GTMMIMEDocument.h | 150 + .../Source/GTMMIMEDocument.m | 631 +++ .../Source/GTMReadMonitorInputStream.h | 49 + .../Source/GTMReadMonitorInputStream.m | 187 + .../Source/GTMSessionFetcher.h | 1215 +++++ .../Source/GTMSessionFetcher.m | 4157 +++++++++++++++ .../Source/GTMSessionFetcherLogging.h} | 50 +- .../Source/GTMSessionFetcherLogging.m | 972 ++++ .../Source/GTMSessionFetcherService.h | 183 + .../Source/GTMSessionFetcherService.m | 1303 +++++ .../Source/GTMSessionUploadFetcher.h | 131 + .../Source/GTMSessionUploadFetcher.m | 1773 +++++++ .../Source/Objects/GTLRuntimeCommon.m | 1187 ----- .../YouTube/Generated/GTLQueryYouTube.m | 618 --- .../YouTube/Generated/GTLServiceYouTube.m | 185 - .../Generated/GTLYouTubeContentRating.h | 249 - .../Generated/GTLYouTubeVideoConversionPing.h | 56 - .../Source/Utilities/GTLJSONParser.m | 152 - .../Pods/GoogleAPIClient/LICENSE | 202 + .../Pods/GoogleAPIClient/README.md | 77 + .../Source/GTLDefines.h | 56 +- .../Source/Objects/GTLBatchQuery.h | 17 +- .../Source/Objects/GTLBatchQuery.m | 9 +- .../Source/Objects/GTLBatchResult.h | 0 .../Source/Objects/GTLBatchResult.m | 0 .../Source/Objects/GTLDateTime.h | 3 + .../Source/Objects/GTLDateTime.m | 95 +- .../Source/Objects/GTLErrorObject.h | 2 +- .../Source/Objects/GTLErrorObject.m | 4 +- .../Source/Objects/GTLObject.h | 24 +- .../Source/Objects/GTLObject.m | 80 +- .../Source/Objects/GTLQuery.h | 36 +- .../Source/Objects/GTLQuery.m | 10 +- .../Source/Objects/GTLRuntimeCommon.h | 0 .../Source/Objects/GTLRuntimeCommon.m | 941 ++++ .../Source/Objects/GTLService.h | 119 +- .../Source/Objects/GTLService.m | 620 ++- .../Source/Objects/GTLUploadParameters.h | 13 +- .../Source/Objects/GTLUploadParameters.m | 13 +- .../YouTube/Generated/GTLQueryYouTube.h | 1350 +++-- .../YouTube/Generated/GTLQueryYouTube.m | 910 ++++ .../YouTube/Generated/GTLServiceYouTube.h | 0 .../YouTube/Generated/GTLServiceYouTube.m | 226 + .../Services/YouTube/Generated/GTLYouTube.h | 47 +- .../Generated/GTLYouTubeAccessPolicy.h | 6 +- .../Generated/GTLYouTubeAccessPolicy.m | 8 +- .../YouTube/Generated/GTLYouTubeActivity.h | 12 +- .../YouTube/Generated/GTLYouTubeActivity.m | 11 +- .../GTLYouTubeActivityContentDetails.h | 24 +- .../GTLYouTubeActivityContentDetails.m | 0 ...GTLYouTubeActivityContentDetailsBulletin.h | 4 +- ...GTLYouTubeActivityContentDetailsBulletin.m | 0 ...YouTubeActivityContentDetailsChannelItem.h | 4 +- ...YouTubeActivityContentDetailsChannelItem.m | 0 .../GTLYouTubeActivityContentDetailsComment.h | 4 +- .../GTLYouTubeActivityContentDetailsComment.m | 0 ...GTLYouTubeActivityContentDetailsFavorite.h | 4 +- ...GTLYouTubeActivityContentDetailsFavorite.m | 0 .../GTLYouTubeActivityContentDetailsLike.h | 4 +- .../GTLYouTubeActivityContentDetailsLike.m | 0 ...ouTubeActivityContentDetailsPlaylistItem.h | 8 +- ...ouTubeActivityContentDetailsPlaylistItem.m | 0 ...ouTubeActivityContentDetailsPromotedItem.h | 22 +- ...ouTubeActivityContentDetailsPromotedItem.m | 11 +- ...TubeActivityContentDetailsRecommendation.h | 8 +- ...TubeActivityContentDetailsRecommendation.m | 0 .../GTLYouTubeActivityContentDetailsSocial.h | 12 +- .../GTLYouTubeActivityContentDetailsSocial.m | 0 ...ouTubeActivityContentDetailsSubscription.h | 4 +- ...ouTubeActivityContentDetailsSubscription.m | 0 .../GTLYouTubeActivityContentDetailsUpload.h | 4 +- .../GTLYouTubeActivityContentDetailsUpload.m | 0 .../GTLYouTubeActivityListResponse.h | 20 +- .../GTLYouTubeActivityListResponse.m | 14 +- .../Generated/GTLYouTubeActivitySnippet.h | 18 +- .../Generated/GTLYouTubeActivitySnippet.m | 8 +- .../YouTube/Generated/GTLYouTubeCaption.h | 63 + .../YouTube/Generated/GTLYouTubeCaption.m | 55 + .../Generated/GTLYouTubeCaptionListResponse.h | 65 + .../Generated/GTLYouTubeCaptionListResponse.m | 61 + .../Generated/GTLYouTubeCaptionSnippet.h | 100 + .../Generated/GTLYouTubeCaptionSnippet.m | 42 + .../YouTube/Generated/GTLYouTubeCdnSettings.h | 8 +- .../YouTube/Generated/GTLYouTubeCdnSettings.m | 0 .../YouTube/Generated/GTLYouTubeChannel.h | 30 +- .../YouTube/Generated/GTLYouTubeChannel.m | 11 +- .../Generated/GTLYouTubeChannelAuditDetails.h | 10 +- .../Generated/GTLYouTubeChannelAuditDetails.m | 0 .../GTLYouTubeChannelBannerResource.h | 8 +- .../GTLYouTubeChannelBannerResource.m | 8 +- .../GTLYouTubeChannelBrandingSettings.h | 10 +- .../GTLYouTubeChannelBrandingSettings.m | 8 +- .../GTLYouTubeChannelContentDetails.h | 16 +- .../GTLYouTubeChannelContentDetails.m | 0 .../GTLYouTubeChannelContentOwnerDetails.h | 6 +- .../GTLYouTubeChannelContentOwnerDetails.m | 0 .../GTLYouTubeChannelConversionPing.h | 6 +- .../GTLYouTubeChannelConversionPing.m | 0 .../GTLYouTubeChannelConversionPings.h | 4 +- .../GTLYouTubeChannelConversionPings.m | 8 +- .../Generated/GTLYouTubeChannelListResponse.h | 20 +- .../Generated/GTLYouTubeChannelListResponse.m | 14 +- .../Generated/GTLYouTubeChannelLocalization.h | 8 +- .../Generated/GTLYouTubeChannelLocalization.m | 8 +- .../GTLYouTubeChannelProfileDetails.h | 56 + .../GTLYouTubeChannelProfileDetails.m | 40 + .../Generated/GTLYouTubeChannelSection.h | 90 + .../Generated/GTLYouTubeChannelSection.m | 33 +- .../GTLYouTubeChannelSectionContentDetails.h | 6 +- .../GTLYouTubeChannelSectionContentDetails.m | 11 +- .../GTLYouTubeChannelSectionListResponse.h | 12 +- .../GTLYouTubeChannelSectionListResponse.m | 14 +- .../GTLYouTubeChannelSectionLocalization.h | 49 + .../GTLYouTubeChannelSectionLocalization.m} | 14 +- .../GTLYouTubeChannelSectionSnippet.h | 34 +- .../GTLYouTubeChannelSectionSnippet.m | 8 +- .../GTLYouTubeChannelSectionTargeting.h | 55 + .../GTLYouTubeChannelSectionTargeting.m | 50 + .../Generated/GTLYouTubeChannelSettings.h | 34 +- .../Generated/GTLYouTubeChannelSettings.m | 18 +- .../Generated/GTLYouTubeChannelSnippet.h | 23 +- .../Generated/GTLYouTubeChannelSnippet.m | 14 +- .../Generated/GTLYouTubeChannelStatistics.h | 12 +- .../Generated/GTLYouTubeChannelStatistics.m | 0 .../Generated/GTLYouTubeChannelStatus.h | 8 +- .../Generated/GTLYouTubeChannelStatus.m | 0 .../Generated/GTLYouTubeChannelTopicDetails.h | 4 +- .../Generated/GTLYouTubeChannelTopicDetails.m | 8 +- .../YouTube/Generated/GTLYouTubeComment.h | 62 + .../YouTube/Generated/GTLYouTubeComment.m | 55 + .../Generated/GTLYouTubeCommentListResponse.h | 74 + .../Generated/GTLYouTubeCommentListResponse.m | 64 + .../Generated/GTLYouTubeCommentSnippet.h | 106 + .../Generated/GTLYouTubeCommentSnippet.m | 43 + .../Generated/GTLYouTubeCommentThread.h | 70 + .../Generated/GTLYouTubeCommentThread.m | 56 + .../GTLYouTubeCommentThreadListResponse.h | 74 + .../GTLYouTubeCommentThreadListResponse.m | 64 + .../GTLYouTubeCommentThreadReplies.h | 53 + .../GTLYouTubeCommentThreadReplies.m} | 22 +- .../GTLYouTubeCommentThreadSnippet.h | 71 + .../GTLYouTubeCommentThreadSnippet.m | 43 + .../YouTube/Generated/GTLYouTubeConstants.h | 175 +- .../YouTube/Generated/GTLYouTubeConstants.m | 174 +- .../Generated/GTLYouTubeContentRating.h | 277 + .../Generated/GTLYouTubeContentRating.m | 28 +- .../Generated/GTLYouTubeFanFundingEvent.h | 64 + .../Generated/GTLYouTubeFanFundingEvent.m | 55 + .../GTLYouTubeFanFundingEventListResponse.h | 74 + .../GTLYouTubeFanFundingEventListResponse.m | 64 + .../GTLYouTubeFanFundingEventSnippet.h | 70 + .../GTLYouTubeFanFundingEventSnippet.m | 43 + .../YouTube/Generated/GTLYouTubeGeoPoint.h | 8 +- .../YouTube/Generated/GTLYouTubeGeoPoint.m | 0 .../Generated/GTLYouTubeGuideCategory.h | 10 +- .../Generated/GTLYouTubeGuideCategory.m | 11 +- .../GTLYouTubeGuideCategoryListResponse.h | 20 +- .../GTLYouTubeGuideCategoryListResponse.m | 14 +- .../GTLYouTubeGuideCategorySnippet.h | 6 +- .../GTLYouTubeGuideCategorySnippet.m | 0 .../Generated/GTLYouTubeI18nLanguage.h | 10 +- .../Generated/GTLYouTubeI18nLanguage.m | 11 +- .../GTLYouTubeI18nLanguageListResponse.h | 12 +- .../GTLYouTubeI18nLanguageListResponse.m | 14 +- .../Generated/GTLYouTubeI18nLanguageSnippet.h | 6 +- .../Generated/GTLYouTubeI18nLanguageSnippet.m | 0 .../YouTube/Generated/GTLYouTubeI18nRegion.h | 10 +- .../YouTube/Generated/GTLYouTubeI18nRegion.m | 11 +- .../GTLYouTubeI18nRegionListResponse.h | 12 +- .../GTLYouTubeI18nRegionListResponse.m | 14 +- .../Generated/GTLYouTubeI18nRegionSnippet.h | 6 +- .../Generated/GTLYouTubeI18nRegionSnippet.m | 0 .../Generated/GTLYouTubeImageSettings.h | 46 +- .../Generated/GTLYouTubeImageSettings.m | 0 .../Generated/GTLYouTubeIngestionInfo.h | 8 +- .../Generated/GTLYouTubeIngestionInfo.m | 0 .../Generated/GTLYouTubeInvideoBranding.h | 12 +- .../Generated/GTLYouTubeInvideoBranding.m | 0 .../Generated/GTLYouTubeInvideoPosition.h | 6 +- .../Generated/GTLYouTubeInvideoPosition.m | 0 .../Generated/GTLYouTubeInvideoPromotion.h | 10 +- .../Generated/GTLYouTubeInvideoPromotion.m | 8 +- .../Generated/GTLYouTubeInvideoTiming.h | 8 +- .../Generated/GTLYouTubeInvideoTiming.m | 0 .../YouTube/Generated/GTLYouTubeLanguageTag.h | 4 +- .../YouTube/Generated/GTLYouTubeLanguageTag.m | 0 .../Generated/GTLYouTubeLiveBroadcast.h | 25 +- .../Generated/GTLYouTubeLiveBroadcast.m | 18 +- .../GTLYouTubeLiveBroadcastContentDetails.h | 33 +- .../GTLYouTubeLiveBroadcastContentDetails.m | 9 +- .../GTLYouTubeLiveBroadcastListResponse.h | 20 +- .../GTLYouTubeLiveBroadcastListResponse.m | 14 +- .../GTLYouTubeLiveBroadcastSnippet.h | 27 +- .../GTLYouTubeLiveBroadcastSnippet.m | 13 +- .../GTLYouTubeLiveBroadcastStatistics.h | 63 + .../GTLYouTubeLiveBroadcastStatistics.m | 40 + .../Generated/GTLYouTubeLiveBroadcastStatus.h | 10 +- .../Generated/GTLYouTubeLiveBroadcastStatus.m | 2 +- .../Generated/GTLYouTubeLiveBroadcastTopic.h | 56 + .../Generated/GTLYouTubeLiveBroadcastTopic.m | 42 + .../GTLYouTubeLiveBroadcastTopicDetails.h | 46 + .../GTLYouTubeLiveBroadcastTopicDetails.m | 50 + .../GTLYouTubeLiveBroadcastTopicSnippet.h | 50 + .../GTLYouTubeLiveBroadcastTopicSnippet.m | 40 + .../YouTube/Generated/GTLYouTubeLiveChatBan.h | 62 + .../YouTube/Generated/GTLYouTubeLiveChatBan.m | 55 + .../Generated/GTLYouTubeLiveChatBanSnippet.h | 57 + .../Generated/GTLYouTubeLiveChatBanSnippet.m | 42 + ...GTLYouTubeLiveChatFanFundingEventDetails.h | 56 + ...GTLYouTubeLiveChatFanFundingEventDetails.m | 40 + .../Generated/GTLYouTubeLiveChatMessage.h} | 37 +- .../Generated/GTLYouTubeLiveChatMessage.m | 56 + .../GTLYouTubeLiveChatMessageAuthorDetails.h | 68 + .../GTLYouTubeLiveChatMessageAuthorDetails.m | 41 + .../GTLYouTubeLiveChatMessageListResponse.h | 82 + .../GTLYouTubeLiveChatMessageListResponse.m | 64 + .../GTLYouTubeLiveChatMessageSnippet.h | 79 + .../GTLYouTubeLiveChatMessageSnippet.m | 44 + .../Generated/GTLYouTubeLiveChatModerator.h | 64 + .../Generated/GTLYouTubeLiveChatModerator.m | 55 + .../GTLYouTubeLiveChatModeratorListResponse.h | 79 + .../GTLYouTubeLiveChatModeratorListResponse.m | 64 + .../GTLYouTubeLiveChatModeratorSnippet.h | 52 + .../GTLYouTubeLiveChatModeratorSnippet.m | 42 + .../GTLYouTubeLiveChatTextMessageDetails.h | 47 + .../GTLYouTubeLiveChatTextMessageDetails.m | 40 + .../YouTube/Generated/GTLYouTubeLiveStream.h | 16 +- .../YouTube/Generated/GTLYouTubeLiveStream.m | 11 +- .../GTLYouTubeLiveStreamConfigurationIssue.h | 57 + .../GTLYouTubeLiveStreamConfigurationIssue.m | 48 + .../GTLYouTubeLiveStreamContentDetails.h | 6 +- .../GTLYouTubeLiveStreamContentDetails.m | 0 .../GTLYouTubeLiveStreamHealthStatus.h | 55 + .../GTLYouTubeLiveStreamHealthStatus.m | 50 + .../GTLYouTubeLiveStreamListResponse.h | 20 +- .../GTLYouTubeLiveStreamListResponse.m | 14 +- .../Generated/GTLYouTubeLiveStreamSnippet.h | 14 +- .../Generated/GTLYouTubeLiveStreamSnippet.m | 12 +- .../Generated/GTLYouTubeLiveStreamStatus.h | 12 +- .../Generated/GTLYouTubeLiveStreamStatus.m | 8 +- .../Generated/GTLYouTubeLocalizedProperty.h | 8 +- .../Generated/GTLYouTubeLocalizedProperty.m | 14 +- .../Generated/GTLYouTubeLocalizedString.h | 6 +- .../Generated/GTLYouTubeLocalizedString.m | 0 .../Generated/GTLYouTubeMonitorStreamInfo.h | 8 +- .../Generated/GTLYouTubeMonitorStreamInfo.m | 0 .../YouTube/Generated/GTLYouTubePageInfo.h | 6 +- .../YouTube/Generated/GTLYouTubePageInfo.m | 0 .../YouTube/Generated/GTLYouTubePlaylist.h | 37 +- .../YouTube/Generated/GTLYouTubePlaylist.m | 32 +- .../GTLYouTubePlaylistContentDetails.h | 4 +- .../GTLYouTubePlaylistContentDetails.m | 0 .../Generated/GTLYouTubePlaylistItem.h | 14 +- .../Generated/GTLYouTubePlaylistItem.m | 11 +- .../GTLYouTubePlaylistItemContentDetails.h | 10 +- .../GTLYouTubePlaylistItemContentDetails.m | 0 .../GTLYouTubePlaylistItemListResponse.h | 20 +- .../GTLYouTubePlaylistItemListResponse.m | 14 +- .../Generated/GTLYouTubePlaylistItemSnippet.h | 20 +- .../Generated/GTLYouTubePlaylistItemSnippet.m | 8 +- .../Generated/GTLYouTubePlaylistItemStatus.h | 4 +- .../Generated/GTLYouTubePlaylistItemStatus.m | 0 .../GTLYouTubePlaylistListResponse.h | 20 +- .../GTLYouTubePlaylistListResponse.m | 14 +- .../GTLYouTubePlaylistLocalization.h} | 24 +- .../GTLYouTubePlaylistLocalization.m | 48 + .../Generated/GTLYouTubePlaylistPlayer.h | 4 +- .../Generated/GTLYouTubePlaylistPlayer.m | 0 .../Generated/GTLYouTubePlaylistSnippet.h | 25 +- .../Generated/GTLYouTubePlaylistSnippet.m | 21 +- .../Generated/GTLYouTubePlaylistStatus.h | 4 +- .../Generated/GTLYouTubePlaylistStatus.m | 0 .../Generated/GTLYouTubePromotedItem.h | 10 +- .../Generated/GTLYouTubePromotedItem.m | 8 +- .../Generated/GTLYouTubePromotedItemId.h | 10 +- .../Generated/GTLYouTubePromotedItemId.m | 0 .../Generated/GTLYouTubePropertyValue.h | 6 +- .../Generated/GTLYouTubePropertyValue.m | 0 .../YouTube/Generated/GTLYouTubeResourceId.h | 10 +- .../YouTube/Generated/GTLYouTubeResourceId.m | 0 .../Generated/GTLYouTubeSearchListResponse.h | 23 +- .../Generated/GTLYouTubeSearchListResponse.m | 18 +- .../Generated/GTLYouTubeSearchResult.h | 10 +- .../Generated/GTLYouTubeSearchResult.m | 11 +- .../Generated/GTLYouTubeSearchResultSnippet.h | 16 +- .../Generated/GTLYouTubeSearchResultSnippet.m | 8 +- .../YouTube/Generated/GTLYouTubeSponsor.h | 64 + .../YouTube/Generated/GTLYouTubeSponsor.m | 55 + .../Generated/GTLYouTubeSponsorListResponse.h | 74 + .../Generated/GTLYouTubeSponsorListResponse.m | 64 + .../Generated/GTLYouTubeSponsorSnippet.h | 56 + .../Generated/GTLYouTubeSponsorSnippet.m | 42 + .../Generated/GTLYouTubeSubscription.h | 14 +- .../Generated/GTLYouTubeSubscription.m | 11 +- .../GTLYouTubeSubscriptionContentDetails.h | 8 +- .../GTLYouTubeSubscriptionContentDetails.m | 0 .../GTLYouTubeSubscriptionListResponse.h | 20 +- .../GTLYouTubeSubscriptionListResponse.m | 14 +- .../Generated/GTLYouTubeSubscriptionSnippet.h | 16 +- .../Generated/GTLYouTubeSubscriptionSnippet.m | 8 +- .../GTLYouTubeSubscriptionSubscriberSnippet.h | 10 +- .../GTLYouTubeSubscriptionSubscriberSnippet.m | 8 +- .../YouTube/Generated/GTLYouTubeThumbnail.h | 8 +- .../YouTube/Generated/GTLYouTubeThumbnail.m | 0 .../Generated/GTLYouTubeThumbnailDetails.h | 12 +- .../Generated/GTLYouTubeThumbnailDetails.m | 8 +- .../GTLYouTubeThumbnailSetResponse.h | 12 +- .../GTLYouTubeThumbnailSetResponse.m | 14 +- .../Generated/GTLYouTubeTokenPagination.h | 0 .../Generated/GTLYouTubeTokenPagination.m | 0 .../YouTube/Generated/GTLYouTubeVideo.h | 63 +- .../YouTube/Generated/GTLYouTubeVideo.m | 32 +- .../Generated/GTLYouTubeVideoAbuseReport.h | 62 + .../Generated/GTLYouTubeVideoAbuseReport.m | 40 + .../GTLYouTubeVideoAbuseReportReason.h | 64 + .../GTLYouTubeVideoAbuseReportReason.m | 55 + ...ouTubeVideoAbuseReportReasonListResponse.h | 65 + ...ouTubeVideoAbuseReportReasonListResponse.m | 61 + .../GTLYouTubeVideoAbuseReportReasonSnippet.h | 55 + .../GTLYouTubeVideoAbuseReportReasonSnippet.m | 50 + ...TLYouTubeVideoAbuseReportSecondaryReason.h | 51 + ...TLYouTubeVideoAbuseReportSecondaryReason.m | 48 + .../Generated/GTLYouTubeVideoAgeGating.h | 8 +- .../Generated/GTLYouTubeVideoAgeGating.m | 0 .../Generated/GTLYouTubeVideoCategory.h | 10 +- .../Generated/GTLYouTubeVideoCategory.m | 11 +- .../GTLYouTubeVideoCategoryListResponse.h | 20 +- .../GTLYouTubeVideoCategoryListResponse.m | 14 +- .../GTLYouTubeVideoCategorySnippet.h | 8 +- .../GTLYouTubeVideoCategorySnippet.m | 0 .../Generated/GTLYouTubeVideoContentDetails.h | 18 +- .../Generated/GTLYouTubeVideoContentDetails.m | 0 ...TubeVideoContentDetailsRegionRestriction.h | 6 +- ...TubeVideoContentDetailsRegionRestriction.m | 11 +- .../Generated/GTLYouTubeVideoFileDetails.h | 22 +- .../Generated/GTLYouTubeVideoFileDetails.m | 11 +- .../GTLYouTubeVideoFileDetailsAudioStream.h | 10 +- .../GTLYouTubeVideoFileDetailsAudioStream.m | 0 .../GTLYouTubeVideoFileDetailsVideoStream.h | 18 +- .../GTLYouTubeVideoFileDetailsVideoStream.m | 0 .../GTLYouTubeVideoGetRatingResponse.h | 12 +- .../GTLYouTubeVideoGetRatingResponse.m | 14 +- .../Generated/GTLYouTubeVideoListResponse.h | 20 +- .../Generated/GTLYouTubeVideoListResponse.m | 14 +- .../GTLYouTubeVideoLiveStreamingDetails.h | 22 +- .../GTLYouTubeVideoLiveStreamingDetails.m | 8 +- .../Generated/GTLYouTubeVideoLocalization.h | 53 + .../Generated/GTLYouTubeVideoLocalization.m | 48 + .../GTLYouTubeVideoMonetizationDetails.h | 4 +- .../GTLYouTubeVideoMonetizationDetails.m | 0 .../YouTube/Generated/GTLYouTubeVideoPlayer.h | 4 +- .../YouTube/Generated/GTLYouTubeVideoPlayer.m | 0 .../GTLYouTubeVideoProcessingDetails.h | 18 +- .../GTLYouTubeVideoProcessingDetails.m | 0 ...VideoProcessingDetailsProcessingProgress.h | 8 +- ...VideoProcessingDetailsProcessingProgress.m | 0 .../Generated/GTLYouTubeVideoProjectDetails.h | 4 +- .../Generated/GTLYouTubeVideoProjectDetails.m | 8 +- .../YouTube/Generated/GTLYouTubeVideoRating.h | 6 +- .../YouTube/Generated/GTLYouTubeVideoRating.m | 0 .../GTLYouTubeVideoRecordingDetails.h | 8 +- .../GTLYouTubeVideoRecordingDetails.m | 0 .../Generated/GTLYouTubeVideoSnippet.h | 35 +- .../Generated/GTLYouTubeVideoSnippet.m | 22 +- .../Generated/GTLYouTubeVideoStatistics.h | 12 +- .../Generated/GTLYouTubeVideoStatistics.m | 0 .../YouTube/Generated/GTLYouTubeVideoStatus.h | 18 +- .../YouTube/Generated/GTLYouTubeVideoStatus.m | 0 .../Generated/GTLYouTubeVideoSuggestions.h | 12 +- .../Generated/GTLYouTubeVideoSuggestions.m | 17 +- .../GTLYouTubeVideoSuggestionsTagSuggestion.h | 6 +- .../GTLYouTubeVideoSuggestionsTagSuggestion.m | 8 +- .../Generated/GTLYouTubeVideoTopicDetails.h | 6 +- .../Generated/GTLYouTubeVideoTopicDetails.m | 11 +- .../Generated/GTLYouTubeWatchSettings.h | 8 +- .../Generated/GTLYouTubeWatchSettings.m | 0 .../Source/Utilities/GTLBase64.h | 0 .../Source/Utilities/GTLBase64.m | 0 .../Source/Utilities/GTLFramework.h | 0 .../Source/Utilities/GTLFramework.m | 0 .../Source/Utilities/GTLJSONParser.h | 5 +- .../Source/Utilities/GTLJSONParser.m | 81 + .../Source/Utilities/GTLTargetNamespace.h | 0 .../Source/Utilities/GTLUtilities.h | 15 +- .../Source/Utilities/GTLUtilities.m | 84 +- .../GTMSessionFetcher/GTMGatherInputStream.h | 1 + .../GTMSessionFetcher/GTMMIMEDocument.h | 1 + .../GTMReadMonitorInputStream.h | 1 + .../GTMSessionFetcher/GTMSessionFetcher.h | 1 + .../GTMSessionFetcherLogging.h | 1 + .../GTMSessionFetcherService.h | 1 + .../GTMSessionUploadFetcher.h | 1 + .../Private/Google-API-Client/GTLBase64.h | 1 - .../Private/Google-API-Client/GTLBatchQuery.h | 1 - .../Google-API-Client/GTLBatchResult.h | 1 - .../Private/Google-API-Client/GTLDateTime.h | 1 - .../Private/Google-API-Client/GTLDefines.h | 1 - .../Google-API-Client/GTLErrorObject.h | 1 - .../Private/Google-API-Client/GTLFramework.h | 1 - .../Private/Google-API-Client/GTLJSONParser.h | 1 - .../Private/Google-API-Client/GTLObject.h | 1 - .../Private/Google-API-Client/GTLQuery.h | 1 - .../Google-API-Client/GTLQueryYouTube.h | 1 - .../Google-API-Client/GTLRuntimeCommon.h | 1 - .../Private/Google-API-Client/GTLService.h | 1 - .../Google-API-Client/GTLServiceYouTube.h | 1 - .../Google-API-Client/GTLTargetNamespace.h | 1 - .../Google-API-Client/GTLUploadParameters.h | 1 - .../Private/Google-API-Client/GTLUtilities.h | 1 - .../Private/Google-API-Client/GTLYouTube.h | 1 - .../GTLYouTubeAccessPolicy.h | 1 - .../Google-API-Client/GTLYouTubeActivity.h | 1 - .../GTLYouTubeActivityContentDetails.h | 1 - ...GTLYouTubeActivityContentDetailsBulletin.h | 1 - ...YouTubeActivityContentDetailsChannelItem.h | 1 - .../GTLYouTubeActivityContentDetailsComment.h | 1 - ...GTLYouTubeActivityContentDetailsFavorite.h | 1 - .../GTLYouTubeActivityContentDetailsLike.h | 1 - ...ouTubeActivityContentDetailsPlaylistItem.h | 1 - ...ouTubeActivityContentDetailsPromotedItem.h | 1 - ...TubeActivityContentDetailsRecommendation.h | 1 - .../GTLYouTubeActivityContentDetailsSocial.h | 1 - ...ouTubeActivityContentDetailsSubscription.h | 1 - .../GTLYouTubeActivityContentDetailsUpload.h | 1 - .../GTLYouTubeActivityListResponse.h | 1 - .../GTLYouTubeActivitySnippet.h | 1 - .../Google-API-Client/GTLYouTubeCdnSettings.h | 1 - .../Google-API-Client/GTLYouTubeChannel.h | 1 - .../GTLYouTubeChannelAuditDetails.h | 1 - .../GTLYouTubeChannelBannerResource.h | 1 - .../GTLYouTubeChannelBrandingSettings.h | 1 - .../GTLYouTubeChannelContentDetails.h | 1 - .../GTLYouTubeChannelContentOwnerDetails.h | 1 - .../GTLYouTubeChannelConversionPing.h | 1 - .../GTLYouTubeChannelConversionPings.h | 1 - .../GTLYouTubeChannelListResponse.h | 1 - .../GTLYouTubeChannelLocalization.h | 1 - .../GTLYouTubeChannelSection.h | 1 - .../GTLYouTubeChannelSectionContentDetails.h | 1 - .../GTLYouTubeChannelSectionListResponse.h | 1 - .../GTLYouTubeChannelSectionSnippet.h | 1 - .../GTLYouTubeChannelSettings.h | 1 - .../GTLYouTubeChannelSnippet.h | 1 - .../GTLYouTubeChannelStatistics.h | 1 - .../GTLYouTubeChannelStatus.h | 1 - .../GTLYouTubeChannelTopicDetails.h | 1 - .../Google-API-Client/GTLYouTubeConstants.h | 1 - .../GTLYouTubeContentRating.h | 1 - .../Google-API-Client/GTLYouTubeGeoPoint.h | 1 - .../GTLYouTubeGuideCategory.h | 1 - .../GTLYouTubeGuideCategoryListResponse.h | 1 - .../GTLYouTubeGuideCategorySnippet.h | 1 - .../GTLYouTubeI18nLanguage.h | 1 - .../GTLYouTubeI18nLanguageListResponse.h | 1 - .../GTLYouTubeI18nLanguageSnippet.h | 1 - .../Google-API-Client/GTLYouTubeI18nRegion.h | 1 - .../GTLYouTubeI18nRegionListResponse.h | 1 - .../GTLYouTubeI18nRegionSnippet.h | 1 - .../GTLYouTubeImageSettings.h | 1 - .../GTLYouTubeIngestionInfo.h | 1 - .../GTLYouTubeInvideoBranding.h | 1 - .../GTLYouTubeInvideoPosition.h | 1 - .../GTLYouTubeInvideoPromotion.h | 1 - .../GTLYouTubeInvideoTiming.h | 1 - .../Google-API-Client/GTLYouTubeLanguageTag.h | 1 - .../GTLYouTubeLiveBroadcast.h | 1 - .../GTLYouTubeLiveBroadcastContentDetails.h | 1 - .../GTLYouTubeLiveBroadcastListResponse.h | 1 - .../GTLYouTubeLiveBroadcastSnippet.h | 1 - .../GTLYouTubeLiveBroadcastStatus.h | 1 - .../Google-API-Client/GTLYouTubeLiveStream.h | 1 - .../GTLYouTubeLiveStreamContentDetails.h | 1 - .../GTLYouTubeLiveStreamListResponse.h | 1 - .../GTLYouTubeLiveStreamSnippet.h | 1 - .../GTLYouTubeLiveStreamStatus.h | 1 - .../GTLYouTubeLocalizedProperty.h | 1 - .../GTLYouTubeLocalizedString.h | 1 - .../GTLYouTubeMonitorStreamInfo.h | 1 - .../Google-API-Client/GTLYouTubePageInfo.h | 1 - .../Google-API-Client/GTLYouTubePlaylist.h | 1 - .../GTLYouTubePlaylistContentDetails.h | 1 - .../GTLYouTubePlaylistItem.h | 1 - .../GTLYouTubePlaylistItemContentDetails.h | 1 - .../GTLYouTubePlaylistItemListResponse.h | 1 - .../GTLYouTubePlaylistItemSnippet.h | 1 - .../GTLYouTubePlaylistItemStatus.h | 1 - .../GTLYouTubePlaylistListResponse.h | 1 - .../GTLYouTubePlaylistPlayer.h | 1 - .../GTLYouTubePlaylistSnippet.h | 1 - .../GTLYouTubePlaylistStatus.h | 1 - .../GTLYouTubePromotedItem.h | 1 - .../GTLYouTubePromotedItemId.h | 1 - .../GTLYouTubePropertyValue.h | 1 - .../Google-API-Client/GTLYouTubeResourceId.h | 1 - .../GTLYouTubeSearchListResponse.h | 1 - .../GTLYouTubeSearchResult.h | 1 - .../GTLYouTubeSearchResultSnippet.h | 1 - .../GTLYouTubeSubscription.h | 1 - .../GTLYouTubeSubscriptionContentDetails.h | 1 - .../GTLYouTubeSubscriptionListResponse.h | 1 - .../GTLYouTubeSubscriptionSnippet.h | 1 - .../GTLYouTubeSubscriptionSubscriberSnippet.h | 1 - .../Google-API-Client/GTLYouTubeThumbnail.h | 1 - .../GTLYouTubeThumbnailDetails.h | 1 - .../GTLYouTubeThumbnailSetResponse.h | 1 - .../GTLYouTubeTokenPagination.h | 1 - .../Google-API-Client/GTLYouTubeVideo.h | 1 - .../GTLYouTubeVideoAgeGating.h | 1 - .../GTLYouTubeVideoCategory.h | 1 - .../GTLYouTubeVideoCategoryListResponse.h | 1 - .../GTLYouTubeVideoCategorySnippet.h | 1 - .../GTLYouTubeVideoContentDetails.h | 1 - ...TubeVideoContentDetailsRegionRestriction.h | 1 - .../GTLYouTubeVideoConversionPing.h | 1 - .../GTLYouTubeVideoConversionPings.h | 1 - .../GTLYouTubeVideoFileDetails.h | 1 - .../GTLYouTubeVideoFileDetailsAudioStream.h | 1 - .../GTLYouTubeVideoFileDetailsVideoStream.h | 1 - .../GTLYouTubeVideoGetRatingResponse.h | 1 - .../GTLYouTubeVideoListResponse.h | 1 - .../GTLYouTubeVideoLiveStreamingDetails.h | 1 - .../GTLYouTubeVideoMonetizationDetails.h | 1 - .../Google-API-Client/GTLYouTubeVideoPlayer.h | 1 - .../GTLYouTubeVideoProcessingDetails.h | 1 - ...VideoProcessingDetailsProcessingProgress.h | 1 - .../GTLYouTubeVideoProjectDetails.h | 1 - .../Google-API-Client/GTLYouTubeVideoRating.h | 1 - .../GTLYouTubeVideoRecordingDetails.h | 1 - .../GTLYouTubeVideoSnippet.h | 1 - .../GTLYouTubeVideoStatistics.h | 1 - .../Google-API-Client/GTLYouTubeVideoStatus.h | 1 - .../GTLYouTubeVideoSuggestions.h | 1 - .../GTLYouTubeVideoSuggestionsTagSuggestion.h | 1 - .../GTLYouTubeVideoTopicDetails.h | 1 - .../GTLYouTubeWatchSettings.h | 1 - .../Private/GoogleAPIClient/GTLBase64.h | 1 + .../Private/GoogleAPIClient/GTLBatchQuery.h | 1 + .../Private/GoogleAPIClient/GTLBatchResult.h | 1 + .../Private/GoogleAPIClient/GTLDateTime.h | 1 + .../Private/GoogleAPIClient/GTLDefines.h | 1 + .../Private/GoogleAPIClient/GTLErrorObject.h | 1 + .../Private/GoogleAPIClient/GTLFramework.h | 1 + .../Private/GoogleAPIClient/GTLJSONParser.h | 1 + .../Private/GoogleAPIClient/GTLObject.h | 1 + .../Private/GoogleAPIClient/GTLQuery.h | 1 + .../Private/GoogleAPIClient/GTLQueryYouTube.h | 1 + .../GoogleAPIClient/GTLRuntimeCommon.h | 1 + .../Private/GoogleAPIClient/GTLService.h | 1 + .../GoogleAPIClient/GTLServiceYouTube.h | 1 + .../GoogleAPIClient/GTLTargetNamespace.h | 1 + .../GoogleAPIClient/GTLUploadParameters.h | 1 + .../Private/GoogleAPIClient/GTLUtilities.h | 1 + .../Private/GoogleAPIClient/GTLYouTube.h | 1 + .../GoogleAPIClient/GTLYouTubeAccessPolicy.h | 1 + .../GoogleAPIClient/GTLYouTubeActivity.h | 1 + .../GTLYouTubeActivityContentDetails.h | 1 + ...GTLYouTubeActivityContentDetailsBulletin.h | 1 + ...YouTubeActivityContentDetailsChannelItem.h | 1 + .../GTLYouTubeActivityContentDetailsComment.h | 1 + ...GTLYouTubeActivityContentDetailsFavorite.h | 1 + .../GTLYouTubeActivityContentDetailsLike.h | 1 + ...ouTubeActivityContentDetailsPlaylistItem.h | 1 + ...ouTubeActivityContentDetailsPromotedItem.h | 1 + ...TubeActivityContentDetailsRecommendation.h | 1 + .../GTLYouTubeActivityContentDetailsSocial.h | 1 + ...ouTubeActivityContentDetailsSubscription.h | 1 + .../GTLYouTubeActivityContentDetailsUpload.h | 1 + .../GTLYouTubeActivityListResponse.h | 1 + .../GTLYouTubeActivitySnippet.h | 1 + .../GoogleAPIClient/GTLYouTubeCaption.h | 1 + .../GTLYouTubeCaptionListResponse.h | 1 + .../GTLYouTubeCaptionSnippet.h | 1 + .../GoogleAPIClient/GTLYouTubeCdnSettings.h | 1 + .../GoogleAPIClient/GTLYouTubeChannel.h | 1 + .../GTLYouTubeChannelAuditDetails.h | 1 + .../GTLYouTubeChannelBannerResource.h | 1 + .../GTLYouTubeChannelBrandingSettings.h | 1 + .../GTLYouTubeChannelContentDetails.h | 1 + .../GTLYouTubeChannelContentOwnerDetails.h | 1 + .../GTLYouTubeChannelConversionPing.h | 1 + .../GTLYouTubeChannelConversionPings.h | 1 + .../GTLYouTubeChannelListResponse.h | 1 + .../GTLYouTubeChannelLocalization.h | 1 + .../GTLYouTubeChannelProfileDetails.h | 1 + .../GTLYouTubeChannelSection.h | 1 + .../GTLYouTubeChannelSectionContentDetails.h | 1 + .../GTLYouTubeChannelSectionListResponse.h | 1 + .../GTLYouTubeChannelSectionLocalization.h | 1 + .../GTLYouTubeChannelSectionSnippet.h | 1 + .../GTLYouTubeChannelSectionTargeting.h | 1 + .../GTLYouTubeChannelSettings.h | 1 + .../GTLYouTubeChannelSnippet.h | 1 + .../GTLYouTubeChannelStatistics.h | 1 + .../GoogleAPIClient/GTLYouTubeChannelStatus.h | 1 + .../GTLYouTubeChannelTopicDetails.h | 1 + .../GoogleAPIClient/GTLYouTubeComment.h | 1 + .../GTLYouTubeCommentListResponse.h | 1 + .../GTLYouTubeCommentSnippet.h | 1 + .../GoogleAPIClient/GTLYouTubeCommentThread.h | 1 + .../GTLYouTubeCommentThreadListResponse.h | 1 + .../GTLYouTubeCommentThreadReplies.h | 1 + .../GTLYouTubeCommentThreadSnippet.h | 1 + .../GoogleAPIClient/GTLYouTubeConstants.h | 1 + .../GoogleAPIClient/GTLYouTubeContentRating.h | 1 + .../GTLYouTubeFanFundingEvent.h | 1 + .../GTLYouTubeFanFundingEventListResponse.h | 1 + .../GTLYouTubeFanFundingEventSnippet.h | 1 + .../GoogleAPIClient/GTLYouTubeGeoPoint.h | 1 + .../GoogleAPIClient/GTLYouTubeGuideCategory.h | 1 + .../GTLYouTubeGuideCategoryListResponse.h | 1 + .../GTLYouTubeGuideCategorySnippet.h | 1 + .../GoogleAPIClient/GTLYouTubeI18nLanguage.h | 1 + .../GTLYouTubeI18nLanguageListResponse.h | 1 + .../GTLYouTubeI18nLanguageSnippet.h | 1 + .../GoogleAPIClient/GTLYouTubeI18nRegion.h | 1 + .../GTLYouTubeI18nRegionListResponse.h | 1 + .../GTLYouTubeI18nRegionSnippet.h | 1 + .../GoogleAPIClient/GTLYouTubeImageSettings.h | 1 + .../GoogleAPIClient/GTLYouTubeIngestionInfo.h | 1 + .../GTLYouTubeInvideoBranding.h | 1 + .../GTLYouTubeInvideoPosition.h | 1 + .../GTLYouTubeInvideoPromotion.h | 1 + .../GoogleAPIClient/GTLYouTubeInvideoTiming.h | 1 + .../GoogleAPIClient/GTLYouTubeLanguageTag.h | 1 + .../GoogleAPIClient/GTLYouTubeLiveBroadcast.h | 1 + .../GTLYouTubeLiveBroadcastContentDetails.h | 1 + .../GTLYouTubeLiveBroadcastListResponse.h | 1 + .../GTLYouTubeLiveBroadcastSnippet.h | 1 + .../GTLYouTubeLiveBroadcastStatistics.h | 1 + .../GTLYouTubeLiveBroadcastStatus.h | 1 + .../GTLYouTubeLiveBroadcastTopic.h | 1 + .../GTLYouTubeLiveBroadcastTopicDetails.h | 1 + .../GTLYouTubeLiveBroadcastTopicSnippet.h | 1 + .../GoogleAPIClient/GTLYouTubeLiveChatBan.h | 1 + .../GTLYouTubeLiveChatBanSnippet.h | 1 + ...GTLYouTubeLiveChatFanFundingEventDetails.h | 1 + .../GTLYouTubeLiveChatMessage.h | 1 + .../GTLYouTubeLiveChatMessageAuthorDetails.h | 1 + .../GTLYouTubeLiveChatMessageListResponse.h | 1 + .../GTLYouTubeLiveChatMessageSnippet.h | 1 + .../GTLYouTubeLiveChatModerator.h | 1 + .../GTLYouTubeLiveChatModeratorListResponse.h | 1 + .../GTLYouTubeLiveChatModeratorSnippet.h | 1 + .../GTLYouTubeLiveChatTextMessageDetails.h | 1 + .../GoogleAPIClient/GTLYouTubeLiveStream.h | 1 + .../GTLYouTubeLiveStreamConfigurationIssue.h | 1 + .../GTLYouTubeLiveStreamContentDetails.h | 1 + .../GTLYouTubeLiveStreamHealthStatus.h | 1 + .../GTLYouTubeLiveStreamListResponse.h | 1 + .../GTLYouTubeLiveStreamSnippet.h | 1 + .../GTLYouTubeLiveStreamStatus.h | 1 + .../GTLYouTubeLocalizedProperty.h | 1 + .../GTLYouTubeLocalizedString.h | 1 + .../GTLYouTubeMonitorStreamInfo.h | 1 + .../GoogleAPIClient/GTLYouTubePageInfo.h | 1 + .../GoogleAPIClient/GTLYouTubePlaylist.h | 1 + .../GTLYouTubePlaylistContentDetails.h | 1 + .../GoogleAPIClient/GTLYouTubePlaylistItem.h | 1 + .../GTLYouTubePlaylistItemContentDetails.h | 1 + .../GTLYouTubePlaylistItemListResponse.h | 1 + .../GTLYouTubePlaylistItemSnippet.h | 1 + .../GTLYouTubePlaylistItemStatus.h | 1 + .../GTLYouTubePlaylistListResponse.h | 1 + .../GTLYouTubePlaylistLocalization.h | 1 + .../GTLYouTubePlaylistPlayer.h | 1 + .../GTLYouTubePlaylistSnippet.h | 1 + .../GTLYouTubePlaylistStatus.h | 1 + .../GoogleAPIClient/GTLYouTubePromotedItem.h | 1 + .../GTLYouTubePromotedItemId.h | 1 + .../GoogleAPIClient/GTLYouTubePropertyValue.h | 1 + .../GoogleAPIClient/GTLYouTubeResourceId.h | 1 + .../GTLYouTubeSearchListResponse.h | 1 + .../GoogleAPIClient/GTLYouTubeSearchResult.h | 1 + .../GTLYouTubeSearchResultSnippet.h | 1 + .../GoogleAPIClient/GTLYouTubeSponsor.h | 1 + .../GTLYouTubeSponsorListResponse.h | 1 + .../GTLYouTubeSponsorSnippet.h | 1 + .../GoogleAPIClient/GTLYouTubeSubscription.h | 1 + .../GTLYouTubeSubscriptionContentDetails.h | 1 + .../GTLYouTubeSubscriptionListResponse.h | 1 + .../GTLYouTubeSubscriptionSnippet.h | 1 + .../GTLYouTubeSubscriptionSubscriberSnippet.h | 1 + .../GoogleAPIClient/GTLYouTubeThumbnail.h | 1 + .../GTLYouTubeThumbnailDetails.h | 1 + .../GTLYouTubeThumbnailSetResponse.h | 1 + .../GTLYouTubeTokenPagination.h | 1 + .../Private/GoogleAPIClient/GTLYouTubeVideo.h | 1 + .../GTLYouTubeVideoAbuseReport.h | 1 + .../GTLYouTubeVideoAbuseReportReason.h | 1 + ...ouTubeVideoAbuseReportReasonListResponse.h | 1 + .../GTLYouTubeVideoAbuseReportReasonSnippet.h | 1 + ...TLYouTubeVideoAbuseReportSecondaryReason.h | 1 + .../GTLYouTubeVideoAgeGating.h | 1 + .../GoogleAPIClient/GTLYouTubeVideoCategory.h | 1 + .../GTLYouTubeVideoCategoryListResponse.h | 1 + .../GTLYouTubeVideoCategorySnippet.h | 1 + .../GTLYouTubeVideoContentDetails.h | 1 + ...TubeVideoContentDetailsRegionRestriction.h | 1 + .../GTLYouTubeVideoFileDetails.h | 1 + .../GTLYouTubeVideoFileDetailsAudioStream.h | 1 + .../GTLYouTubeVideoFileDetailsVideoStream.h | 1 + .../GTLYouTubeVideoGetRatingResponse.h | 1 + .../GTLYouTubeVideoListResponse.h | 1 + .../GTLYouTubeVideoLiveStreamingDetails.h | 1 + .../GTLYouTubeVideoLocalization.h | 1 + .../GTLYouTubeVideoMonetizationDetails.h | 1 + .../GoogleAPIClient/GTLYouTubeVideoPlayer.h | 1 + .../GTLYouTubeVideoProcessingDetails.h | 1 + ...VideoProcessingDetailsProcessingProgress.h | 1 + .../GTLYouTubeVideoProjectDetails.h | 1 + .../GoogleAPIClient/GTLYouTubeVideoRating.h | 1 + .../GTLYouTubeVideoRecordingDetails.h | 1 + .../GoogleAPIClient/GTLYouTubeVideoSnippet.h | 1 + .../GTLYouTubeVideoStatistics.h | 1 + .../GoogleAPIClient/GTLYouTubeVideoStatus.h | 1 + .../GTLYouTubeVideoSuggestions.h | 1 + .../GTLYouTubeVideoSuggestionsTagSuggestion.h | 1 + .../GTLYouTubeVideoTopicDetails.h | 1 + .../GoogleAPIClient/GTLYouTubeWatchSettings.h | 1 + .../gtm-http-fetcher/GTMGatherInputStream.h | 1 - .../gtm-http-fetcher/GTMHTTPFetchHistory.h | 1 - .../Private/gtm-http-fetcher/GTMHTTPFetcher.h | 1 - .../GTMHTTPFetcherLogViewController.h | 1 - .../gtm-http-fetcher/GTMHTTPFetcherLogging.h | 1 - .../gtm-http-fetcher/GTMHTTPFetcherService.h | 1 - .../gtm-http-fetcher/GTMHTTPUploadFetcher.h | 1 - .../gtm-http-fetcher/GTMMIMEDocument.h | 1 - .../GTMReadMonitorInputStream.h | 1 - .../gtm-oauth2/GTMOAuth2Authentication.h | 1 - .../Private/gtm-oauth2/GTMOAuth2SignIn.h | 1 - .../GTMSessionFetcher/GTMGatherInputStream.h | 1 + .../GTMSessionFetcher/GTMMIMEDocument.h | 1 + .../GTMReadMonitorInputStream.h | 1 + .../GTMSessionFetcher/GTMSessionFetcher.h | 1 + .../GTMSessionFetcherLogging.h | 1 + .../GTMSessionFetcherService.h | 1 + .../GTMSessionUploadFetcher.h | 1 + .../Public/Google-API-Client/GTLBase64.h | 1 - .../Public/Google-API-Client/GTLBatchQuery.h | 1 - .../Public/Google-API-Client/GTLBatchResult.h | 1 - .../Public/Google-API-Client/GTLDateTime.h | 1 - .../Public/Google-API-Client/GTLDefines.h | 1 - .../Public/Google-API-Client/GTLErrorObject.h | 1 - .../Public/Google-API-Client/GTLFramework.h | 1 - .../Public/Google-API-Client/GTLJSONParser.h | 1 - .../Public/Google-API-Client/GTLObject.h | 1 - .../Public/Google-API-Client/GTLQuery.h | 1 - .../Google-API-Client/GTLQueryYouTube.h | 1 - .../Google-API-Client/GTLRuntimeCommon.h | 1 - .../Public/Google-API-Client/GTLService.h | 1 - .../Google-API-Client/GTLServiceYouTube.h | 1 - .../Google-API-Client/GTLTargetNamespace.h | 1 - .../Google-API-Client/GTLUploadParameters.h | 1 - .../Public/Google-API-Client/GTLUtilities.h | 1 - .../Public/Google-API-Client/GTLYouTube.h | 1 - .../GTLYouTubeAccessPolicy.h | 1 - .../Google-API-Client/GTLYouTubeActivity.h | 1 - .../GTLYouTubeActivityContentDetails.h | 1 - ...GTLYouTubeActivityContentDetailsBulletin.h | 1 - ...YouTubeActivityContentDetailsChannelItem.h | 1 - .../GTLYouTubeActivityContentDetailsComment.h | 1 - ...GTLYouTubeActivityContentDetailsFavorite.h | 1 - .../GTLYouTubeActivityContentDetailsLike.h | 1 - ...ouTubeActivityContentDetailsPlaylistItem.h | 1 - ...ouTubeActivityContentDetailsPromotedItem.h | 1 - ...TubeActivityContentDetailsRecommendation.h | 1 - .../GTLYouTubeActivityContentDetailsSocial.h | 1 - ...ouTubeActivityContentDetailsSubscription.h | 1 - .../GTLYouTubeActivityContentDetailsUpload.h | 1 - .../GTLYouTubeActivityListResponse.h | 1 - .../GTLYouTubeActivitySnippet.h | 1 - .../Google-API-Client/GTLYouTubeCdnSettings.h | 1 - .../Google-API-Client/GTLYouTubeChannel.h | 1 - .../GTLYouTubeChannelAuditDetails.h | 1 - .../GTLYouTubeChannelBannerResource.h | 1 - .../GTLYouTubeChannelBrandingSettings.h | 1 - .../GTLYouTubeChannelContentDetails.h | 1 - .../GTLYouTubeChannelContentOwnerDetails.h | 1 - .../GTLYouTubeChannelConversionPing.h | 1 - .../GTLYouTubeChannelConversionPings.h | 1 - .../GTLYouTubeChannelListResponse.h | 1 - .../GTLYouTubeChannelLocalization.h | 1 - .../GTLYouTubeChannelSection.h | 1 - .../GTLYouTubeChannelSectionContentDetails.h | 1 - .../GTLYouTubeChannelSectionListResponse.h | 1 - .../GTLYouTubeChannelSectionSnippet.h | 1 - .../GTLYouTubeChannelSettings.h | 1 - .../GTLYouTubeChannelSnippet.h | 1 - .../GTLYouTubeChannelStatistics.h | 1 - .../GTLYouTubeChannelStatus.h | 1 - .../GTLYouTubeChannelTopicDetails.h | 1 - .../Google-API-Client/GTLYouTubeConstants.h | 1 - .../GTLYouTubeContentRating.h | 1 - .../Google-API-Client/GTLYouTubeGeoPoint.h | 1 - .../GTLYouTubeGuideCategory.h | 1 - .../GTLYouTubeGuideCategoryListResponse.h | 1 - .../GTLYouTubeGuideCategorySnippet.h | 1 - .../GTLYouTubeI18nLanguage.h | 1 - .../GTLYouTubeI18nLanguageListResponse.h | 1 - .../GTLYouTubeI18nLanguageSnippet.h | 1 - .../Google-API-Client/GTLYouTubeI18nRegion.h | 1 - .../GTLYouTubeI18nRegionListResponse.h | 1 - .../GTLYouTubeI18nRegionSnippet.h | 1 - .../GTLYouTubeImageSettings.h | 1 - .../GTLYouTubeIngestionInfo.h | 1 - .../GTLYouTubeInvideoBranding.h | 1 - .../GTLYouTubeInvideoPosition.h | 1 - .../GTLYouTubeInvideoPromotion.h | 1 - .../GTLYouTubeInvideoTiming.h | 1 - .../Google-API-Client/GTLYouTubeLanguageTag.h | 1 - .../GTLYouTubeLiveBroadcast.h | 1 - .../GTLYouTubeLiveBroadcastContentDetails.h | 1 - .../GTLYouTubeLiveBroadcastListResponse.h | 1 - .../GTLYouTubeLiveBroadcastSnippet.h | 1 - .../GTLYouTubeLiveBroadcastStatus.h | 1 - .../Google-API-Client/GTLYouTubeLiveStream.h | 1 - .../GTLYouTubeLiveStreamContentDetails.h | 1 - .../GTLYouTubeLiveStreamListResponse.h | 1 - .../GTLYouTubeLiveStreamSnippet.h | 1 - .../GTLYouTubeLiveStreamStatus.h | 1 - .../GTLYouTubeLocalizedProperty.h | 1 - .../GTLYouTubeLocalizedString.h | 1 - .../GTLYouTubeMonitorStreamInfo.h | 1 - .../Google-API-Client/GTLYouTubePageInfo.h | 1 - .../Google-API-Client/GTLYouTubePlaylist.h | 1 - .../GTLYouTubePlaylistContentDetails.h | 1 - .../GTLYouTubePlaylistItem.h | 1 - .../GTLYouTubePlaylistItemContentDetails.h | 1 - .../GTLYouTubePlaylistItemListResponse.h | 1 - .../GTLYouTubePlaylistItemSnippet.h | 1 - .../GTLYouTubePlaylistItemStatus.h | 1 - .../GTLYouTubePlaylistListResponse.h | 1 - .../GTLYouTubePlaylistPlayer.h | 1 - .../GTLYouTubePlaylistSnippet.h | 1 - .../GTLYouTubePlaylistStatus.h | 1 - .../GTLYouTubePromotedItem.h | 1 - .../GTLYouTubePromotedItemId.h | 1 - .../GTLYouTubePropertyValue.h | 1 - .../Google-API-Client/GTLYouTubeResourceId.h | 1 - .../GTLYouTubeSearchListResponse.h | 1 - .../GTLYouTubeSearchResult.h | 1 - .../GTLYouTubeSearchResultSnippet.h | 1 - .../GTLYouTubeSubscription.h | 1 - .../GTLYouTubeSubscriptionContentDetails.h | 1 - .../GTLYouTubeSubscriptionListResponse.h | 1 - .../GTLYouTubeSubscriptionSnippet.h | 1 - .../GTLYouTubeSubscriptionSubscriberSnippet.h | 1 - .../Google-API-Client/GTLYouTubeThumbnail.h | 1 - .../GTLYouTubeThumbnailDetails.h | 1 - .../GTLYouTubeThumbnailSetResponse.h | 1 - .../GTLYouTubeTokenPagination.h | 1 - .../Google-API-Client/GTLYouTubeVideo.h | 1 - .../GTLYouTubeVideoAgeGating.h | 1 - .../GTLYouTubeVideoCategory.h | 1 - .../GTLYouTubeVideoCategoryListResponse.h | 1 - .../GTLYouTubeVideoCategorySnippet.h | 1 - .../GTLYouTubeVideoContentDetails.h | 1 - ...TubeVideoContentDetailsRegionRestriction.h | 1 - .../GTLYouTubeVideoConversionPing.h | 1 - .../GTLYouTubeVideoConversionPings.h | 1 - .../GTLYouTubeVideoFileDetails.h | 1 - .../GTLYouTubeVideoFileDetailsAudioStream.h | 1 - .../GTLYouTubeVideoFileDetailsVideoStream.h | 1 - .../GTLYouTubeVideoGetRatingResponse.h | 1 - .../GTLYouTubeVideoListResponse.h | 1 - .../GTLYouTubeVideoLiveStreamingDetails.h | 1 - .../GTLYouTubeVideoMonetizationDetails.h | 1 - .../Google-API-Client/GTLYouTubeVideoPlayer.h | 1 - .../GTLYouTubeVideoProcessingDetails.h | 1 - ...VideoProcessingDetailsProcessingProgress.h | 1 - .../GTLYouTubeVideoProjectDetails.h | 1 - .../Google-API-Client/GTLYouTubeVideoRating.h | 1 - .../GTLYouTubeVideoRecordingDetails.h | 1 - .../GTLYouTubeVideoSnippet.h | 1 - .../GTLYouTubeVideoStatistics.h | 1 - .../Google-API-Client/GTLYouTubeVideoStatus.h | 1 - .../GTLYouTubeVideoSuggestions.h | 1 - .../GTLYouTubeVideoSuggestionsTagSuggestion.h | 1 - .../GTLYouTubeVideoTopicDetails.h | 1 - .../GTLYouTubeWatchSettings.h | 1 - .../Public/GoogleAPIClient/GTLBase64.h | 1 + .../Public/GoogleAPIClient/GTLBatchQuery.h | 1 + .../Public/GoogleAPIClient/GTLBatchResult.h | 1 + .../Public/GoogleAPIClient/GTLDateTime.h | 1 + .../Public/GoogleAPIClient/GTLDefines.h | 1 + .../Public/GoogleAPIClient/GTLErrorObject.h | 1 + .../Public/GoogleAPIClient/GTLFramework.h | 1 + .../Public/GoogleAPIClient/GTLJSONParser.h | 1 + .../Public/GoogleAPIClient/GTLObject.h | 1 + .../Headers/Public/GoogleAPIClient/GTLQuery.h | 1 + .../Public/GoogleAPIClient/GTLQueryYouTube.h | 1 + .../Public/GoogleAPIClient/GTLRuntimeCommon.h | 1 + .../Public/GoogleAPIClient/GTLService.h | 1 + .../GoogleAPIClient/GTLServiceYouTube.h | 1 + .../GoogleAPIClient/GTLTargetNamespace.h | 1 + .../GoogleAPIClient/GTLUploadParameters.h | 1 + .../Public/GoogleAPIClient/GTLUtilities.h | 1 + .../Public/GoogleAPIClient/GTLYouTube.h | 1 + .../GoogleAPIClient/GTLYouTubeAccessPolicy.h | 1 + .../GoogleAPIClient/GTLYouTubeActivity.h | 1 + .../GTLYouTubeActivityContentDetails.h | 1 + ...GTLYouTubeActivityContentDetailsBulletin.h | 1 + ...YouTubeActivityContentDetailsChannelItem.h | 1 + .../GTLYouTubeActivityContentDetailsComment.h | 1 + ...GTLYouTubeActivityContentDetailsFavorite.h | 1 + .../GTLYouTubeActivityContentDetailsLike.h | 1 + ...ouTubeActivityContentDetailsPlaylistItem.h | 1 + ...ouTubeActivityContentDetailsPromotedItem.h | 1 + ...TubeActivityContentDetailsRecommendation.h | 1 + .../GTLYouTubeActivityContentDetailsSocial.h | 1 + ...ouTubeActivityContentDetailsSubscription.h | 1 + .../GTLYouTubeActivityContentDetailsUpload.h | 1 + .../GTLYouTubeActivityListResponse.h | 1 + .../GTLYouTubeActivitySnippet.h | 1 + .../GoogleAPIClient/GTLYouTubeCaption.h | 1 + .../GTLYouTubeCaptionListResponse.h | 1 + .../GTLYouTubeCaptionSnippet.h | 1 + .../GoogleAPIClient/GTLYouTubeCdnSettings.h | 1 + .../GoogleAPIClient/GTLYouTubeChannel.h | 1 + .../GTLYouTubeChannelAuditDetails.h | 1 + .../GTLYouTubeChannelBannerResource.h | 1 + .../GTLYouTubeChannelBrandingSettings.h | 1 + .../GTLYouTubeChannelContentDetails.h | 1 + .../GTLYouTubeChannelContentOwnerDetails.h | 1 + .../GTLYouTubeChannelConversionPing.h | 1 + .../GTLYouTubeChannelConversionPings.h | 1 + .../GTLYouTubeChannelListResponse.h | 1 + .../GTLYouTubeChannelLocalization.h | 1 + .../GTLYouTubeChannelProfileDetails.h | 1 + .../GTLYouTubeChannelSection.h | 1 + .../GTLYouTubeChannelSectionContentDetails.h | 1 + .../GTLYouTubeChannelSectionListResponse.h | 1 + .../GTLYouTubeChannelSectionLocalization.h | 1 + .../GTLYouTubeChannelSectionSnippet.h | 1 + .../GTLYouTubeChannelSectionTargeting.h | 1 + .../GTLYouTubeChannelSettings.h | 1 + .../GTLYouTubeChannelSnippet.h | 1 + .../GTLYouTubeChannelStatistics.h | 1 + .../GoogleAPIClient/GTLYouTubeChannelStatus.h | 1 + .../GTLYouTubeChannelTopicDetails.h | 1 + .../GoogleAPIClient/GTLYouTubeComment.h | 1 + .../GTLYouTubeCommentListResponse.h | 1 + .../GTLYouTubeCommentSnippet.h | 1 + .../GoogleAPIClient/GTLYouTubeCommentThread.h | 1 + .../GTLYouTubeCommentThreadListResponse.h | 1 + .../GTLYouTubeCommentThreadReplies.h | 1 + .../GTLYouTubeCommentThreadSnippet.h | 1 + .../GoogleAPIClient/GTLYouTubeConstants.h | 1 + .../GoogleAPIClient/GTLYouTubeContentRating.h | 1 + .../GTLYouTubeFanFundingEvent.h | 1 + .../GTLYouTubeFanFundingEventListResponse.h | 1 + .../GTLYouTubeFanFundingEventSnippet.h | 1 + .../GoogleAPIClient/GTLYouTubeGeoPoint.h | 1 + .../GoogleAPIClient/GTLYouTubeGuideCategory.h | 1 + .../GTLYouTubeGuideCategoryListResponse.h | 1 + .../GTLYouTubeGuideCategorySnippet.h | 1 + .../GoogleAPIClient/GTLYouTubeI18nLanguage.h | 1 + .../GTLYouTubeI18nLanguageListResponse.h | 1 + .../GTLYouTubeI18nLanguageSnippet.h | 1 + .../GoogleAPIClient/GTLYouTubeI18nRegion.h | 1 + .../GTLYouTubeI18nRegionListResponse.h | 1 + .../GTLYouTubeI18nRegionSnippet.h | 1 + .../GoogleAPIClient/GTLYouTubeImageSettings.h | 1 + .../GoogleAPIClient/GTLYouTubeIngestionInfo.h | 1 + .../GTLYouTubeInvideoBranding.h | 1 + .../GTLYouTubeInvideoPosition.h | 1 + .../GTLYouTubeInvideoPromotion.h | 1 + .../GoogleAPIClient/GTLYouTubeInvideoTiming.h | 1 + .../GoogleAPIClient/GTLYouTubeLanguageTag.h | 1 + .../GoogleAPIClient/GTLYouTubeLiveBroadcast.h | 1 + .../GTLYouTubeLiveBroadcastContentDetails.h | 1 + .../GTLYouTubeLiveBroadcastListResponse.h | 1 + .../GTLYouTubeLiveBroadcastSnippet.h | 1 + .../GTLYouTubeLiveBroadcastStatistics.h | 1 + .../GTLYouTubeLiveBroadcastStatus.h | 1 + .../GTLYouTubeLiveBroadcastTopic.h | 1 + .../GTLYouTubeLiveBroadcastTopicDetails.h | 1 + .../GTLYouTubeLiveBroadcastTopicSnippet.h | 1 + .../GoogleAPIClient/GTLYouTubeLiveChatBan.h | 1 + .../GTLYouTubeLiveChatBanSnippet.h | 1 + ...GTLYouTubeLiveChatFanFundingEventDetails.h | 1 + .../GTLYouTubeLiveChatMessage.h | 1 + .../GTLYouTubeLiveChatMessageAuthorDetails.h | 1 + .../GTLYouTubeLiveChatMessageListResponse.h | 1 + .../GTLYouTubeLiveChatMessageSnippet.h | 1 + .../GTLYouTubeLiveChatModerator.h | 1 + .../GTLYouTubeLiveChatModeratorListResponse.h | 1 + .../GTLYouTubeLiveChatModeratorSnippet.h | 1 + .../GTLYouTubeLiveChatTextMessageDetails.h | 1 + .../GoogleAPIClient/GTLYouTubeLiveStream.h | 1 + .../GTLYouTubeLiveStreamConfigurationIssue.h | 1 + .../GTLYouTubeLiveStreamContentDetails.h | 1 + .../GTLYouTubeLiveStreamHealthStatus.h | 1 + .../GTLYouTubeLiveStreamListResponse.h | 1 + .../GTLYouTubeLiveStreamSnippet.h | 1 + .../GTLYouTubeLiveStreamStatus.h | 1 + .../GTLYouTubeLocalizedProperty.h | 1 + .../GTLYouTubeLocalizedString.h | 1 + .../GTLYouTubeMonitorStreamInfo.h | 1 + .../GoogleAPIClient/GTLYouTubePageInfo.h | 1 + .../GoogleAPIClient/GTLYouTubePlaylist.h | 1 + .../GTLYouTubePlaylistContentDetails.h | 1 + .../GoogleAPIClient/GTLYouTubePlaylistItem.h | 1 + .../GTLYouTubePlaylistItemContentDetails.h | 1 + .../GTLYouTubePlaylistItemListResponse.h | 1 + .../GTLYouTubePlaylistItemSnippet.h | 1 + .../GTLYouTubePlaylistItemStatus.h | 1 + .../GTLYouTubePlaylistListResponse.h | 1 + .../GTLYouTubePlaylistLocalization.h | 1 + .../GTLYouTubePlaylistPlayer.h | 1 + .../GTLYouTubePlaylistSnippet.h | 1 + .../GTLYouTubePlaylistStatus.h | 1 + .../GoogleAPIClient/GTLYouTubePromotedItem.h | 1 + .../GTLYouTubePromotedItemId.h | 1 + .../GoogleAPIClient/GTLYouTubePropertyValue.h | 1 + .../GoogleAPIClient/GTLYouTubeResourceId.h | 1 + .../GTLYouTubeSearchListResponse.h | 1 + .../GoogleAPIClient/GTLYouTubeSearchResult.h | 1 + .../GTLYouTubeSearchResultSnippet.h | 1 + .../GoogleAPIClient/GTLYouTubeSponsor.h | 1 + .../GTLYouTubeSponsorListResponse.h | 1 + .../GTLYouTubeSponsorSnippet.h | 1 + .../GoogleAPIClient/GTLYouTubeSubscription.h | 1 + .../GTLYouTubeSubscriptionContentDetails.h | 1 + .../GTLYouTubeSubscriptionListResponse.h | 1 + .../GTLYouTubeSubscriptionSnippet.h | 1 + .../GTLYouTubeSubscriptionSubscriberSnippet.h | 1 + .../GoogleAPIClient/GTLYouTubeThumbnail.h | 1 + .../GTLYouTubeThumbnailDetails.h | 1 + .../GTLYouTubeThumbnailSetResponse.h | 1 + .../GTLYouTubeTokenPagination.h | 1 + .../Public/GoogleAPIClient/GTLYouTubeVideo.h | 1 + .../GTLYouTubeVideoAbuseReport.h | 1 + .../GTLYouTubeVideoAbuseReportReason.h | 1 + ...ouTubeVideoAbuseReportReasonListResponse.h | 1 + .../GTLYouTubeVideoAbuseReportReasonSnippet.h | 1 + ...TLYouTubeVideoAbuseReportSecondaryReason.h | 1 + .../GTLYouTubeVideoAgeGating.h | 1 + .../GoogleAPIClient/GTLYouTubeVideoCategory.h | 1 + .../GTLYouTubeVideoCategoryListResponse.h | 1 + .../GTLYouTubeVideoCategorySnippet.h | 1 + .../GTLYouTubeVideoContentDetails.h | 1 + ...TubeVideoContentDetailsRegionRestriction.h | 1 + .../GTLYouTubeVideoFileDetails.h | 1 + .../GTLYouTubeVideoFileDetailsAudioStream.h | 1 + .../GTLYouTubeVideoFileDetailsVideoStream.h | 1 + .../GTLYouTubeVideoGetRatingResponse.h | 1 + .../GTLYouTubeVideoListResponse.h | 1 + .../GTLYouTubeVideoLiveStreamingDetails.h | 1 + .../GTLYouTubeVideoLocalization.h | 1 + .../GTLYouTubeVideoMonetizationDetails.h | 1 + .../GoogleAPIClient/GTLYouTubeVideoPlayer.h | 1 + .../GTLYouTubeVideoProcessingDetails.h | 1 + ...VideoProcessingDetailsProcessingProgress.h | 1 + .../GTLYouTubeVideoProjectDetails.h | 1 + .../GoogleAPIClient/GTLYouTubeVideoRating.h | 1 + .../GTLYouTubeVideoRecordingDetails.h | 1 + .../GoogleAPIClient/GTLYouTubeVideoSnippet.h | 1 + .../GTLYouTubeVideoStatistics.h | 1 + .../GoogleAPIClient/GTLYouTubeVideoStatus.h | 1 + .../GTLYouTubeVideoSuggestions.h | 1 + .../GTLYouTubeVideoSuggestionsTagSuggestion.h | 1 + .../GTLYouTubeVideoTopicDetails.h | 1 + .../GoogleAPIClient/GTLYouTubeWatchSettings.h | 1 + .../gtm-http-fetcher/GTMGatherInputStream.h | 1 - .../gtm-http-fetcher/GTMHTTPFetchHistory.h | 1 - .../Public/gtm-http-fetcher/GTMHTTPFetcher.h | 1 - .../GTMHTTPFetcherLogViewController.h | 1 - .../gtm-http-fetcher/GTMHTTPFetcherLogging.h | 1 - .../gtm-http-fetcher/GTMHTTPFetcherService.h | 1 - .../gtm-http-fetcher/GTMHTTPUploadFetcher.h | 1 - .../Public/gtm-http-fetcher/GTMMIMEDocument.h | 1 - .../GTMReadMonitorInputStream.h | 1 - .../gtm-oauth2/GTMOAuth2Authentication.h | 1 - .../Public/gtm-oauth2/GTMOAuth2SignIn.h | 1 - XCDYouTubeKit Demo/Pods/Manifest.lock | 31 +- .../Pods/Pods.xcodeproj/project.pbxproj | 4624 +++++++++-------- .../CocoaLumberjack-OSX-dummy.m | 5 + .../CocoaLumberjack-OSX-prefix.pch} | 0 .../CocoaLumberjack-OSX.xcconfig} | 5 +- .../CocoaLumberjack-iOS-dummy.m | 5 + .../CocoaLumberjack-iOS-prefix.pch} | 0 .../CocoaLumberjack-iOS.xcconfig} | 5 +- .../GTMSessionFetcher-dummy.m | 5 + .../GTMSessionFetcher-prefix.pch} | 0 .../GTMSessionFetcher.xcconfig | 8 + .../Google-API-Client-dummy.m | 5 - .../Google-API-Client.xcconfig | 4 - .../GoogleAPIClient/GoogleAPIClient-dummy.m | 5 + .../GoogleAPIClient-prefix.pch} | 0 .../GoogleAPIClient/GoogleAPIClient.xcconfig | 8 + .../NSLogger-OSX/NSLogger-OSX-dummy.m | 5 + .../NSLogger-OSX-prefix.pch} | 0 .../NSLogger-OSX.xcconfig} | 5 +- .../NSLogger-iOS/NSLogger-iOS-dummy.m | 5 + .../NSLogger-iOS-prefix.pch} | 0 .../NSLogger-iOS.xcconfig} | 5 +- ...uTubeKit OS X Demo-CocoaLumberjack-dummy.m | 5 - ...s-XCDYouTubeKit OS X Demo-NSLogger-dummy.m | 5 - ...it OS X Demo-XCDLumberjackNSLogger-dummy.m | 5 - ...t OS X Demo-XCDLumberjackNSLogger.xcconfig | 4 - ...ubeKit OS X Demo-acknowledgements.markdown | 2 +- ...ouTubeKit OS X Demo-acknowledgements.plist | 2 +- ...Pods-XCDYouTubeKit OS X Demo-frameworks.sh | 6 +- .../Pods-XCDYouTubeKit OS X Demo-resources.sh | 89 +- ...ods-XCDYouTubeKit OS X Demo.debug.xcconfig | 5 +- ...s-XCDYouTubeKit OS X Demo.release.xcconfig | 5 +- ...ouTubeKit iOS Demo-CocoaLumberjack-dummy.m | 5 - ...ds-XCDYouTubeKit iOS Demo-NSLogger-dummy.m | 5 - ...Kit iOS Demo-XCDLumberjackNSLogger-dummy.m | 5 - ...it iOS Demo-XCDLumberjackNSLogger.xcconfig | 4 - ...TubeKit iOS Demo-acknowledgements.markdown | 2 +- ...YouTubeKit iOS Demo-acknowledgements.plist | 2 +- .../Pods-XCDYouTubeKit iOS Demo-frameworks.sh | 6 +- .../Pods-XCDYouTubeKit iOS Demo-resources.sh | 89 +- ...Pods-XCDYouTubeKit iOS Demo.debug.xcconfig | 5 +- ...ds-XCDYouTubeKit iOS Demo.release.xcconfig | 5 +- ...ubeKit tvOS Demo-acknowledgements.markdown | 429 +- ...ouTubeKit tvOS Demo-acknowledgements.plist | 439 +- ...Pods-XCDYouTubeKit tvOS Demo-frameworks.sh | 6 +- .../Pods-XCDYouTubeKit tvOS Demo-resources.sh | 89 +- ...ods-XCDYouTubeKit tvOS Demo.debug.xcconfig | 11 +- ...s-XCDYouTubeKit tvOS Demo.release.xcconfig | 11 +- .../XCDLumberjackNSLogger-OSX-dummy.m | 5 + .../XCDLumberjackNSLogger-OSX-prefix.pch} | 0 .../XCDLumberjackNSLogger-OSX.xcconfig | 8 + .../XCDLumberjackNSLogger-iOS-dummy.m | 5 + .../XCDLumberjackNSLogger-iOS-prefix.pch} | 0 .../XCDLumberjackNSLogger-iOS.xcconfig | 8 + .../gtm-http-fetcher/gtm-http-fetcher-dummy.m | 5 - .../gtm-http-fetcher.xcconfig | 4 - .../gtm-oauth2/gtm-oauth2-dummy.m | 5 - .../gtm-oauth2/gtm-oauth2-prefix.pch | 4 - .../gtm-oauth2/gtm-oauth2.xcconfig | 5 - .../Pods/gtm-http-fetcher/README.txt | 4 - .../Source/GTMGatherInputStream.h | 64 - .../Source/GTMGatherInputStream.m | 197 - .../Source/GTMHTTPFetchHistory.h | 175 - .../Source/GTMHTTPFetchHistory.m | 612 --- .../gtm-http-fetcher/Source/GTMHTTPFetcher.h | 847 --- .../gtm-http-fetcher/Source/GTMHTTPFetcher.m | 2156 -------- .../Source/GTMHTTPFetcherLogViewController.h | 66 - .../Source/GTMHTTPFetcherLogViewController.m | 275 - .../Source/GTMHTTPFetcherLogging.m | 1134 ---- .../Source/GTMHTTPFetcherService.h | 130 - .../Source/GTMHTTPFetcherService.m | 507 -- .../Source/GTMHTTPUploadFetcher.h | 139 - .../Source/GTMHTTPUploadFetcher.m | 947 ---- .../gtm-http-fetcher/Source/GTMMIMEDocument.h | 57 - .../gtm-http-fetcher/Source/GTMMIMEDocument.m | 281 - .../Source/GTMReadMonitorInputStream.h | 65 - .../Source/GTMReadMonitorInputStream.m | 189 - .../Source/GTMOAuth2Authentication.h | 362 -- .../Source/GTMOAuth2Authentication.m | 1315 ----- .../Pods/gtm-oauth2/Source/GTMOAuth2SignIn.h | 191 - .../Pods/gtm-oauth2/Source/GTMOAuth2SignIn.m | 971 ---- .../project.pbxproj | 132 +- XCDYouTubeKit Demo/tvOS Demo/AppDelegate.m | 2 +- .../PlaylistCollectionViewController.m | 2 +- XCDYouTubeKit Demo/tvOS Demo/VideoCell.h | 2 +- 1166 files changed, 26213 insertions(+), 17996 deletions(-) create mode 100644 XCDYouTubeKit Demo/Pods/GTMSessionFetcher/LICENSE create mode 100644 XCDYouTubeKit Demo/Pods/GTMSessionFetcher/README.md create mode 100644 XCDYouTubeKit Demo/Pods/GTMSessionFetcher/Source/GTMGatherInputStream.h create mode 100644 XCDYouTubeKit Demo/Pods/GTMSessionFetcher/Source/GTMGatherInputStream.m create mode 100644 XCDYouTubeKit Demo/Pods/GTMSessionFetcher/Source/GTMMIMEDocument.h create mode 100644 XCDYouTubeKit Demo/Pods/GTMSessionFetcher/Source/GTMMIMEDocument.m create mode 100644 XCDYouTubeKit Demo/Pods/GTMSessionFetcher/Source/GTMReadMonitorInputStream.h create mode 100644 XCDYouTubeKit Demo/Pods/GTMSessionFetcher/Source/GTMReadMonitorInputStream.m create mode 100644 XCDYouTubeKit Demo/Pods/GTMSessionFetcher/Source/GTMSessionFetcher.h create mode 100644 XCDYouTubeKit Demo/Pods/GTMSessionFetcher/Source/GTMSessionFetcher.m rename XCDYouTubeKit Demo/Pods/{gtm-http-fetcher/Source/GTMHTTPFetcherLogging.h => GTMSessionFetcher/Source/GTMSessionFetcherLogging.h} (65%) create mode 100644 XCDYouTubeKit Demo/Pods/GTMSessionFetcher/Source/GTMSessionFetcherLogging.m create mode 100644 XCDYouTubeKit Demo/Pods/GTMSessionFetcher/Source/GTMSessionFetcherService.h create mode 100644 XCDYouTubeKit Demo/Pods/GTMSessionFetcher/Source/GTMSessionFetcherService.m create mode 100644 XCDYouTubeKit Demo/Pods/GTMSessionFetcher/Source/GTMSessionUploadFetcher.h create mode 100644 XCDYouTubeKit Demo/Pods/GTMSessionFetcher/Source/GTMSessionUploadFetcher.m delete mode 100644 XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Objects/GTLRuntimeCommon.m delete mode 100644 XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLQueryYouTube.m delete mode 100644 XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLServiceYouTube.m delete mode 100644 XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeContentRating.h delete mode 100644 XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeVideoConversionPing.h delete mode 100644 XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Utilities/GTLJSONParser.m create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/LICENSE create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/README.md rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/GTLDefines.h (70%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Objects/GTLBatchQuery.h (73%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Objects/GTLBatchQuery.m (93%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Objects/GTLBatchResult.h (100%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Objects/GTLBatchResult.m (100%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Objects/GTLDateTime.h (97%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Objects/GTLDateTime.m (92%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Objects/GTLErrorObject.h (95%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Objects/GTLErrorObject.m (92%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Objects/GTLObject.h (91%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Objects/GTLObject.m (92%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Objects/GTLQuery.h (72%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Objects/GTLQuery.m (96%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Objects/GTLRuntimeCommon.h (100%) create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Objects/GTLRuntimeCommon.m rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Objects/GTLService.h (85%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Objects/GTLService.m (85%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Objects/GTLUploadParameters.h (80%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Objects/GTLUploadParameters.m (89%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLQueryYouTube.h (63%) create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLQueryYouTube.m rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLServiceYouTube.h (100%) create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLServiceYouTube.m rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTube.h (76%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeAccessPolicy.h (90%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeAccessPolicy.m (88%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeActivity.h (88%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeActivity.m (89%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetails.h (79%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetails.m (100%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsBulletin.h (93%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsBulletin.m (100%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsChannelItem.h (94%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsChannelItem.m (100%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsComment.h (93%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsComment.m (100%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsFavorite.h (94%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsFavorite.m (100%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsLike.h (93%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsLike.m (100%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsPlaylistItem.h (89%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsPlaylistItem.m (100%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsPromotedItem.h (80%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsPromotedItem.m (88%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsRecommendation.h (88%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsRecommendation.m (100%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsSocial.h (85%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsSocial.m (100%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsSubscription.h (94%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsSubscription.m (100%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsUpload.h (94%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsUpload.m (100%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeActivityListResponse.h (79%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeActivityListResponse.m (85%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeActivitySnippet.h (85%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeActivitySnippet.m (89%) create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeCaption.h create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeCaption.m create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeCaptionListResponse.h create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeCaptionListResponse.m create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeCaptionSnippet.h create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeCaptionSnippet.m rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeCdnSettings.h (88%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeCdnSettings.m (100%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeChannel.h (78%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeChannel.m (93%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeChannelAuditDetails.h (84%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeChannelAuditDetails.m (100%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeChannelBannerResource.h (90%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeChannelBannerResource.m (90%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeChannelBrandingSettings.h (84%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeChannelBrandingSettings.m (89%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeChannelContentDetails.h (86%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeChannelContentDetails.m (100%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeChannelContentOwnerDetails.h (92%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeChannelContentOwnerDetails.m (100%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeChannelConversionPing.h (93%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeChannelConversionPing.m (100%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeChannelConversionPings.h (93%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeChannelConversionPings.m (88%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeChannelListResponse.h (79%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeChannelListResponse.m (85%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeChannelLocalization.h (88%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeChannelLocalization.m (88%) create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelProfileDetails.h create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelProfileDetails.m create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelSection.h rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeChannelSection.m (65%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeChannelSectionContentDetails.h (90%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeChannelSectionContentDetails.m (87%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeChannelSectionListResponse.h (86%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeChannelSectionListResponse.m (84%) create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelSectionLocalization.h rename XCDYouTubeKit Demo/Pods/{Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeVideoConversionPing.m => GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelSectionLocalization.m} (75%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeChannelSectionSnippet.h (58%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeChannelSectionSnippet.m (83%) create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelSectionTargeting.h create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelSectionTargeting.m rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeChannelSettings.h (68%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeChannelSettings.m (77%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeChannelSnippet.h (75%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeChannelSnippet.m (79%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeChannelStatistics.h (79%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeChannelStatistics.m (100%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeChannelStatus.h (88%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeChannelStatus.m (100%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeChannelTopicDetails.h (93%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeChannelTopicDetails.m (88%) create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeComment.h create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeComment.m create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeCommentListResponse.h create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeCommentListResponse.m create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeCommentSnippet.h create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeCommentSnippet.m create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeCommentThread.h create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeCommentThread.m create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeCommentThreadListResponse.h create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeCommentThreadListResponse.m create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeCommentThreadReplies.h rename XCDYouTubeKit Demo/Pods/{Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeVideoConversionPings.m => GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeCommentThreadReplies.m} (69%) create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeCommentThreadSnippet.h create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeCommentThreadSnippet.m rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeConstants.h (83%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeConstants.m (83%) create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeContentRating.h rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeContentRating.m (65%) create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeFanFundingEvent.h create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeFanFundingEvent.m create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeFanFundingEventListResponse.h create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeFanFundingEventListResponse.m create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeFanFundingEventSnippet.h create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeFanFundingEventSnippet.m rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeGeoPoint.h (85%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeGeoPoint.m (100%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeGuideCategory.h (89%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeGuideCategory.m (89%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeGuideCategoryListResponse.h (80%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeGuideCategoryListResponse.m (85%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeGuideCategorySnippet.h (91%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeGuideCategorySnippet.m (100%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeI18nLanguage.h (88%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeI18nLanguage.m (89%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeI18nLanguageListResponse.h (86%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeI18nLanguageListResponse.m (84%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeI18nLanguageSnippet.h (92%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeI18nLanguageSnippet.m (100%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeI18nRegion.h (87%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeI18nRegion.m (89%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeI18nRegionListResponse.h (86%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeI18nRegionListResponse.m (84%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeI18nRegionSnippet.h (92%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeI18nRegionSnippet.m (100%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeImageSettings.h (67%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeImageSettings.m (100%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeIngestionInfo.h (90%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeIngestionInfo.m (100%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeInvideoBranding.h (78%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeInvideoBranding.m (100%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeInvideoPosition.h (92%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeInvideoPosition.m (100%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeInvideoPromotion.h (87%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeInvideoPromotion.m (89%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeInvideoTiming.h (89%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeInvideoTiming.m (100%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeLanguageTag.h (94%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeLanguageTag.m (100%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcast.h (68%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcast.m (79%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastContentDetails.h (73%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastContentDetails.m (83%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastListResponse.h (79%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastListResponse.m (85%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastSnippet.h (78%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastSnippet.m (79%) create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastStatistics.h create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastStatistics.m rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastStatus.h (87%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastStatus.m (97%) create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastTopic.h create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastTopic.m create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastTopicDetails.h create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastTopicDetails.m create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastTopicSnippet.h create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastTopicSnippet.m create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatBan.h create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatBan.m create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatBanSnippet.h create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatBanSnippet.m create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatFanFundingEventDetails.h create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatFanFundingEventDetails.m rename XCDYouTubeKit Demo/Pods/{Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelSection.h => GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatMessage.h} (57%) create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatMessage.m create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatMessageAuthorDetails.h create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatMessageAuthorDetails.m create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatMessageListResponse.h create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatMessageListResponse.m create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatMessageSnippet.h create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatMessageSnippet.m create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatModerator.h create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatModerator.m create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatModeratorListResponse.h create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatModeratorListResponse.m create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatModeratorSnippet.h create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatModeratorSnippet.m create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatTextMessageDetails.h create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatTextMessageDetails.m rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeLiveStream.h (83%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeLiveStream.m (90%) create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveStreamConfigurationIssue.h create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveStreamConfigurationIssue.m rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeLiveStreamContentDetails.h (93%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeLiveStreamContentDetails.m (100%) create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveStreamHealthStatus.h create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveStreamHealthStatus.m rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeLiveStreamListResponse.h (79%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeLiveStreamListResponse.m (85%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeLiveStreamSnippet.h (81%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeLiveStreamSnippet.m (80%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeLiveStreamStatus.h (80%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeLiveStreamStatus.m (86%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeLocalizedProperty.h (85%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeLocalizedProperty.m (82%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeLocalizedString.h (90%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeLocalizedString.m (100%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeMonitorStreamInfo.h (89%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeMonitorStreamInfo.m (100%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubePageInfo.h (89%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubePageInfo.m (100%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubePlaylist.h (70%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubePlaylist.m (67%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubePlaylistContentDetails.h (92%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubePlaylistContentDetails.m (100%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubePlaylistItem.h (88%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubePlaylistItem.m (90%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubePlaylistItemContentDetails.h (90%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubePlaylistItemContentDetails.m (100%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubePlaylistItemListResponse.h (79%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubePlaylistItemListResponse.m (85%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubePlaylistItemSnippet.h (82%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubePlaylistItemSnippet.m (89%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubePlaylistItemStatus.h (94%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubePlaylistItemStatus.m (100%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubePlaylistListResponse.h (79%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubePlaylistListResponse.m (85%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeVideoConversionPings.h => GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubePlaylistLocalization.h} (67%) create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubePlaylistLocalization.m rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubePlaylistPlayer.h (94%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubePlaylistPlayer.m (100%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubePlaylistSnippet.h (72%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubePlaylistSnippet.m (73%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubePlaylistStatus.h (93%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubePlaylistStatus.m (100%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubePromotedItem.h (86%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubePromotedItem.m (89%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubePromotedItemId.h (89%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubePromotedItemId.m (100%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubePropertyValue.h (91%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubePropertyValue.m (100%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeResourceId.h (89%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeResourceId.m (100%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeSearchListResponse.h (75%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeSearchListResponse.m (78%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeSearchResult.h (89%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeSearchResult.m (89%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeSearchResultSnippet.h (84%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeSearchResultSnippet.m (89%) create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeSponsor.h create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeSponsor.m create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeSponsorListResponse.h create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeSponsorListResponse.m create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeSponsorSnippet.h create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeSponsorSnippet.m rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeSubscription.h (84%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeSubscription.m (90%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeSubscriptionContentDetails.h (86%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeSubscriptionContentDetails.m (100%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeSubscriptionListResponse.h (79%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeSubscriptionListResponse.m (85%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeSubscriptionSnippet.h (83%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeSubscriptionSnippet.m (89%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeSubscriptionSubscriberSnippet.h (86%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeSubscriptionSubscriberSnippet.m (89%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeThumbnail.h (87%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeThumbnail.m (100%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeThumbnailDetails.h (83%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeThumbnailDetails.m (89%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeThumbnailSetResponse.h (85%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeThumbnailSetResponse.m (83%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeTokenPagination.h (100%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeTokenPagination.m (100%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeVideo.h (68%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeVideo.m (75%) create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeVideoAbuseReport.h create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeVideoAbuseReport.m create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeVideoAbuseReportReason.h create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeVideoAbuseReportReason.m create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeVideoAbuseReportReasonListResponse.h create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeVideoAbuseReportReasonListResponse.m create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeVideoAbuseReportReasonSnippet.h create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeVideoAbuseReportReasonSnippet.m create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeVideoAbuseReportSecondaryReason.h create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeVideoAbuseReportSecondaryReason.m rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeVideoAgeGating.h (88%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeVideoAgeGating.m (100%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeVideoCategory.h (88%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeVideoCategory.m (89%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeVideoCategoryListResponse.h (80%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeVideoCategoryListResponse.m (85%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeVideoCategorySnippet.h (88%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeVideoCategorySnippet.m (100%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeVideoContentDetails.h (83%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeVideoContentDetails.m (100%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeVideoContentDetailsRegionRestriction.h (92%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeVideoContentDetailsRegionRestriction.m (88%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeVideoFileDetails.h (80%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeVideoFileDetails.m (85%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeVideoFileDetailsAudioStream.h (85%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeVideoFileDetailsAudioStream.m (100%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeVideoFileDetailsVideoStream.h (79%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeVideoFileDetailsVideoStream.m (100%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeVideoGetRatingResponse.h (85%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeVideoGetRatingResponse.m (84%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeVideoListResponse.h (79%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeVideoListResponse.m (85%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeVideoLiveStreamingDetails.h (74%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeVideoLiveStreamingDetails.m (87%) create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeVideoLocalization.h create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeVideoLocalization.m rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeVideoMonetizationDetails.h (93%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeVideoMonetizationDetails.m (100%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeVideoPlayer.h (94%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeVideoPlayer.m (100%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeVideoProcessingDetails.h (84%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeVideoProcessingDetails.m (100%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeVideoProcessingDetailsProcessingProgress.h (89%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeVideoProcessingDetailsProcessingProgress.m (100%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeVideoProjectDetails.h (93%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeVideoProjectDetails.m (89%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeVideoRating.h (90%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeVideoRating.m (100%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeVideoRecordingDetails.h (88%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeVideoRecordingDetails.m (100%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeVideoSnippet.h (66%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeVideoSnippet.m (71%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeVideoStatistics.h (80%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeVideoStatistics.m (100%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeVideoStatus.h (81%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeVideoStatus.m (100%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeVideoSuggestions.h (85%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeVideoSuggestions.m (79%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeVideoSuggestionsTagSuggestion.h (92%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeVideoSuggestionsTagSuggestion.m (88%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeVideoTopicDetails.h (91%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeVideoTopicDetails.m (87%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeWatchSettings.h (88%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Services/YouTube/Generated/GTLYouTubeWatchSettings.m (100%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Utilities/GTLBase64.h (100%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Utilities/GTLBase64.m (100%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Utilities/GTLFramework.h (100%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Utilities/GTLFramework.m (100%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Utilities/GTLJSONParser.h (84%) create mode 100644 XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Utilities/GTLJSONParser.m rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Utilities/GTLTargetNamespace.h (100%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Utilities/GTLUtilities.h (80%) rename XCDYouTubeKit Demo/Pods/{Google-API-Client => GoogleAPIClient}/Source/Utilities/GTLUtilities.m (82%) create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GTMSessionFetcher/GTMGatherInputStream.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GTMSessionFetcher/GTMMIMEDocument.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GTMSessionFetcher/GTMReadMonitorInputStream.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GTMSessionFetcher/GTMSessionFetcher.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GTMSessionFetcher/GTMSessionFetcherLogging.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GTMSessionFetcher/GTMSessionFetcherService.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GTMSessionFetcher/GTMSessionUploadFetcher.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLBase64.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLBatchQuery.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLBatchResult.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLDateTime.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLDefines.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLErrorObject.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLFramework.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLJSONParser.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLObject.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLQuery.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLQueryYouTube.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLRuntimeCommon.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLService.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLServiceYouTube.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLTargetNamespace.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLUploadParameters.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLUtilities.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTube.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeAccessPolicy.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeActivity.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeActivityContentDetails.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeActivityContentDetailsBulletin.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeActivityContentDetailsChannelItem.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeActivityContentDetailsComment.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeActivityContentDetailsFavorite.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeActivityContentDetailsLike.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeActivityContentDetailsPlaylistItem.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeActivityContentDetailsPromotedItem.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeActivityContentDetailsRecommendation.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeActivityContentDetailsSocial.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeActivityContentDetailsSubscription.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeActivityContentDetailsUpload.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeActivityListResponse.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeActivitySnippet.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeCdnSettings.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeChannel.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeChannelAuditDetails.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeChannelBannerResource.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeChannelBrandingSettings.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeChannelContentDetails.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeChannelContentOwnerDetails.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeChannelConversionPing.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeChannelConversionPings.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeChannelListResponse.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeChannelLocalization.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeChannelSection.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeChannelSectionContentDetails.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeChannelSectionListResponse.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeChannelSectionSnippet.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeChannelSettings.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeChannelSnippet.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeChannelStatistics.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeChannelStatus.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeChannelTopicDetails.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeConstants.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeContentRating.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeGeoPoint.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeGuideCategory.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeGuideCategoryListResponse.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeGuideCategorySnippet.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeI18nLanguage.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeI18nLanguageListResponse.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeI18nLanguageSnippet.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeI18nRegion.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeI18nRegionListResponse.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeI18nRegionSnippet.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeImageSettings.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeIngestionInfo.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeInvideoBranding.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeInvideoPosition.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeInvideoPromotion.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeInvideoTiming.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeLanguageTag.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeLiveBroadcast.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeLiveBroadcastContentDetails.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeLiveBroadcastListResponse.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeLiveBroadcastSnippet.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeLiveBroadcastStatus.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeLiveStream.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeLiveStreamContentDetails.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeLiveStreamListResponse.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeLiveStreamSnippet.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeLiveStreamStatus.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeLocalizedProperty.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeLocalizedString.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeMonitorStreamInfo.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubePageInfo.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubePlaylist.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubePlaylistContentDetails.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubePlaylistItem.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubePlaylistItemContentDetails.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubePlaylistItemListResponse.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubePlaylistItemSnippet.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubePlaylistItemStatus.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubePlaylistListResponse.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubePlaylistPlayer.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubePlaylistSnippet.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubePlaylistStatus.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubePromotedItem.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubePromotedItemId.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubePropertyValue.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeResourceId.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeSearchListResponse.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeSearchResult.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeSearchResultSnippet.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeSubscription.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeSubscriptionContentDetails.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeSubscriptionListResponse.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeSubscriptionSnippet.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeSubscriptionSubscriberSnippet.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeThumbnail.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeThumbnailDetails.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeThumbnailSetResponse.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeTokenPagination.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeVideo.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeVideoAgeGating.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeVideoCategory.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeVideoCategoryListResponse.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeVideoCategorySnippet.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeVideoContentDetails.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeVideoContentDetailsRegionRestriction.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeVideoConversionPing.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeVideoConversionPings.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeVideoFileDetails.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeVideoFileDetailsAudioStream.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeVideoFileDetailsVideoStream.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeVideoGetRatingResponse.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeVideoListResponse.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeVideoLiveStreamingDetails.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeVideoMonetizationDetails.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeVideoPlayer.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeVideoProcessingDetails.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeVideoProcessingDetailsProcessingProgress.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeVideoProjectDetails.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeVideoRating.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeVideoRecordingDetails.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeVideoSnippet.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeVideoStatistics.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeVideoStatus.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeVideoSuggestions.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeVideoSuggestionsTagSuggestion.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeVideoTopicDetails.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/Google-API-Client/GTLYouTubeWatchSettings.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLBase64.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLBatchQuery.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLBatchResult.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLDateTime.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLDefines.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLErrorObject.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLFramework.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLJSONParser.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLObject.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLQuery.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLQueryYouTube.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLRuntimeCommon.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLService.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLServiceYouTube.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLTargetNamespace.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLUploadParameters.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLUtilities.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTube.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeAccessPolicy.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeActivity.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeActivityContentDetails.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeActivityContentDetailsBulletin.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeActivityContentDetailsChannelItem.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeActivityContentDetailsComment.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeActivityContentDetailsFavorite.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeActivityContentDetailsLike.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeActivityContentDetailsPlaylistItem.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeActivityContentDetailsPromotedItem.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeActivityContentDetailsRecommendation.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeActivityContentDetailsSocial.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeActivityContentDetailsSubscription.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeActivityContentDetailsUpload.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeActivityListResponse.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeActivitySnippet.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeCaption.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeCaptionListResponse.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeCaptionSnippet.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeCdnSettings.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeChannel.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeChannelAuditDetails.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeChannelBannerResource.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeChannelBrandingSettings.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeChannelContentDetails.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeChannelContentOwnerDetails.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeChannelConversionPing.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeChannelConversionPings.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeChannelListResponse.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeChannelLocalization.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeChannelProfileDetails.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeChannelSection.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeChannelSectionContentDetails.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeChannelSectionListResponse.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeChannelSectionLocalization.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeChannelSectionSnippet.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeChannelSectionTargeting.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeChannelSettings.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeChannelSnippet.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeChannelStatistics.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeChannelStatus.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeChannelTopicDetails.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeComment.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeCommentListResponse.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeCommentSnippet.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeCommentThread.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeCommentThreadListResponse.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeCommentThreadReplies.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeCommentThreadSnippet.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeConstants.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeContentRating.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeFanFundingEvent.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeFanFundingEventListResponse.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeFanFundingEventSnippet.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeGeoPoint.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeGuideCategory.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeGuideCategoryListResponse.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeGuideCategorySnippet.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeI18nLanguage.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeI18nLanguageListResponse.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeI18nLanguageSnippet.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeI18nRegion.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeI18nRegionListResponse.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeI18nRegionSnippet.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeImageSettings.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeIngestionInfo.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeInvideoBranding.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeInvideoPosition.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeInvideoPromotion.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeInvideoTiming.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeLanguageTag.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeLiveBroadcast.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeLiveBroadcastContentDetails.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeLiveBroadcastListResponse.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeLiveBroadcastSnippet.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeLiveBroadcastStatistics.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeLiveBroadcastStatus.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeLiveBroadcastTopic.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeLiveBroadcastTopicDetails.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeLiveBroadcastTopicSnippet.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeLiveChatBan.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeLiveChatBanSnippet.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeLiveChatFanFundingEventDetails.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeLiveChatMessage.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeLiveChatMessageAuthorDetails.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeLiveChatMessageListResponse.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeLiveChatMessageSnippet.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeLiveChatModerator.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeLiveChatModeratorListResponse.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeLiveChatModeratorSnippet.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeLiveChatTextMessageDetails.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeLiveStream.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeLiveStreamConfigurationIssue.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeLiveStreamContentDetails.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeLiveStreamHealthStatus.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeLiveStreamListResponse.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeLiveStreamSnippet.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeLiveStreamStatus.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeLocalizedProperty.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeLocalizedString.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeMonitorStreamInfo.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubePageInfo.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubePlaylist.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubePlaylistContentDetails.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubePlaylistItem.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubePlaylistItemContentDetails.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubePlaylistItemListResponse.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubePlaylistItemSnippet.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubePlaylistItemStatus.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubePlaylistListResponse.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubePlaylistLocalization.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubePlaylistPlayer.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubePlaylistSnippet.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubePlaylistStatus.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubePromotedItem.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubePromotedItemId.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubePropertyValue.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeResourceId.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeSearchListResponse.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeSearchResult.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeSearchResultSnippet.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeSponsor.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeSponsorListResponse.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeSponsorSnippet.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeSubscription.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeSubscriptionContentDetails.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeSubscriptionListResponse.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeSubscriptionSnippet.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeSubscriptionSubscriberSnippet.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeThumbnail.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeThumbnailDetails.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeThumbnailSetResponse.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeTokenPagination.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeVideo.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeVideoAbuseReport.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeVideoAbuseReportReason.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeVideoAbuseReportReasonListResponse.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeVideoAbuseReportReasonSnippet.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeVideoAbuseReportSecondaryReason.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeVideoAgeGating.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeVideoCategory.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeVideoCategoryListResponse.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeVideoCategorySnippet.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeVideoContentDetails.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeVideoContentDetailsRegionRestriction.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeVideoFileDetails.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeVideoFileDetailsAudioStream.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeVideoFileDetailsVideoStream.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeVideoGetRatingResponse.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeVideoListResponse.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeVideoLiveStreamingDetails.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeVideoLocalization.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeVideoMonetizationDetails.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeVideoPlayer.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeVideoProcessingDetails.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeVideoProcessingDetailsProcessingProgress.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeVideoProjectDetails.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeVideoRating.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeVideoRecordingDetails.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeVideoSnippet.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeVideoStatistics.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeVideoStatus.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeVideoSuggestions.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeVideoSuggestionsTagSuggestion.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeVideoTopicDetails.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/GoogleAPIClient/GTLYouTubeWatchSettings.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/gtm-http-fetcher/GTMGatherInputStream.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/gtm-http-fetcher/GTMHTTPFetchHistory.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/gtm-http-fetcher/GTMHTTPFetcher.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/gtm-http-fetcher/GTMHTTPFetcherLogViewController.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/gtm-http-fetcher/GTMHTTPFetcherLogging.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/gtm-http-fetcher/GTMHTTPFetcherService.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/gtm-http-fetcher/GTMHTTPUploadFetcher.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/gtm-http-fetcher/GTMMIMEDocument.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/gtm-http-fetcher/GTMReadMonitorInputStream.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/gtm-oauth2/GTMOAuth2Authentication.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Private/gtm-oauth2/GTMOAuth2SignIn.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GTMSessionFetcher/GTMGatherInputStream.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GTMSessionFetcher/GTMMIMEDocument.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GTMSessionFetcher/GTMReadMonitorInputStream.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GTMSessionFetcher/GTMSessionFetcher.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GTMSessionFetcher/GTMSessionFetcherLogging.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GTMSessionFetcher/GTMSessionFetcherService.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GTMSessionFetcher/GTMSessionUploadFetcher.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLBase64.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLBatchQuery.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLBatchResult.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLDateTime.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLDefines.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLErrorObject.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLFramework.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLJSONParser.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLObject.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLQuery.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLQueryYouTube.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLRuntimeCommon.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLService.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLServiceYouTube.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLTargetNamespace.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLUploadParameters.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLUtilities.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTube.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeAccessPolicy.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeActivity.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeActivityContentDetails.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeActivityContentDetailsBulletin.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeActivityContentDetailsChannelItem.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeActivityContentDetailsComment.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeActivityContentDetailsFavorite.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeActivityContentDetailsLike.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeActivityContentDetailsPlaylistItem.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeActivityContentDetailsPromotedItem.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeActivityContentDetailsRecommendation.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeActivityContentDetailsSocial.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeActivityContentDetailsSubscription.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeActivityContentDetailsUpload.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeActivityListResponse.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeActivitySnippet.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeCdnSettings.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeChannel.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeChannelAuditDetails.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeChannelBannerResource.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeChannelBrandingSettings.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeChannelContentDetails.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeChannelContentOwnerDetails.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeChannelConversionPing.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeChannelConversionPings.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeChannelListResponse.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeChannelLocalization.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeChannelSection.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeChannelSectionContentDetails.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeChannelSectionListResponse.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeChannelSectionSnippet.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeChannelSettings.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeChannelSnippet.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeChannelStatistics.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeChannelStatus.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeChannelTopicDetails.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeConstants.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeContentRating.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeGeoPoint.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeGuideCategory.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeGuideCategoryListResponse.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeGuideCategorySnippet.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeI18nLanguage.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeI18nLanguageListResponse.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeI18nLanguageSnippet.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeI18nRegion.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeI18nRegionListResponse.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeI18nRegionSnippet.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeImageSettings.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeIngestionInfo.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeInvideoBranding.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeInvideoPosition.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeInvideoPromotion.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeInvideoTiming.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeLanguageTag.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeLiveBroadcast.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeLiveBroadcastContentDetails.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeLiveBroadcastListResponse.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeLiveBroadcastSnippet.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeLiveBroadcastStatus.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeLiveStream.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeLiveStreamContentDetails.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeLiveStreamListResponse.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeLiveStreamSnippet.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeLiveStreamStatus.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeLocalizedProperty.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeLocalizedString.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeMonitorStreamInfo.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubePageInfo.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubePlaylist.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubePlaylistContentDetails.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubePlaylistItem.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubePlaylistItemContentDetails.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubePlaylistItemListResponse.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubePlaylistItemSnippet.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubePlaylistItemStatus.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubePlaylistListResponse.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubePlaylistPlayer.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubePlaylistSnippet.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubePlaylistStatus.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubePromotedItem.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubePromotedItemId.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubePropertyValue.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeResourceId.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeSearchListResponse.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeSearchResult.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeSearchResultSnippet.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeSubscription.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeSubscriptionContentDetails.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeSubscriptionListResponse.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeSubscriptionSnippet.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeSubscriptionSubscriberSnippet.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeThumbnail.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeThumbnailDetails.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeThumbnailSetResponse.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeTokenPagination.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeVideo.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeVideoAgeGating.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeVideoCategory.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeVideoCategoryListResponse.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeVideoCategorySnippet.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeVideoContentDetails.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeVideoContentDetailsRegionRestriction.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeVideoConversionPing.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeVideoConversionPings.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeVideoFileDetails.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeVideoFileDetailsAudioStream.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeVideoFileDetailsVideoStream.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeVideoGetRatingResponse.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeVideoListResponse.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeVideoLiveStreamingDetails.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeVideoMonetizationDetails.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeVideoPlayer.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeVideoProcessingDetails.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeVideoProcessingDetailsProcessingProgress.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeVideoProjectDetails.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeVideoRating.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeVideoRecordingDetails.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeVideoSnippet.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeVideoStatistics.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeVideoStatus.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeVideoSuggestions.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeVideoSuggestionsTagSuggestion.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeVideoTopicDetails.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/Google-API-Client/GTLYouTubeWatchSettings.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLBase64.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLBatchQuery.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLBatchResult.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLDateTime.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLDefines.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLErrorObject.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLFramework.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLJSONParser.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLObject.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLQuery.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLQueryYouTube.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLRuntimeCommon.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLService.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLServiceYouTube.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLTargetNamespace.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLUploadParameters.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLUtilities.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTube.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeAccessPolicy.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeActivity.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeActivityContentDetails.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeActivityContentDetailsBulletin.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeActivityContentDetailsChannelItem.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeActivityContentDetailsComment.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeActivityContentDetailsFavorite.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeActivityContentDetailsLike.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeActivityContentDetailsPlaylistItem.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeActivityContentDetailsPromotedItem.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeActivityContentDetailsRecommendation.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeActivityContentDetailsSocial.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeActivityContentDetailsSubscription.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeActivityContentDetailsUpload.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeActivityListResponse.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeActivitySnippet.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeCaption.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeCaptionListResponse.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeCaptionSnippet.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeCdnSettings.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeChannel.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeChannelAuditDetails.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeChannelBannerResource.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeChannelBrandingSettings.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeChannelContentDetails.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeChannelContentOwnerDetails.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeChannelConversionPing.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeChannelConversionPings.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeChannelListResponse.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeChannelLocalization.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeChannelProfileDetails.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeChannelSection.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeChannelSectionContentDetails.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeChannelSectionListResponse.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeChannelSectionLocalization.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeChannelSectionSnippet.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeChannelSectionTargeting.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeChannelSettings.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeChannelSnippet.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeChannelStatistics.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeChannelStatus.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeChannelTopicDetails.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeComment.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeCommentListResponse.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeCommentSnippet.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeCommentThread.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeCommentThreadListResponse.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeCommentThreadReplies.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeCommentThreadSnippet.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeConstants.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeContentRating.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeFanFundingEvent.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeFanFundingEventListResponse.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeFanFundingEventSnippet.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeGeoPoint.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeGuideCategory.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeGuideCategoryListResponse.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeGuideCategorySnippet.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeI18nLanguage.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeI18nLanguageListResponse.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeI18nLanguageSnippet.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeI18nRegion.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeI18nRegionListResponse.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeI18nRegionSnippet.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeImageSettings.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeIngestionInfo.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeInvideoBranding.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeInvideoPosition.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeInvideoPromotion.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeInvideoTiming.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeLanguageTag.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeLiveBroadcast.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeLiveBroadcastContentDetails.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeLiveBroadcastListResponse.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeLiveBroadcastSnippet.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeLiveBroadcastStatistics.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeLiveBroadcastStatus.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeLiveBroadcastTopic.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeLiveBroadcastTopicDetails.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeLiveBroadcastTopicSnippet.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeLiveChatBan.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeLiveChatBanSnippet.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeLiveChatFanFundingEventDetails.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeLiveChatMessage.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeLiveChatMessageAuthorDetails.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeLiveChatMessageListResponse.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeLiveChatMessageSnippet.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeLiveChatModerator.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeLiveChatModeratorListResponse.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeLiveChatModeratorSnippet.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeLiveChatTextMessageDetails.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeLiveStream.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeLiveStreamConfigurationIssue.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeLiveStreamContentDetails.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeLiveStreamHealthStatus.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeLiveStreamListResponse.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeLiveStreamSnippet.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeLiveStreamStatus.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeLocalizedProperty.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeLocalizedString.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeMonitorStreamInfo.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubePageInfo.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubePlaylist.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubePlaylistContentDetails.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubePlaylistItem.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubePlaylistItemContentDetails.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubePlaylistItemListResponse.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubePlaylistItemSnippet.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubePlaylistItemStatus.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubePlaylistListResponse.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubePlaylistLocalization.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubePlaylistPlayer.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubePlaylistSnippet.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubePlaylistStatus.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubePromotedItem.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubePromotedItemId.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubePropertyValue.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeResourceId.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeSearchListResponse.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeSearchResult.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeSearchResultSnippet.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeSponsor.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeSponsorListResponse.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeSponsorSnippet.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeSubscription.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeSubscriptionContentDetails.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeSubscriptionListResponse.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeSubscriptionSnippet.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeSubscriptionSubscriberSnippet.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeThumbnail.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeThumbnailDetails.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeThumbnailSetResponse.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeTokenPagination.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeVideo.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeVideoAbuseReport.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeVideoAbuseReportReason.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeVideoAbuseReportReasonListResponse.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeVideoAbuseReportReasonSnippet.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeVideoAbuseReportSecondaryReason.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeVideoAgeGating.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeVideoCategory.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeVideoCategoryListResponse.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeVideoCategorySnippet.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeVideoContentDetails.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeVideoContentDetailsRegionRestriction.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeVideoFileDetails.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeVideoFileDetailsAudioStream.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeVideoFileDetailsVideoStream.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeVideoGetRatingResponse.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeVideoListResponse.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeVideoLiveStreamingDetails.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeVideoLocalization.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeVideoMonetizationDetails.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeVideoPlayer.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeVideoProcessingDetails.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeVideoProcessingDetailsProcessingProgress.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeVideoProjectDetails.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeVideoRating.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeVideoRecordingDetails.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeVideoSnippet.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeVideoStatistics.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeVideoStatus.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeVideoSuggestions.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeVideoSuggestionsTagSuggestion.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeVideoTopicDetails.h create mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/GoogleAPIClient/GTLYouTubeWatchSettings.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/gtm-http-fetcher/GTMGatherInputStream.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/gtm-http-fetcher/GTMHTTPFetchHistory.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/gtm-http-fetcher/GTMHTTPFetcher.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/gtm-http-fetcher/GTMHTTPFetcherLogViewController.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/gtm-http-fetcher/GTMHTTPFetcherLogging.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/gtm-http-fetcher/GTMHTTPFetcherService.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/gtm-http-fetcher/GTMHTTPUploadFetcher.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/gtm-http-fetcher/GTMMIMEDocument.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/gtm-http-fetcher/GTMReadMonitorInputStream.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/gtm-oauth2/GTMOAuth2Authentication.h delete mode 120000 XCDYouTubeKit Demo/Pods/Headers/Public/gtm-oauth2/GTMOAuth2SignIn.h create mode 100644 XCDYouTubeKit Demo/Pods/Target Support Files/CocoaLumberjack-OSX/CocoaLumberjack-OSX-dummy.m rename XCDYouTubeKit Demo/Pods/Target Support Files/{Pods-XCDYouTubeKit OS X Demo-CocoaLumberjack/Pods-XCDYouTubeKit OS X Demo-CocoaLumberjack-prefix.pch => CocoaLumberjack-OSX/CocoaLumberjack-OSX-prefix.pch} (100%) rename XCDYouTubeKit Demo/Pods/Target Support Files/{Pods-XCDYouTubeKit OS X Demo-CocoaLumberjack/Pods-XCDYouTubeKit OS X Demo-CocoaLumberjack.xcconfig => CocoaLumberjack-OSX/CocoaLumberjack-OSX.xcconfig} (58%) create mode 100644 XCDYouTubeKit Demo/Pods/Target Support Files/CocoaLumberjack-iOS/CocoaLumberjack-iOS-dummy.m rename XCDYouTubeKit Demo/Pods/Target Support Files/{Google-API-Client/Google-API-Client-prefix.pch => CocoaLumberjack-iOS/CocoaLumberjack-iOS-prefix.pch} (100%) rename XCDYouTubeKit Demo/Pods/Target Support Files/{Pods-XCDYouTubeKit iOS Demo-CocoaLumberjack/Pods-XCDYouTubeKit iOS Demo-CocoaLumberjack.xcconfig => CocoaLumberjack-iOS/CocoaLumberjack-iOS.xcconfig} (58%) create mode 100644 XCDYouTubeKit Demo/Pods/Target Support Files/GTMSessionFetcher/GTMSessionFetcher-dummy.m rename XCDYouTubeKit Demo/Pods/Target Support Files/{Pods-XCDYouTubeKit iOS Demo-CocoaLumberjack/Pods-XCDYouTubeKit iOS Demo-CocoaLumberjack-prefix.pch => GTMSessionFetcher/GTMSessionFetcher-prefix.pch} (100%) create mode 100644 XCDYouTubeKit Demo/Pods/Target Support Files/GTMSessionFetcher/GTMSessionFetcher.xcconfig delete mode 100644 XCDYouTubeKit Demo/Pods/Target Support Files/Google-API-Client/Google-API-Client-dummy.m delete mode 100644 XCDYouTubeKit Demo/Pods/Target Support Files/Google-API-Client/Google-API-Client.xcconfig create mode 100644 XCDYouTubeKit Demo/Pods/Target Support Files/GoogleAPIClient/GoogleAPIClient-dummy.m rename XCDYouTubeKit Demo/Pods/Target Support Files/{Pods-XCDYouTubeKit iOS Demo-NSLogger/Pods-XCDYouTubeKit iOS Demo-NSLogger-prefix.pch => GoogleAPIClient/GoogleAPIClient-prefix.pch} (100%) create mode 100644 XCDYouTubeKit Demo/Pods/Target Support Files/GoogleAPIClient/GoogleAPIClient.xcconfig create mode 100644 XCDYouTubeKit Demo/Pods/Target Support Files/NSLogger-OSX/NSLogger-OSX-dummy.m rename XCDYouTubeKit Demo/Pods/Target Support Files/{Pods-XCDYouTubeKit OS X Demo-NSLogger/Pods-XCDYouTubeKit OS X Demo-NSLogger-prefix.pch => NSLogger-OSX/NSLogger-OSX-prefix.pch} (100%) rename XCDYouTubeKit Demo/Pods/Target Support Files/{Pods-XCDYouTubeKit OS X Demo-NSLogger/Pods-XCDYouTubeKit OS X Demo-NSLogger.xcconfig => NSLogger-OSX/NSLogger-OSX.xcconfig} (68%) create mode 100644 XCDYouTubeKit Demo/Pods/Target Support Files/NSLogger-iOS/NSLogger-iOS-dummy.m rename XCDYouTubeKit Demo/Pods/Target Support Files/{Pods-XCDYouTubeKit iOS Demo-XCDLumberjackNSLogger/Pods-XCDYouTubeKit iOS Demo-XCDLumberjackNSLogger-prefix.pch => NSLogger-iOS/NSLogger-iOS-prefix.pch} (100%) rename XCDYouTubeKit Demo/Pods/Target Support Files/{Pods-XCDYouTubeKit iOS Demo-NSLogger/Pods-XCDYouTubeKit iOS Demo-NSLogger.xcconfig => NSLogger-iOS/NSLogger-iOS.xcconfig} (66%) delete mode 100644 XCDYouTubeKit Demo/Pods/Target Support Files/Pods-XCDYouTubeKit OS X Demo-CocoaLumberjack/Pods-XCDYouTubeKit OS X Demo-CocoaLumberjack-dummy.m delete mode 100644 XCDYouTubeKit Demo/Pods/Target Support Files/Pods-XCDYouTubeKit OS X Demo-NSLogger/Pods-XCDYouTubeKit OS X Demo-NSLogger-dummy.m delete mode 100644 XCDYouTubeKit Demo/Pods/Target Support Files/Pods-XCDYouTubeKit OS X Demo-XCDLumberjackNSLogger/Pods-XCDYouTubeKit OS X Demo-XCDLumberjackNSLogger-dummy.m delete mode 100644 XCDYouTubeKit Demo/Pods/Target Support Files/Pods-XCDYouTubeKit OS X Demo-XCDLumberjackNSLogger/Pods-XCDYouTubeKit OS X Demo-XCDLumberjackNSLogger.xcconfig delete mode 100644 XCDYouTubeKit Demo/Pods/Target Support Files/Pods-XCDYouTubeKit iOS Demo-CocoaLumberjack/Pods-XCDYouTubeKit iOS Demo-CocoaLumberjack-dummy.m delete mode 100644 XCDYouTubeKit Demo/Pods/Target Support Files/Pods-XCDYouTubeKit iOS Demo-NSLogger/Pods-XCDYouTubeKit iOS Demo-NSLogger-dummy.m delete mode 100644 XCDYouTubeKit Demo/Pods/Target Support Files/Pods-XCDYouTubeKit iOS Demo-XCDLumberjackNSLogger/Pods-XCDYouTubeKit iOS Demo-XCDLumberjackNSLogger-dummy.m delete mode 100644 XCDYouTubeKit Demo/Pods/Target Support Files/Pods-XCDYouTubeKit iOS Demo-XCDLumberjackNSLogger/Pods-XCDYouTubeKit iOS Demo-XCDLumberjackNSLogger.xcconfig create mode 100644 XCDYouTubeKit Demo/Pods/Target Support Files/XCDLumberjackNSLogger-OSX/XCDLumberjackNSLogger-OSX-dummy.m rename XCDYouTubeKit Demo/Pods/Target Support Files/{Pods-XCDYouTubeKit OS X Demo-XCDLumberjackNSLogger/Pods-XCDYouTubeKit OS X Demo-XCDLumberjackNSLogger-prefix.pch => XCDLumberjackNSLogger-OSX/XCDLumberjackNSLogger-OSX-prefix.pch} (100%) create mode 100644 XCDYouTubeKit Demo/Pods/Target Support Files/XCDLumberjackNSLogger-OSX/XCDLumberjackNSLogger-OSX.xcconfig create mode 100644 XCDYouTubeKit Demo/Pods/Target Support Files/XCDLumberjackNSLogger-iOS/XCDLumberjackNSLogger-iOS-dummy.m rename XCDYouTubeKit Demo/Pods/Target Support Files/{gtm-http-fetcher/gtm-http-fetcher-prefix.pch => XCDLumberjackNSLogger-iOS/XCDLumberjackNSLogger-iOS-prefix.pch} (100%) create mode 100644 XCDYouTubeKit Demo/Pods/Target Support Files/XCDLumberjackNSLogger-iOS/XCDLumberjackNSLogger-iOS.xcconfig delete mode 100644 XCDYouTubeKit Demo/Pods/Target Support Files/gtm-http-fetcher/gtm-http-fetcher-dummy.m delete mode 100644 XCDYouTubeKit Demo/Pods/Target Support Files/gtm-http-fetcher/gtm-http-fetcher.xcconfig delete mode 100644 XCDYouTubeKit Demo/Pods/Target Support Files/gtm-oauth2/gtm-oauth2-dummy.m delete mode 100644 XCDYouTubeKit Demo/Pods/Target Support Files/gtm-oauth2/gtm-oauth2-prefix.pch delete mode 100644 XCDYouTubeKit Demo/Pods/Target Support Files/gtm-oauth2/gtm-oauth2.xcconfig delete mode 100644 XCDYouTubeKit Demo/Pods/gtm-http-fetcher/README.txt delete mode 100644 XCDYouTubeKit Demo/Pods/gtm-http-fetcher/Source/GTMGatherInputStream.h delete mode 100644 XCDYouTubeKit Demo/Pods/gtm-http-fetcher/Source/GTMGatherInputStream.m delete mode 100755 XCDYouTubeKit Demo/Pods/gtm-http-fetcher/Source/GTMHTTPFetchHistory.h delete mode 100755 XCDYouTubeKit Demo/Pods/gtm-http-fetcher/Source/GTMHTTPFetchHistory.m delete mode 100755 XCDYouTubeKit Demo/Pods/gtm-http-fetcher/Source/GTMHTTPFetcher.h delete mode 100755 XCDYouTubeKit Demo/Pods/gtm-http-fetcher/Source/GTMHTTPFetcher.m delete mode 100644 XCDYouTubeKit Demo/Pods/gtm-http-fetcher/Source/GTMHTTPFetcherLogViewController.h delete mode 100644 XCDYouTubeKit Demo/Pods/gtm-http-fetcher/Source/GTMHTTPFetcherLogViewController.m delete mode 100644 XCDYouTubeKit Demo/Pods/gtm-http-fetcher/Source/GTMHTTPFetcherLogging.m delete mode 100755 XCDYouTubeKit Demo/Pods/gtm-http-fetcher/Source/GTMHTTPFetcherService.h delete mode 100755 XCDYouTubeKit Demo/Pods/gtm-http-fetcher/Source/GTMHTTPFetcherService.m delete mode 100755 XCDYouTubeKit Demo/Pods/gtm-http-fetcher/Source/GTMHTTPUploadFetcher.h delete mode 100755 XCDYouTubeKit Demo/Pods/gtm-http-fetcher/Source/GTMHTTPUploadFetcher.m delete mode 100644 XCDYouTubeKit Demo/Pods/gtm-http-fetcher/Source/GTMMIMEDocument.h delete mode 100644 XCDYouTubeKit Demo/Pods/gtm-http-fetcher/Source/GTMMIMEDocument.m delete mode 100644 XCDYouTubeKit Demo/Pods/gtm-http-fetcher/Source/GTMReadMonitorInputStream.h delete mode 100644 XCDYouTubeKit Demo/Pods/gtm-http-fetcher/Source/GTMReadMonitorInputStream.m delete mode 100644 XCDYouTubeKit Demo/Pods/gtm-oauth2/Source/GTMOAuth2Authentication.h delete mode 100644 XCDYouTubeKit Demo/Pods/gtm-oauth2/Source/GTMOAuth2Authentication.m delete mode 100644 XCDYouTubeKit Demo/Pods/gtm-oauth2/Source/GTMOAuth2SignIn.h delete mode 100644 XCDYouTubeKit Demo/Pods/gtm-oauth2/Source/GTMOAuth2SignIn.m diff --git a/XCDYouTubeKit Demo/Podfile b/XCDYouTubeKit Demo/Podfile index c87ce977c..d81fa3469 100644 --- a/XCDYouTubeKit Demo/Podfile +++ b/XCDYouTubeKit Demo/Podfile @@ -18,7 +18,22 @@ target 'XCDYouTubeKit OS X Demo' do end target 'XCDYouTubeKit tvOS Demo' do + # cocoapods-expert-difficulty is required because GoogleAPIClient and its dependencies do not (yet?) officialy support the tvos platform plugin 'cocoapods-expert-difficulty' platform :tvos, '9.0' - pod 'Google-API-Client/YouTube', '~> 1.0.422' + pod 'GoogleAPIClient/YouTube', '~> 1.0' + + # since the pods do not have a tvos deployment target defined CocoaPods adds '-DOS_OBJECT_USE_OBJC=0' in the compiler flags, see https://github.com/CocoaPods/CocoaPods/blob/e610bef264b6f4406af3c4ef8d3ad1a9286a0fc9/lib/cocoapods/installer/target_installer/pod_target_installer.rb#L286-L288 + post_install do |installer| + installer.pods_project.targets.each do |target| + target.source_build_phase.files.each do |build_file| + if build_file.settings + compiler_flags = build_file.settings['COMPILER_FLAGS'] + if compiler_flags + build_file.settings['COMPILER_FLAGS'] = compiler_flags.gsub('-DOS_OBJECT_USE_OBJC=0', '') + end + end + end + end + end end diff --git a/XCDYouTubeKit Demo/Podfile.lock b/XCDYouTubeKit Demo/Podfile.lock index c6cd3a8a4..573bd9419 100644 --- a/XCDYouTubeKit Demo/Podfile.lock +++ b/XCDYouTubeKit Demo/Podfile.lock @@ -7,16 +7,16 @@ PODS: - CocoaLumberjack/Core - CocoaLumberjack/Extensions (2.0.1): - CocoaLumberjack/Default - - Google-API-Client/Common (1.0.422): - - gtm-http-fetcher (~> 1.0.141) - - gtm-oauth2 (~> 1.0.125) - - Google-API-Client/YouTube (1.0.422): - - Google-API-Client/Common - - gtm-http-fetcher (~> 1.0.141) - - gtm-oauth2 (~> 1.0.125) - - gtm-http-fetcher (1.0.141) - - gtm-oauth2 (1.0.126): - - gtm-http-fetcher (~> 1.0.141) + - GoogleAPIClient/Core (1.0.2): + - GTMSessionFetcher (~> 1.1) + - GoogleAPIClient/YouTube (1.0.2): + - GoogleAPIClient/Core + - GTMSessionFetcher (~> 1.1) + - GTMSessionFetcher (1.1.1): + - GTMSessionFetcher/Full (= 1.1.1) + - GTMSessionFetcher/Core (1.1.1) + - GTMSessionFetcher/Full (1.1.1): + - GTMSessionFetcher/Core (= 1.1.1) - NSLogger (1.5.1): - NSLogger/Standard (= 1.5.1) - NSLogger/Standard (1.5.1) @@ -25,15 +25,16 @@ PODS: - NSLogger (~> 1.5.1) DEPENDENCIES: - - Google-API-Client/YouTube (~> 1.0.422) + - GoogleAPIClient/YouTube (~> 1.0) - XCDLumberjackNSLogger (~> 1.0.0) SPEC CHECKSUMS: CocoaLumberjack: 019d1361244274a6138c788c6cb80baabc13fb8f - Google-API-Client: cb712cf122f1d7fda966de4c2bc551324573366c - gtm-http-fetcher: 6d4617e7d343b6e4c082b777541c334eb6f5d81e - gtm-oauth2: 2a18b824e4f8a02df6cfe987beb59ae9d9697f9d + GoogleAPIClient: 712000bb597c05f3a7664cd786c5cf7c569a6452 + GTMSessionFetcher: 2704a6e2811e3344ba9dc3314cae0d26850f73c5 NSLogger: 5ed223a2436df96244e033be750656dacdeec034 XCDLumberjackNSLogger: 867392d7b40490e1b15aac9c1acee0952bf33d61 -COCOAPODS: 0.39.0 +PODFILE CHECKSUM: 9f4b084a2d9b0c007bc4e320634f11e62222d56d + +COCOAPODS: 1.0.0.beta.7 diff --git a/XCDYouTubeKit Demo/Pods/GTMSessionFetcher/LICENSE b/XCDYouTubeKit Demo/Pods/GTMSessionFetcher/LICENSE new file mode 100644 index 000000000..d64569567 --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GTMSessionFetcher/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/XCDYouTubeKit Demo/Pods/GTMSessionFetcher/README.md b/XCDYouTubeKit Demo/Pods/GTMSessionFetcher/README.md new file mode 100644 index 000000000..9c0d345d8 --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GTMSessionFetcher/README.md @@ -0,0 +1,23 @@ +# Google Toolbox for Mac - Session Fetcher # + +**Project site**
+**Discussion group** + +[![Build Status](https://travis-ci.org/google/gtm-session-fetcher.svg?branch=master)](https://travis-ci.org/google/gtm-session-fetcher) + +`GTMSessionFetcher` makes it easy for Cocoa applications to perform http +operations. The fetcher is implemented as a wrapper on `NSURLSession`, so its +behavior is asynchronous and uses operating-system settings on iOS and Mac OS X. + +Features include: +- Simple to build; only one source/header file pair is required +- Simple to use: takes just two lines of code to fetch a request +- Supports upload and download sessions +- Flexible cookie storage +- Automatic retry on errors, with exponential backoff +- Support for generating multipart MIME upload streams +- Easy, convenient logging of http requests and responses +- Supports plug-in authentication such as with gtm-oauth2 +- Easily testable; self-mocking +- Automatic rate limiting when created by the `GTMSessionFetcherService` factory class +- Fully independent of other projects diff --git a/XCDYouTubeKit Demo/Pods/GTMSessionFetcher/Source/GTMGatherInputStream.h b/XCDYouTubeKit Demo/Pods/GTMSessionFetcher/Source/GTMGatherInputStream.h new file mode 100644 index 000000000..ec3c0125d --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GTMSessionFetcher/Source/GTMGatherInputStream.h @@ -0,0 +1,52 @@ +/* Copyright 2014 Google Inc. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 + +#ifndef GTM_NONNULL + #if defined(__has_attribute) + #if __has_attribute(nonnull) + #define GTM_NONNULL(x) __attribute__((nonnull x)) + #else + #define GTM_NONNULL(x) + #endif + #else + #define GTM_NONNULL(x) + #endif +#endif + +// Avoid multiple declaration of this class. +// +// Note: This should match the declaration of GTMGatherInputStream in GTMMIMEDocument.m + +#ifndef GTM_GATHERINPUTSTREAM_DECLARED +#define GTM_GATHERINPUTSTREAM_DECLARED + +@interface GTMGatherInputStream : NSInputStream + ++ (NSInputStream *)streamWithArray:(NSArray *)dataArray GTM_NONNULL((1)); + +@end + +#endif // GTM_GATHERINPUTSTREAM_DECLARED diff --git a/XCDYouTubeKit Demo/Pods/GTMSessionFetcher/Source/GTMGatherInputStream.m b/XCDYouTubeKit Demo/Pods/GTMSessionFetcher/Source/GTMGatherInputStream.m new file mode 100644 index 000000000..0f65310ff --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GTMSessionFetcher/Source/GTMGatherInputStream.m @@ -0,0 +1,185 @@ +/* Copyright 2014 Google Inc. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + +#import "GTMGatherInputStream.h" + +@implementation GTMGatherInputStream { + 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. + NSStreamStatus _streamStatus; + id __weak _delegate; // Stream delegate, defaults to self. +} + ++ (NSInputStream *)streamWithArray:(NSArray *)dataArray { + return [(GTMGatherInputStream *)[self alloc] initWithArray:dataArray]; +} + +- (instancetype)initWithArray:(NSArray *)dataArray { + self = [super init]; + if (self) { + _dataArray = dataArray; + _delegate = self; // An NSStream's default delegate should be self. + } + return self; +} + +#pragma mark - NSStream + +- (void)open { + _arrayIndex = 0; + _dataOffset = 0; + _streamStatus = NSStreamStatusOpen; +} + +- (void)close { + _streamStatus = NSStreamStatusClosed; +} + +- (id)delegate { + return _delegate; +} + +- (void)setDelegate:(id)delegate { + if (delegate == nil) { + _delegate = self; + } else { + _delegate = delegate; + } +} + +- (id)propertyForKey:(NSString *)key { + if ([key isEqual:NSStreamFileCurrentOffsetKey]) { + return @([self absoluteOffset]); + } + return nil; +} + +- (BOOL)setProperty:(id)property forKey:(NSString *)key { + if ([key isEqual:NSStreamFileCurrentOffsetKey]) { + NSNumber *absoluteOffsetNumber = property; + [self setAbsoluteOffset:absoluteOffsetNumber.longLongValue]; + return YES; + } + return NO; +} + +- (void)scheduleInRunLoop:(NSRunLoop *)aRunLoop forMode:(NSString *)mode { +} + +- (void)removeFromRunLoop:(NSRunLoop *)aRunLoop forMode:(NSString *)mode { +} + +- (NSStreamStatus)streamStatus { + return _streamStatus; +} + +- (NSError *)streamError { + return nil; +} + +#pragma mark - NSInputStream + +- (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 (_arrayIndex >= _dataArray.count) { + _streamStatus = NSStreamStatusAtEnd; + } + 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 - NSStreamDelegate + +- (void)stream:(NSStream *)theStream handleEvent:(NSStreamEvent)streamEvent { + id delegate = _delegate; + if (delegate != self) { + [delegate stream:self handleEvent:streamEvent]; + } +} + +#pragma mark - Private + +- (long long)absoluteOffset { + long long absoluteOffset = 0; + NSUInteger index = 0; + for (NSData *data in _dataArray) { + if (index >= _arrayIndex) { + break; + } + absoluteOffset += data.length; + ++index; + } + absoluteOffset += _dataOffset; + return absoluteOffset; +} + +- (void)setAbsoluteOffset:(long long)absoluteOffset { + if (absoluteOffset < 0) { + absoluteOffset = 0; + } + _arrayIndex = 0; + _dataOffset = absoluteOffset; + for (NSData *data in _dataArray) { + long long dataLen = (long long) data.length; + if (dataLen > _dataOffset) { + break; + } + _arrayIndex++; + _dataOffset -= dataLen; + } + if (_arrayIndex == _dataArray.count) { + if (_dataOffset > 0) { + _dataOffset = 0; + } + } +} + +@end diff --git a/XCDYouTubeKit Demo/Pods/GTMSessionFetcher/Source/GTMMIMEDocument.h b/XCDYouTubeKit Demo/Pods/GTMSessionFetcher/Source/GTMMIMEDocument.h new file mode 100644 index 000000000..c6b579ceb --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GTMSessionFetcher/Source/GTMMIMEDocument.h @@ -0,0 +1,150 @@ +/* Copyright 2014 Google Inc. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 or parse a MIME document. + +// To create a MIME document, allocate a new GTMMIMEDocument and start adding parts. +// When you are done adding parts, call generateInputStream or generateDispatchData. +// +// A good reference for MIME is http://en.wikipedia.org/wiki/MIME + +#import + +#ifndef GTM_NONNULL + #if defined(__has_attribute) + #if __has_attribute(nonnull) + #define GTM_NONNULL(x) __attribute__((nonnull x)) + #else + #define GTM_NONNULL(x) + #endif + #else + #define GTM_NONNULL(x) + #endif +#endif + +#ifndef GTM_DECLARE_GENERICS + #if __has_feature(objc_generics) \ + && ((!TARGET_OS_IPHONE && defined(MAC_OS_X_VERSION_10_11) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_11) \ + || (TARGET_OS_IPHONE && defined(__IPHONE_9_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_9_0)) + #define GTM_DECLARE_GENERICS 1 + #else + #define GTM_DECLARE_GENERICS 0 + #endif +#endif + +#ifndef GTM_NSArrayOf + #if GTM_DECLARE_GENERICS + #define GTM_NSArrayOf(value) NSArray + #define GTM_NSDictionaryOf(key, value) NSDictionary + #else + #define GTM_NSArrayOf(value) NSArray + #define GTM_NSDictionaryOf(key, value) NSDictionary + #endif // GTM_DECLARE_GENERICS +#endif // GTM_NSArrayOf + + +// GTMMIMEDocumentPart represents a part of a MIME document. +// +// +[GTMMIMEDocument MIMEPartsWithBoundary:data:] returns an array of these. +@interface GTMMIMEDocumentPart : NSObject + +@property(nonatomic, readonly) GTM_NSDictionaryOf(NSString *, NSString *) *headers; +@property(nonatomic, readonly) NSData *headerData; +@property(nonatomic, readonly) NSData *body; +@property(nonatomic, readonly) NSUInteger length; + ++ (instancetype)partWithHeaders:(NSDictionary *)headers body:(NSData *)body; + +@end + +@interface GTMMIMEDocument : NSObject + +// Get or set the unique boundary for the parts that have been added. +// +// When creating a MIME document from parts, this is typically calculated +// automatically after all parts have been added. +@property(nonatomic, copy) NSString *boundary; + +#pragma mark - Methods for Creating a MIME Document + ++ (instancetype)MIMEDocument; + +// Adds a new part to this mime document with the given headers and body. +// The headers keys and values should be NSStrings. +// Adding a part may cause the boundary string to change. +- (void)addPartWithHeaders:(GTM_NSDictionaryOf(NSString *, NSString *) *)headers + body:(NSData *)body GTM_NONNULL((1,2)); + +// An inputstream that can be used to efficiently read the contents of the MIME document. +// +// Any parameter may be null if the result is not wanted. +- (void)generateInputStream:(NSInputStream **)outStream + length:(unsigned long long *)outLength + boundary:(NSString **)outBoundary; + +// A dispatch_data_t with the contents of the MIME document. +// +// Note: dispatch_data_t is one-way toll-free bridged so the result +// may be cast directly to NSData *. +// +// Any parameter may be null if the result is not wanted. +- (void)generateDispatchData:(dispatch_data_t *)outDispatchData + length:(unsigned long long *)outLength + boundary:(NSString **)outBoundary; + +// Utility method for making a header section, including trailing newlines. ++ (NSData *)dataWithHeaders:(GTM_NSDictionaryOf(NSString *, NSString *) *)headers; + +#pragma mark - Methods for Parsing a MIME Document + +// Method for parsing out an array of MIME parts from a MIME document. +// +// Returns an array of GTMMIMEDocumentParts. Returns nil if no part can +// be found. ++ (GTM_NSArrayOf(GTMMIMEDocumentPart *) *)MIMEPartsWithBoundary:(NSString *)boundary + data:(NSData *)fullDocumentData; + +// Utility method for efficiently searching possibly discontiguous NSData +// for occurrences of target byte. This method does not "flatten" an NSData +// that is composed of discontiguous blocks. +// +// The byte offsets of non-overlapping occurrences of the target are returned as +// NSNumbers in the array. ++ (void)searchData:(NSData *)data + targetBytes:(const void *)targetBytes + targetLength:(NSUInteger)targetLength + foundOffsets:(GTM_NSArrayOf(NSNumber *) **)outFoundOffsets; + +// Utility method to parse header bytes into an NSDictionary. ++ (GTM_NSDictionaryOf(NSString *, NSString *) *)headersWithData:(NSData *)data; + +// ------ UNIT TESTING ONLY BELOW ------ + +// Internal methods, exposed for unit testing only. +- (void)seedRandomWith:(u_int32_t)seed; + ++ (NSUInteger)findBytesWithNeedle:(const unsigned char *)needle + needleLength:(NSUInteger)needleLength + haystack:(const unsigned char *)haystack + haystackLength:(NSUInteger)haystackLength + foundOffset:(NSUInteger *)foundOffset; + ++ (void)searchData:(NSData *)data + targetBytes:(const void *)targetBytes + targetLength:(NSUInteger)targetLength + foundOffsets:(GTM_NSArrayOf(NSNumber *) **)outFoundOffsets + foundBlockNumbers:(GTM_NSArrayOf(NSNumber *) **)outFoundBlockNumbers; + +@end diff --git a/XCDYouTubeKit Demo/Pods/GTMSessionFetcher/Source/GTMMIMEDocument.m b/XCDYouTubeKit Demo/Pods/GTMSessionFetcher/Source/GTMMIMEDocument.m new file mode 100644 index 000000000..675610cd3 --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GTMSessionFetcher/Source/GTMMIMEDocument.m @@ -0,0 +1,631 @@ +/* Copyright 2014 Google Inc. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + +#import "GTMMIMEDocument.h" + +// Avoid a hard dependency on GTMGatherInputStream. +#ifndef GTM_GATHERINPUTSTREAM_DECLARED +#define GTM_GATHERINPUTSTREAM_DECLARED + +@interface GTMGatherInputStream : NSInputStream + ++ (NSInputStream *)streamWithArray:(NSArray *)dataArray GTM_NONNULL((1)); + +@end +#endif // GTM_GATHERINPUTSTREAM_DECLARED + +// FindBytes +// +// Helper routine to search for the existence of a set of bytes (needle) within +// a presumed larger set of bytes (haystack). Can find the first part of the +// needle at the very end of the haystack. +// +// Returns the needle length on complete success, the number of bytes matched +// if a partial needle was found at the end of the haystack, and 0 on failure. +static NSUInteger FindBytes(const unsigned char *needle, NSUInteger needleLen, + const unsigned char *haystack, NSUInteger haystackLen, + NSUInteger *foundOffset); + +// SearchDataForBytes +// +// This implements the functionality of the +searchData: methods below. See the documentation +// for those methods. +static void SearchDataForBytes(NSData *data, const void *targetBytes, NSUInteger targetLength, + NSMutableArray *foundOffsets, NSMutableArray *foundBlockNumbers); + +@implementation GTMMIMEDocumentPart { + NSDictionary *_headers; + NSData *_headerData; // Header content including the ending "\r\n". + NSData *_bodyData; +} + +@synthesize headers = _headers, + headerData = _headerData, + body = _bodyData; + +@dynamic length; + ++ (instancetype)partWithHeaders:(NSDictionary *)headers body:(NSData *)body { + return [[self alloc] initWithHeaders:headers body:body]; +} + +- (instancetype)initWithHeaders:(NSDictionary *)headers body:(NSData *)body { + self = [super init]; + if (self) { + _bodyData = body; + _headers = headers; + } + return self; +} + +// Returns true if the part's header or data 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 search code rather than strcpy because the encoded data may contain + // null values. + NSData *headerData = self.headerData; + return (FindBytes(bytes, length, headerData.bytes, headerData.length, NULL) == length || + FindBytes(bytes, length, _bodyData.bytes, _bodyData.length, NULL) == length); +} + +- (NSData *)headerData { + if (!_headerData) { + _headerData = [GTMMIMEDocument dataWithHeaders:_headers]; + } + return _headerData; +} + +- (NSData *)body { + return _bodyData; +} + +- (NSUInteger)length { + return _headerData.length + _bodyData.length; +} + +- (NSString *)description { + return [NSString stringWithFormat:@"%@ %p (headers %tu keys, body %tu bytes)", + [self class], self, _headers.count, _bodyData.length]; +} + +- (BOOL)isEqual:(GTMMIMEDocumentPart *)other { + if (self == other) return YES; + if (![other isKindOfClass:[GTMMIMEDocumentPart class]]) return NO; + return ((_bodyData == other->_bodyData || [_bodyData isEqual:other->_bodyData]) + && (_headers == other->_headers || [_headers isEqual:other->_headers])); +} + +- (NSUInteger)hash { + return _bodyData.hash | _headers.hash; +} + +@end + +@implementation GTMMIMEDocument { + NSMutableArray *_parts; // Ordered array of GTMMIMEDocumentParts. + unsigned long long _length; // Length in bytes of the document. + NSString *_boundary; + u_int32_t _randomSeed; // For testing. +} + ++ (instancetype)MIMEDocument { + return [[self alloc] init]; +} + +- (instancetype)init { + self = [super init]; + if (self) { + _parts = [[NSMutableArray alloc] init]; + } + return self; +} + +- (NSString *)description { + return [NSString stringWithFormat:@"%@ %p (%tu parts)", + [self class], self, _parts.count]; +} + +#pragma mark - Joining Parts + +// Adds a new part to this mime document with the given headers and body. +- (void)addPartWithHeaders:(NSDictionary *)headers body:(NSData *)body { + GTMMIMEDocumentPart *part = [GTMMIMEDocumentPart partWithHeaders:headers body:body]; + [_parts addObject:part]; + _boundary = nil; +} + +// 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; + _boundary = nil; +} + +- (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 *)boundary { + if (_boundary) { + return _boundary; + } + + // Use an easily-readable boundary string. + NSString *const kBaseBoundary = @"END_OF_PART"; + + _boundary = 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 (GTMMIMEDocumentPart *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)setBoundary:(NSString *)str { + _boundary = [str copy]; +} + +// Internal method. +- (void)generateDataArray:(NSMutableArray *)dataArray + 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.boundary; + + 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. + unsigned long long length = 0; + + for (GTMMIMEDocumentPart *part in _parts) { + [dataArray addObject:mainBoundaryData]; + [dataArray addObject:part.headerData]; + [dataArray addObject:part.body]; + + length += part.length + mainBoundaryData.length; + } + + [dataArray addObject:endBoundaryData]; + length += endBoundaryData.length; + + if (outLength) *outLength = length; + if (outBoundary) *outBoundary = boundary; +} + +- (void)generateInputStream:(NSInputStream **)outStream + length:(unsigned long long *)outLength + boundary:(NSString **)outBoundary { + NSMutableArray *dataArray = outStream ? [NSMutableArray array] : nil; + [self generateDataArray:dataArray + length:outLength + boundary:outBoundary]; + + if (outStream) { + Class streamClass = NSClassFromString(@"GTMGatherInputStream"); + NSAssert(streamClass != nil, @"GTMGatherInputStream not available."); + + *outStream = [streamClass streamWithArray:dataArray]; + } +} + +- (void)generateDispatchData:(dispatch_data_t *)outDispatchData + length:(unsigned long long *)outLength + boundary:(NSString **)outBoundary { + NSMutableArray *dataArray = outDispatchData ? [NSMutableArray array] : nil; + [self generateDataArray:dataArray + length:outLength + boundary:outBoundary]; + + if (outDispatchData) { + // Create an empty data accumulator. + dispatch_data_t dataAccumulator; + + dispatch_queue_t bgQueue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); + + for (NSData *partData in dataArray) { + __block NSData *immutablePartData = [partData copy]; + dispatch_data_t newDataPart = + dispatch_data_create(immutablePartData.bytes, immutablePartData.length, bgQueue, ^{ + // We want the data retained until this block executes. + immutablePartData = nil; + }); + + if (dataAccumulator == nil) { + // First part. + dataAccumulator = newDataPart; + } else { + // Append the additional part. + dataAccumulator = dispatch_data_create_concat(dataAccumulator, newDataPart); + } + } + *outDispatchData = dataAccumulator; + } +} + ++ (NSData *)dataWithHeaders:(NSDictionary *)headers { + // Generate the header data by coalescing the dictionary as lines of "key: value\r\n". + 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"]; + } + + 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"]; + + NSData *result = [headerString dataUsingEncoding:NSUTF8StringEncoding]; + return result; +} + +#pragma mark - Separating Parts + ++ (NSArray *)MIMEPartsWithBoundary:(NSString *)boundary + data:(NSData *)fullDocumentData { + // In MIME documents, the boundary is preceded by CRLF and two dashes, and followed + // at the end by two dashes. + NSData *boundaryData = [boundary dataUsingEncoding:NSUTF8StringEncoding]; + NSUInteger boundaryLength = boundaryData.length; + + NSMutableArray *foundBoundaryOffsets; + [self searchData:fullDocumentData + targetBytes:boundaryData.bytes + targetLength:boundaryLength + foundOffsets:&foundBoundaryOffsets]; + + // According to rfc1341, ignore anything before the first boundary, or after the last, though two + // dashes are expected to follow the last boundary. + if (foundBoundaryOffsets.count < 2) { + return nil; + } + + // Wrap the full document data with a dispatch_data_t for more efficient slicing + // and dicing. + dispatch_data_t dataWrapper; + if ([fullDocumentData conformsToProtocol:@protocol(OS_dispatch_data)]) { + dataWrapper = (dispatch_data_t)fullDocumentData; + } else { + // A no-op self invocation on fullDocumentData will keep it retained until the block is invoked. + dispatch_queue_t bgQueue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); + dataWrapper = dispatch_data_create(fullDocumentData.bytes, + fullDocumentData.length, + bgQueue, ^{ [fullDocumentData self]; }); + } + NSMutableArray *parts; + NSInteger previousBoundaryOffset = -1; + NSInteger partCounter = -1; + NSInteger numberOfPartsWithHeaders = 0; + for (NSNumber *currentBoundaryOffset in foundBoundaryOffsets) { + ++partCounter; + if (previousBoundaryOffset == -1) { + // This is the first boundary. + previousBoundaryOffset = currentBoundaryOffset.integerValue; + continue; + } else { + // Create a part data subrange between the previous boundary and this one. + // + // The last four bytes before a boundary are CRLF--. + // The first two bytes following a boundary are either CRLF or, for the last boundary, --. + NSInteger previousPartDataStartOffset = + previousBoundaryOffset + (NSInteger)boundaryLength + 2; + NSInteger previousPartDataEndOffset = currentBoundaryOffset.integerValue - 4; + NSInteger previousPartDataLength = previousPartDataEndOffset - previousPartDataStartOffset; + + if (previousPartDataLength < 2) { + // The preceding part was too short to be useful. +#if DEBUG + NSLog(@"MIME part %zd has %zd bytes", partCounter - 1, previousPartDataLength); +#endif + } else { + if (!parts) parts = [NSMutableArray array]; + + dispatch_data_t partData = + dispatch_data_create_subrange(dataWrapper, + (size_t)previousPartDataStartOffset, (size_t)previousPartDataLength); + // Scan the part data for the separator between headers and body. After the CRLF, + // either the headers start immediately, or there's another CRLF and there are no headers. + // + // We need to map the part data to get the first two bytes. (Or we could cast it to + // NSData and get the bytes pointer of that.) If we're concerned that a single part + // data may be expensive to map, we could make a subrange here for just the first two bytes, + // and map that two-byte subrange. + const void *partDataBuffer; + size_t partDataBufferSize; + dispatch_data_t mappedPartData NS_VALID_UNTIL_END_OF_SCOPE = + dispatch_data_create_map(partData, &partDataBuffer, &partDataBufferSize); + dispatch_data_t bodyData; + NSDictionary *headers; + BOOL hasAnotherCRLF = (((char *)partDataBuffer)[0] == '\r' + && ((char *)partDataBuffer)[1] == '\n'); + mappedPartData = nil; + + if (hasAnotherCRLF) { + // There are no headers; skip the CRLF to get to the body, and leave headers nil. + bodyData = dispatch_data_create_subrange(partData, 2, (size_t)previousPartDataLength - 2); + } else { + // There are part headers. They are separated from body data by CRLFCRLF. + NSArray *crlfOffsets; + [self searchData:(NSData *)partData + targetBytes:"\r\n\r\n" + targetLength:4 + foundOffsets:&crlfOffsets]; + if (crlfOffsets.count == 0) { +#if DEBUG + // We could not distinguish body and headers. + NSLog(@"MIME part %zd lacks a header separator: %@", partCounter - 1, + [[NSString alloc] initWithData:(NSData *)partData encoding:NSUTF8StringEncoding]); +#endif + } else { + NSInteger headerSeparatorOffset = ((NSNumber *)crlfOffsets.firstObject).integerValue; + dispatch_data_t headerData = + dispatch_data_create_subrange(partData, 0, (size_t)headerSeparatorOffset); + headers = [self headersWithData:(NSData *)headerData]; + + bodyData = dispatch_data_create_subrange(partData, (size_t)headerSeparatorOffset + 4, + (size_t)(previousPartDataLength - (headerSeparatorOffset + 4))); + + numberOfPartsWithHeaders++; + } // crlfOffsets.count == 0 + } // hasAnotherCRLF + GTMMIMEDocumentPart *part = [GTMMIMEDocumentPart partWithHeaders:headers + body:(NSData *)bodyData]; + [parts addObject:part]; + } // previousPartDataLength < 2 + previousBoundaryOffset = currentBoundaryOffset.integerValue; + } + } +#if DEBUG + // In debug builds, warn if a reasonably long document lacks any CRLF characters. + if (numberOfPartsWithHeaders == 0) { + NSUInteger length = fullDocumentData.length; + if (length > 20) { // Reasonably long. + NSMutableArray *foundCRLFs; + [self searchData:fullDocumentData + targetBytes:"\r\n" + targetLength:2 + foundOffsets:&foundCRLFs]; + if (foundCRLFs.count == 0) { + // Parts were logged above (due to lacking header separators.) + NSLog(@"Warning: MIME document lacks any headers (may have wrong line endings)"); + } + } + } +#endif // DEBUG + return parts; +} + +// Efficiently search the supplied data for the target bytes. +// +// This uses enumerateByteRangesUsingBlock: to scan for bytes. It can find +// the target even if it spans multiple separate byte ranges. +// +// Returns an array of found byte offset values, as NSNumbers. ++ (void)searchData:(NSData *)data + targetBytes:(const void *)targetBytes + targetLength:(NSUInteger)targetLength + foundOffsets:(GTM_NSArrayOf(NSNumber *) **)outFoundOffsets { + NSMutableArray *foundOffsets = [NSMutableArray array]; + SearchDataForBytes(data, targetBytes, targetLength, foundOffsets, NULL); + *outFoundOffsets = foundOffsets; +} + + +// This version of searchData: also returns the block numbers (0-based) where the +// target was found, used for testing that the supplied dispatch_data buffer +// has not been flattened. ++ (void)searchData:(NSData *)data + targetBytes:(const void *)targetBytes + targetLength:(NSUInteger)targetLength + foundOffsets:(GTM_NSArrayOf(NSNumber *) **)outFoundOffsets + foundBlockNumbers:(GTM_NSArrayOf(NSNumber *) **)outFoundBlockNumbers { + NSMutableArray *foundOffsets = [NSMutableArray array]; + NSMutableArray *foundBlockNumbers = [NSMutableArray array]; + + SearchDataForBytes(data, targetBytes, targetLength, foundOffsets, foundBlockNumbers); + *outFoundOffsets = foundOffsets; + *outFoundBlockNumbers = foundBlockNumbers; +} + +static void SearchDataForBytes(NSData *data, const void *targetBytes, NSUInteger targetLength, + NSMutableArray *foundOffsets, NSMutableArray *foundBlockNumbers) { + __block NSUInteger priorPartialMatchAmount = 0; + __block NSInteger priorPartialMatchStartingBlockNumber = -1; + __block NSInteger blockNumber = -1; + + [data enumerateByteRangesUsingBlock:^(const void *bytes, + NSRange byteRange, + BOOL *stop) { + // Search for the first character in the current range. + const void *ptr = bytes; + NSInteger remainingInCurrentRange = (NSInteger)byteRange.length; + ++blockNumber; + + if (priorPartialMatchAmount > 0) { + NSUInteger amountRemainingToBeMatched = targetLength - priorPartialMatchAmount; + NSUInteger remainingFoundOffset; + NSUInteger amountMatched = FindBytes(targetBytes + priorPartialMatchAmount, + amountRemainingToBeMatched, + ptr, (NSUInteger)remainingInCurrentRange, &remainingFoundOffset); + if (amountMatched == 0 || remainingFoundOffset > 0) { + // No match of the rest of the prior partial match in this range. + } else if (amountMatched < amountRemainingToBeMatched) { + // Another partial match; we're done with this range. + priorPartialMatchAmount = priorPartialMatchAmount + amountMatched; + return; + } else { + // The offset is in an earlier range. + NSUInteger offset = byteRange.location - priorPartialMatchAmount; + [foundOffsets addObject:@(offset)]; + [foundBlockNumbers addObject:@(priorPartialMatchStartingBlockNumber)]; + priorPartialMatchStartingBlockNumber = -1; + } + priorPartialMatchAmount = 0; + } + + while (remainingInCurrentRange > 0) { + NSUInteger offsetFromPtr; + NSUInteger amountMatched = FindBytes(targetBytes, targetLength, ptr, + (NSUInteger)remainingInCurrentRange, &offsetFromPtr); + if (amountMatched == 0) { + // No match in this range. + return; + } + if (amountMatched < targetLength) { + // Found a partial target. If there's another range, we'll check for the rest. + priorPartialMatchAmount = amountMatched; + priorPartialMatchStartingBlockNumber = blockNumber; + return; + } + // Found the full target. + NSUInteger globalOffset = byteRange.location + (NSUInteger)(ptr - bytes) + offsetFromPtr; + + [foundOffsets addObject:@(globalOffset)]; + [foundBlockNumbers addObject:@(blockNumber)]; + + ptr += targetLength + offsetFromPtr; + remainingInCurrentRange -= (targetLength + offsetFromPtr); + } + }]; +} + +// Internal method only for testing; this calls through the static method. ++ (NSUInteger)findBytesWithNeedle:(const unsigned char *)needle + needleLength:(NSUInteger)needleLength + haystack:(const unsigned char *)haystack + haystackLength:(NSUInteger)haystackLength + foundOffset:(NSUInteger *)foundOffset { + return FindBytes(needle, needleLength, haystack, haystackLength, foundOffset); +} + +// Utility method to parse header bytes into an NSDictionary. ++ (NSDictionary *)headersWithData:(NSData *)data { + NSString *headersString = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; + if (!headersString) return nil; + + NSMutableDictionary *headers = [NSMutableDictionary dictionary]; + NSScanner *scanner = [NSScanner scannerWithString:headersString]; + // The scanner is skipping leading whitespace and newline characters by default. + NSCharacterSet *newlineCharacters = [NSCharacterSet newlineCharacterSet]; + NSString *key; + NSString *value; + while ([scanner scanUpToString:@":" intoString:&key] + && [scanner scanString:@":" intoString:NULL] + && [scanner scanUpToCharactersFromSet:newlineCharacters intoString:&value]) { + [headers setObject:value forKey:key]; + // Discard the trailing newline. + [scanner scanCharactersFromSet:newlineCharacters intoString:NULL]; + } + return headers; +} + +@end + +// Return how much of the needle was found in the haystack. +// +// If the result is less than needleLen, then the beginning of the needle +// was found at the end of the haystack. +static NSUInteger FindBytes(const unsigned char* needle, NSUInteger needleLen, + const unsigned char* haystack, NSUInteger haystackLen, + NSUInteger *foundOffset) { + const unsigned char *ptr = haystack; + NSInteger remain = (NSInteger)haystackLen; + // Assume memchr is an efficient way to find a match for the first + // byte of the needle, and memcmp is an efficient way to compare a + // range of bytes. + while (remain > 0 && (ptr = memchr(ptr, needle[0], (size_t)remain)) != 0) { + // The first character is present. + NSUInteger offset = (NSUInteger)(ptr - haystack); + remain = (NSInteger)(haystackLen - offset); + + NSUInteger amountToCompare = MIN((NSUInteger)remain, needleLen); + if (memcmp(ptr, needle, amountToCompare) == 0) { + if (foundOffset) *foundOffset = offset; + return amountToCompare; + } + ptr++; + remain--; + } + if (foundOffset) *foundOffset = 0; + return 0; +} diff --git a/XCDYouTubeKit Demo/Pods/GTMSessionFetcher/Source/GTMReadMonitorInputStream.h b/XCDYouTubeKit Demo/Pods/GTMSessionFetcher/Source/GTMReadMonitorInputStream.h new file mode 100644 index 000000000..4c799a348 --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GTMSessionFetcher/Source/GTMReadMonitorInputStream.h @@ -0,0 +1,49 @@ +/* Copyright 2014 Google Inc. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 + +#ifndef GTM_NONNULL + #if defined(__has_attribute) + #if __has_attribute(nonnull) + #define GTM_NONNULL(x) __attribute__((nonnull x)) + #else + #define GTM_NONNULL(x) + #endif + #else + #define GTM_NONNULL(x) + #endif +#endif + + +@interface GTMReadMonitorInputStream : NSInputStream + ++ (instancetype)inputStreamWithStream:(NSInputStream *)input GTM_NONNULL((1)); + +- (instancetype)initWithStream:(NSInputStream *)input GTM_NONNULL((1)); + +// The read monitor selector is called when bytes have been read. It should have this signature: +// +// - (void)inputStream:(GTMReadMonitorInputStream *)stream +// readIntoBuffer:(uint8_t *)buffer +// length:(int64_t)length; + +@property(weak) id readDelegate; +@property(assign) SEL readSelector; + +// Modes for invoking callbacks, when necessary. +@property(strong) NSArray *runLoopModes; + +@end diff --git a/XCDYouTubeKit Demo/Pods/GTMSessionFetcher/Source/GTMReadMonitorInputStream.m b/XCDYouTubeKit Demo/Pods/GTMSessionFetcher/Source/GTMReadMonitorInputStream.m new file mode 100644 index 000000000..53a01728b --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GTMSessionFetcher/Source/GTMReadMonitorInputStream.m @@ -0,0 +1,187 @@ +/* Copyright 2014 Google Inc. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + +#import "GTMReadMonitorInputStream.h" + +@implementation GTMReadMonitorInputStream { + 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. +} + + +@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]]; +} + +- (BOOL)respondsToSelector:(SEL)selector { + return [_inputStream respondsToSelector:selector]; +} + +- (NSMethodSignature*)methodSignatureForSelector:(SEL)selector { + return [_inputStream methodSignatureForSelector:selector]; +} + +- (void)forwardInvocation:(NSInvocation*)invocation { + [invocation invokeWithTarget:_inputStream]; +} + +#pragma mark - + ++ (instancetype)inputStreamWithStream:(NSInputStream *)input { + return [[self alloc] initWithStream:input]; +} + +- (instancetype)initWithStream:(NSInputStream *)input { + self = [super init]; + if (self) { + _inputStream = input; + _thread = [NSThread currentThread]; + } + return self; +} + +- (instancetype)init { + [self doesNotRecognizeSelector:_cmd]; + return nil; +} + +#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) { + if (_readDelegate && _readSelector) { + // Call the read selector with the buffer and number of bytes actually read into it. + BOOL isOnOriginalThread = [_thread isEqual:[NSThread currentThread]]; + if (isOnOriginalThread) { + // Invoke immediately. + NSData *data = [NSData dataWithBytesNoCopy:buffer + length:(NSUInteger)numRead + freeWhenDone:NO]; + [self invokeReadSelectorWithBuffer:data]; + } else { + // Copy the buffer into an NSData to be retained by the performSelector, + // and invoke on the proper thread. + SEL sel = @selector(invokeReadSelectorWithBuffer:); + 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; + int64_t length = (int64_t)data.length; + + id argSelf = self; + id readDelegate = _readDelegate; + if (readDelegate) { + NSMethodSignature *signature = [readDelegate methodSignatureForSelector:_readSelector]; + NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature]; + [invocation setSelector:_readSelector]; + [invocation setTarget:readDelegate]; + [invocation setArgument:&argSelf 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/XCDYouTubeKit Demo/Pods/GTMSessionFetcher/Source/GTMSessionFetcher.h b/XCDYouTubeKit Demo/Pods/GTMSessionFetcher/Source/GTMSessionFetcher.h new file mode 100644 index 000000000..a82500611 --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GTMSessionFetcher/Source/GTMSessionFetcher.h @@ -0,0 +1,1215 @@ +/* Copyright 2014 Google Inc. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// GTMSessionFetcher is a wrapper around NSURLSession for http operations. +// +// What does this offer on top of of NSURLSession? +// +// - Block-style callbacks for useful functionality like progress rather +// than delegate methods. +// - Out-of-process uploads and downloads using NSURLSession, including +// management of fetches after relaunch. +// - Integration with GTMOAuth2 for invisible management and refresh of +// authorization tokens. +// - Pretty-printed http logging. +// - Cookies handling that does not interfere with or get interfered with +// by WebKit cookies or on Mac by Safari and other apps. +// - Credentials handling for the http operation. +// - Rate-limiting and cookie grouping when fetchers are created with +// GTMSessionFetcherService. +// +// If the bodyData or bodyFileURL property is set, then a POST request is assumed. +// +// Each fetcher is assumed to be for a one-shot fetch request; don't reuse the object +// for a second fetch. +// +// The fetcher will be self-retained as long as a connection is pending. +// +// To keep user activity private, URLs must have an https scheme (unless the property +// allowedInsecureSchemes is set to permit the scheme.) +// +// Callbacks will be released when the fetch completes or is stopped, so there is no need +// to use weak self references in the callback blocks. +// +// Sample usage: +// +// _fetcherService = [[GTMSessionFetcherService alloc] init]; +// +// GTMSessionFetcher *myFetcher = [_fetcherService fetcherWithURLString:myURLString]; +// myFetcher.retryEnabled = YES; +// myFetcher.comment = @"First profile image"; +// +// // Optionally specify a file URL or NSData for the request body to upload. +// myFetcher.bodyData = [postString dataUsingEncoding:NSUTF8StringEncoding]; +// +// [myFetcher beginFetchWithCompletionHandler:^(NSData *data, NSError *error) { +// if (error != nil) { +// // Server status code or network error. +// // +// // If the domain is kGTMSessionFetcherStatusDomain then the error code +// // is a failure status from the server. +// } else { +// // Fetch succeeded. +// } +// }]; +// +// There is also a beginFetch call that takes a pointer and selector for the completion handler; +// a pointer and selector is a better style when the callback is a substantial, separate method. +// +// NOTE: Fetches may retrieve data from the server even though the server +// returned an error, so the criteria for success is a non-nil error. +// The completion handler is called when the server status is >= 300 with an NSError +// having domain kGTMSessionFetcherStatusDomain and code set to the server status. +// +// Status codes are at +// +// +// Background session support: +// +// Out-of-process uploads and downloads may be created by setting the fetcher's +// useBackgroundSession property. Data to be uploaded should be provided via +// the uploadFileURL property; the download destination should be specified with +// the destinationFileURL. NOTE: Background upload files should be in a location +// that will be valid even after the device is restarted, so the file should not +// be uploaded from a system temporary or cache directory. +// +// Background session transfers are slower, and should typically be used only +// or very large downloads or uploads (hundreds of megabytes). +// +// When background sessions are used in iOS apps, the application delegate must +// pass through the parameters from UIApplicationDelegate's +// application:handleEventsForBackgroundURLSession:completionHandler: to the +// fetcher class. +// +// When the application has been relaunched, it may also create a new fetcher +// instance to handle completion of the transfers. +// +// - (void)application:(UIApplication *)application +// handleEventsForBackgroundURLSession:(NSString *)identifier +// completionHandler:(void (^)())completionHandler { +// // Application was re-launched on completing an out-of-process download. +// +// // Pass the URLSession info related to this re-launch to the fetcher class. +// [GTMSessionFetcher application:application +// handleEventsForBackgroundURLSession:identifier +// completionHandler:completionHandler]; +// +// // Get a fetcher related to this re-launch and re-hook up a completionHandler to it. +// GTMSessionFetcher *fetcher = [GTMSessionFetcher fetcherWithSessionIdentifier:identifier]; +// NSURL *destinationFileURL = fetcher.destinationFileURL; +// fetcher.completionHandler = ^(NSData *data, NSError *error) { +// [self downloadCompletedToFile:destinationFileURL error:error]; +// }; +// } +// +// +// Threading and queue support: +// +// Networking always happens on a background thread; there is no advantage to +// changing thread or queue to create or start a fetcher. +// +// Callbacks are run on the main thread; alternatively, the app may set the +// fetcher's callbackQueue to a dispatch queue. +// +// Once the fetcher's beginFetch method has been called, the fetcher's methods and +// properties may be accessed from any thread. +// +// Downloading to disk: +// +// To have downloaded data saved directly to disk, specify a file URL for the +// destinationFileURL property. +// +// HTTP methods and headers: +// +// Alternative HTTP methods, like PUT, and custom headers can be specified by +// creating the fetcher with an appropriate NSMutableURLRequest +// +// +// Caching: +// +// The fetcher avoids caching. That is best for API requests, but may hurt +// repeat fetches of static data. Apps may enable a persistent disk cache by +// customizing the config: +// +// fetcher.configurationBlock = ^(GTMSessionFetcher *configFetcher, +// NSURLSessionConfiguration *config) { +// config.URLCache = [NSURLCache sharedURLCache]; +// }; +// +// Or use the standard system config to share cookie storage with web views +// and to enable disk caching: +// +// fetcher.configuration = [NSURLSessionConfiguration defaultSessionConfiguration]; +// +// +// Cookies: +// +// There are three supported mechanisms for remembering cookies between fetches. +// +// By default, a standalone GTMSessionFetcher uses a mutable array held +// statically to track cookies for all instantiated fetchers. This avoids +// cookies being set by servers for the application from interfering with +// Safari and WebKit cookie settings, and vice versa. +// The fetcher cookies are lost when the application quits. +// +// To rely instead on WebKit's global NSHTTPCookieStorage, set the fetcher's +// cookieStorage property: +// myFetcher.cookieStorage = [NSHTTPCookieStorage sharedHTTPCookieStorage]; +// +// To share cookies with other apps, use the method introduced in iOS 9/OS X 10.11: +// myFetcher.cookieStorage = +// [NSHTTPCookieStorage sharedCookieStorageForGroupContainerIdentifier:kMyCompanyContainedID]; +// +// To ignore existing cookies and only have cookies related to the single fetch +// be applied, make a temporary cookie storage object: +// myFetcher.cookieStorage = [[GTMSessionCookieStorage alloc] init]; +// +// Note: cookies set while following redirects will be sent to the server, as +// the redirects are followed by the fetcher. +// +// To completely disable cookies, similar to setting cookieStorageMethod to +// kGTMHTTPFetcherCookieStorageMethodNone, adjust the session configuration +// appropriately in the fetcher or fetcher service: +// fetcher.configurationBlock = ^(GTMSessionFetcher *configFetcher, +// NSURLSessionConfiguration *config) { +// config.HTTPCookieAcceptPolicy = NSHTTPCookieAcceptPolicyNever; +// config.HTTPShouldSetCookies = NO; +// }; +// +// If the fetcher is created from a GTMSessionFetcherService object +// then the cookie storage mechanism is set to use the cookie storage in the +// service object rather than the static storage. Disabling cookies in the +// session configuration set on a service object will disable cookies for all +// fetchers created from that GTMSessionFetcherService object, since the session +// configuration is propagated to the fetcher. +// +// +// Monitoring data transfers. +// +// The fetcher supports a variety of properties for progress monitoring +// progress with callback blocks. +// GTMSessionFetcherSendProgressBlock sendProgressBlock +// GTMSessionFetcherReceivedProgressBlock receivedProgressBlock +// GTMSessionFetcherDownloadProgressBlock downloadProgressBlock +// +// 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; 502, gateway failure; +// 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.retryEnabled = YES; +// +// With retries enabled, the completion 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.maxRetryInterval = 60.0; // in seconds; default is 60 seconds +// // for downloads, 600 for uploads +// +// Servers should never send a 400 or 500 status for errors that are retryable +// by clients, as those values indicate permanent failures. In nearly all +// cases, the default standard retry behavior is correct for clients, and no +// custom client retry behavior is needed or appropriate. Servers that send +// non-retryable status codes and expect the client to retry the request are +// faulty. +// +// Still, the client may provide a block to determine if a status code or other +// error should be retried. The block returns 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 kGTMSessionFetcherStatusDomain. The +// user's method may look something like this: +// +// myFetcher.retryBlock = ^(BOOL suggestedWillRetry, NSError *error, +// GTMSessionFetcherRetryResponse response) { +// // Perhaps examine error.domain and error.code, or fetcher.retryCount +// // +// // Respond with 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. +// response(suggestedWillRetry); +// }; + + +#import + +#if TARGET_OS_IPHONE +#import +#endif + +// Logs in debug builds. +#ifndef GTMSESSION_LOG_DEBUG + #if DEBUG + #define GTMSESSION_LOG_DEBUG(...) NSLog(__VA_ARGS__) + #else + #define GTMSESSION_LOG_DEBUG(...) do { } while (0) + #endif +#endif + +// Asserts in debug builds (or logs in debug builds if GTMSESSION_ASSERT_AS_LOG +// or NS_BLOCK_ASSERTIONS are defined.) +#ifndef GTMSESSION_ASSERT_DEBUG + #if DEBUG && !defined(NS_BLOCK_ASSERTIONS) && !GTMSESSION_ASSERT_AS_LOG + #undef GTMSESSION_ASSERT_AS_LOG + #define GTMSESSION_ASSERT_AS_LOG 1 + #endif + + #if DEBUG && !GTMSESSION_ASSERT_AS_LOG + #define GTMSESSION_ASSERT_DEBUG(...) NSAssert(__VA_ARGS__) + #elif DEBUG + #define GTMSESSION_ASSERT_DEBUG(pred, ...) if (!(pred)) { NSLog(__VA_ARGS__); } + #else + #define GTMSESSION_ASSERT_DEBUG(pred, ...) do { } while (0) + #endif +#endif + +// Asserts in debug builds, logs in release builds (or logs in debug builds if +// GTMSESSION_ASSERT_AS_LOG is defined.) +#ifndef GTMSESSION_ASSERT_DEBUG_OR_LOG + #if DEBUG && !GTMSESSION_ASSERT_AS_LOG + #define GTMSESSION_ASSERT_DEBUG_OR_LOG(...) NSAssert(__VA_ARGS__) + #else + #define GTMSESSION_ASSERT_DEBUG_OR_LOG(pred, ...) if (!(pred)) { NSLog(__VA_ARGS__); } + #endif +#endif + +// Macro useful for examining messages from NSURLSession during debugging. +#if 0 +#define GTM_LOG_SESSION_DELEGATE(...) GTMSESSION_LOG_DEBUG(__VA_ARGS__) +#else +#define GTM_LOG_SESSION_DELEGATE(...) +#endif + +#ifndef GTM_NULLABLE + #if __has_feature(nullability) // Available starting in Xcode 6.3 + #define GTM_NULLABLE_TYPE __nullable + #define GTM_NONNULL_TYPE __nonnull + #define GTM_NULLABLE nullable + #define GTM_NONNULL_DECL nonnull // GTM_NONNULL is used by GTMDefines.h + #define GTM_NULL_RESETTABLE null_resettable + + #define GTM_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN + #define GTM_ASSUME_NONNULL_END NS_ASSUME_NONNULL_END + #else + #define GTM_NULLABLE_TYPE + #define GTM_NONNULL_TYPE + #define GTM_NULLABLE + #define GTM_NONNULL_DECL + #define GTM_NULL_RESETTABLE + #define GTM_ASSUME_NONNULL_BEGIN + #define GTM_ASSUME_NONNULL_END + #endif // __has_feature(nullability) +#endif // GTM_NULLABLE + +#ifndef GTM_DECLARE_GENERICS + #if __has_feature(objc_generics) \ + && ((!TARGET_OS_IPHONE && defined(MAC_OS_X_VERSION_10_11) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_11) \ + || (TARGET_OS_IPHONE && defined(__IPHONE_9_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_9_0)) + #define GTM_DECLARE_GENERICS 1 + #else + #define GTM_DECLARE_GENERICS 0 + #endif +#endif + +#ifndef GTM_NSArrayOf + #if GTM_DECLARE_GENERICS + #define GTM_NSArrayOf(value) NSArray + #define GTM_NSDictionaryOf(key, value) NSDictionary + #else + #define GTM_NSArrayOf(value) NSArray + #define GTM_NSDictionaryOf(key, value) NSDictionary + #endif // __has_feature(objc_generics) +#endif // GTM_NSArrayOf + +// For iOS, the fetcher can declare itself a background task to allow fetches +// to finish when the app leaves the foreground. +// +// (This is unrelated to providing a background configuration, which allows +// out-of-process uploads and downloads.) +// +// To disallow use of background tasks during fetches, the target should define +// GTM_BACKGROUND_TASK_FETCHING to 0, or alternatively may set the +// skipBackgroundTask property to YES. +#if TARGET_OS_IPHONE && !defined(GTM_BACKGROUND_TASK_FETCHING) + #define GTM_BACKGROUND_TASK_FETCHING 1 +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +#if (!TARGET_OS_IPHONE && defined(MAC_OS_X_VERSION_10_11) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_11) \ + || (TARGET_OS_IPHONE && defined(__IPHONE_9_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_9_0) + #ifndef GTM_USE_SESSION_FETCHER + #define GTM_USE_SESSION_FETCHER 1 + #endif + + #define GTMSESSION_DEPRECATE_OLD_ENUMS 1 +#endif + +#if !defined(GTMBridgeFetcher) + // These bridge macros should be identical in GTMHTTPFetcher.h and GTMSessionFetcher.h + #if GTM_USE_SESSION_FETCHER + // Macros to new fetcher class. + #define GTMBridgeFetcher GTMSessionFetcher + #define GTMBridgeFetcherService GTMSessionFetcherService + #define GTMBridgeFetcherServiceProtocol GTMSessionFetcherServiceProtocol + #define GTMBridgeAssertValidSelector GTMSessionFetcherAssertValidSelector + #define GTMBridgeCookieStorage GTMSessionCookieStorage + #define GTMBridgeCleanedUserAgentString GTMFetcherCleanedUserAgentString + #define GTMBridgeSystemVersionString GTMFetcherSystemVersionString + #define GTMBridgeApplicationIdentifier GTMFetcherApplicationIdentifier + #define kGTMBridgeFetcherStatusDomain kGTMSessionFetcherStatusDomain + #define kGTMBridgeFetcherStatusBadRequest GTMSessionFetcherStatusBadRequest + #else + // Macros to old fetcher class. + #define GTMBridgeFetcher GTMHTTPFetcher + #define GTMBridgeFetcherService GTMHTTPFetcherService + #define GTMBridgeFetcherServiceProtocol GTMHTTPFetcherServiceProtocol + #define GTMBridgeAssertValidSelector GTMAssertSelectorNilOrImplementedWithArgs + #define GTMBridgeCookieStorage GTMCookieStorage + #define GTMBridgeCleanedUserAgentString GTMCleanedUserAgentString + #define GTMBridgeSystemVersionString GTMSystemVersionString + #define GTMBridgeApplicationIdentifier GTMApplicationIdentifier + #define kGTMBridgeFetcherStatusDomain kGTMHTTPFetcherStatusDomain + #define kGTMBridgeFetcherStatusBadRequest kGTMHTTPFetcherStatusBadRequest + #endif // GTM_USE_SESSION_FETCHER +#endif + +GTM_ASSUME_NONNULL_BEGIN + +// Notifications +// +// Fetch started and stopped, and fetch retry delay started and stopped. +extern NSString *const kGTMSessionFetcherStartedNotification; +extern NSString *const kGTMSessionFetcherStoppedNotification; +extern NSString *const kGTMSessionFetcherRetryDelayStartedNotification; +extern NSString *const kGTMSessionFetcherRetryDelayStoppedNotification; + +// Completion handler notification. This is intended for use by code capturing +// and replaying fetch requests and results for testing. For fetches where +// destinationFileURL or accumulateDataBlock is set for the fetcher, the data +// will be nil for successful fetches. +// +// This notification is posted on the main thread. +extern NSString *const kGTMSessionFetcherCompletionInvokedNotification; +extern NSString *const kGTMSessionFetcherCompletionDataKey; +extern NSString *const kGTMSessionFetcherCompletionErrorKey; + +// Constants for NSErrors created by the fetcher (excluding server status errors, +// and error objects originating in the OS.) +extern NSString *const kGTMSessionFetcherErrorDomain; + +// The fetcher turns server error status values (3XX, 4XX, 5XX) into NSErrors +// with domain kGTMSessionFetcherStatusDomain. +// +// Any server response body data accompanying the status error is added to the +// userInfo dictionary with key kGTMSessionFetcherStatusDataKey. +extern NSString *const kGTMSessionFetcherStatusDomain; +extern NSString *const kGTMSessionFetcherStatusDataKey; + +// When a fetch fails with an error, these keys are included in the error userInfo +// dictionary if retries were attempted. +extern NSString *const kGTMSessionFetcherNumberOfRetriesDoneKey; +extern NSString *const kGTMSessionFetcherElapsedIntervalWithRetriesKey; + +// Background session support requires access to NSUserDefaults. +// If [NSUserDefaults standardUserDefaults] doesn't yield the correct NSUserDefaults for your usage, +// ie for an App Extension, then implement this class/method to return the correct NSUserDefaults. +// https://developer.apple.com/library/ios/documentation/General/Conceptual/ExtensibilityPG/ExtensionScenarios.html#//apple_ref/doc/uid/TP40014214-CH21-SW6 +@interface GTMSessionFetcherUserDefaultsFactory : NSObject + ++ (NSUserDefaults *)fetcherUserDefaults; + +@end + +#ifdef __cplusplus +} +#endif + +typedef NS_ENUM(NSInteger, GTMSessionFetcherError) { + GTMSessionFetcherErrorDownloadFailed = -1, + GTMSessionFetcherErrorUploadChunkUnavailable = -2, + GTMSessionFetcherErrorBackgroundExpiration = -3, + GTMSessionFetcherErrorBackgroundFetchFailed = -4, + GTMSessionFetcherErrorInsecureRequest = -5, + GTMSessionFetcherErrorTaskCreationFailed = -6, +}; + +typedef NS_ENUM(NSInteger, GTMSessionFetcherStatus) { + // Standard http status codes. + GTMSessionFetcherStatusNotModified = 304, + GTMSessionFetcherStatusBadRequest = 400, + GTMSessionFetcherStatusUnauthorized = 401, + GTMSessionFetcherStatusForbidden = 403, + GTMSessionFetcherStatusPreconditionFailed = 412 +}; + +#if !GTMSESSION_DEPRECATE_OLD_ENUMS +#define kGTMSessionFetcherErrorDownloadFailed GTMSessionFetcherErrorDownloadFailed +#define kGTMSessionFetcherErrorUploadChunkUnavailable GTMSessionFetcherErrorUploadChunkUnavailable +#define kGTMSessionFetcherErrorBackgroundExpiration GTMSessionFetcherErrorBackgroundExpiration +#define kGTMSessionFetcherErrorBackgroundFetchFailed GTMSessionFetcherErrorBackgroundFetchFailed +#define kGTMSessionFetcherErrorInsecureRequest GTMSessionFetcherErrorInsecureRequest +#define kGTMSessionFetcherErrorTaskCreationFailed GTMSessionFetcherErrorTaskCreationFailed + +#define kGTMSessionFetcherStatusNotModified GTMSessionFetcherStatusNotModified +#define kGTMSessionFetcherStatusBadRequest GTMSessionFetcherStatusBadRequest +#define kGTMSessionFetcherStatusUnauthorized GTMSessionFetcherStatusUnauthorized +#define kGTMSessionFetcherStatusForbidden GTMSessionFetcherStatusForbidden +#define kGTMSessionFetcherStatusPreconditionFailed GTMSessionFetcherStatusPreconditionFailed +#endif // !GTMSESSION_DEPRECATE_OLD_ENUMS + +#ifdef __cplusplus +extern "C" { +#endif + +@class GTMSessionCookieStorage; +@class GTMSessionFetcher; + +// The configuration block is for modifying the NSURLSessionConfiguration only. +// DO NOT change any fetcher properties in the configuration block. +typedef void (^GTMSessionFetcherConfigurationBlock)(GTMSessionFetcher *fetcher, + NSURLSessionConfiguration *configuration); +typedef void (^GTMSessionFetcherSystemCompletionHandler)(void); +typedef void (^GTMSessionFetcherCompletionHandler)(NSData * GTM_NULLABLE_TYPE data, + NSError * GTM_NULLABLE_TYPE error); +typedef void (^GTMSessionFetcherBodyStreamProviderResponse)(NSInputStream *bodyStream); +typedef void (^GTMSessionFetcherBodyStreamProvider)(GTMSessionFetcherBodyStreamProviderResponse response); +typedef void (^GTMSessionFetcherDidReceiveResponseDispositionBlock)(NSURLSessionResponseDisposition disposition); +typedef void (^GTMSessionFetcherDidReceiveResponseBlock)(NSURLResponse *response, + GTMSessionFetcherDidReceiveResponseDispositionBlock dispositionBlock); +typedef void (^GTMSessionFetcherWillRedirectResponse)(NSURLRequest * GTM_NULLABLE_TYPE redirectedRequest); +typedef void (^GTMSessionFetcherWillRedirectBlock)(NSHTTPURLResponse *redirectResponse, + NSURLRequest *redirectRequest, + GTMSessionFetcherWillRedirectResponse response); +typedef void (^GTMSessionFetcherAccumulateDataBlock)(NSData * GTM_NULLABLE_TYPE buffer); +typedef void (^GTMSessionFetcherReceivedProgressBlock)(int64_t bytesWritten, + int64_t totalBytesWritten); +typedef void (^GTMSessionFetcherDownloadProgressBlock)(int64_t bytesWritten, + int64_t totalBytesWritten, + int64_t totalBytesExpectedToWrite); +typedef void (^GTMSessionFetcherSendProgressBlock)(int64_t bytesSent, + int64_t totalBytesSent, + int64_t totalBytesExpectedToSend); +typedef void (^GTMSessionFetcherWillCacheURLResponseResponse)(NSCachedURLResponse * GTM_NULLABLE_TYPE cachedResponse); +typedef void (^GTMSessionFetcherWillCacheURLResponseBlock)(NSCachedURLResponse *proposedResponse, + GTMSessionFetcherWillCacheURLResponseResponse responseBlock); +typedef void (^GTMSessionFetcherRetryResponse)(BOOL shouldRetry); +typedef void (^GTMSessionFetcherRetryBlock)(BOOL suggestedWillRetry, + NSError * GTM_NULLABLE_TYPE error, + GTMSessionFetcherRetryResponse response); + +typedef void (^GTMSessionFetcherTestResponse)(NSHTTPURLResponse * GTM_NULLABLE_TYPE response, + NSData * GTM_NULLABLE_TYPE data, + NSError * GTM_NULLABLE_TYPE error); +typedef void (^GTMSessionFetcherTestBlock)(GTMSessionFetcher *fetcherToTest, + GTMSessionFetcherTestResponse testResponse); + +void GTMSessionFetcherAssertValidSelector(id GTM_NULLABLE_TYPE obj, SEL GTM_NULLABLE_TYPE sel, ...); + +// Utility functions for applications self-identifying to servers via a +// user-agent header + +// The "standard" user agent includes the application identifier, taken from the bundle, +// followed by a space and the system version string. Pass nil to use +mainBundle as the source +// of the bundle identifier. +// +// Applications may use this as a starting point for their own user agent strings, perhaps +// with additional sections appended. Use GTMFetcherCleanedUserAgentString() below to +// clean up any string being added to the user agent. +NSString *GTMFetcherStandardUserAgentString(NSBundle * GTM_NULLABLE_TYPE bundle); + +// 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. +// +// The bundle ID may be overridden as the base identifier string by +// adding to the bundle's Info.plist a "GTMUserAgentID" key. +// +// If no bundle ID or override is available, the process name preceded +// by "proc_" is used. +NSString *GTMFetcherApplicationIdentifier(NSBundle * GTM_NULLABLE_TYPE bundle); + +// Make an identifier like "MacOSX/10.7.1" or "iPod_Touch/4.1 hw/iPod1_1" +NSString *GTMFetcherSystemVersionString(void); + +// Make a parseable user-agent identifier from the given string, replacing whitespace +// and commas with underscores, and removing other characters that may interfere +// with parsing of the full user-agent string. +// +// For example, @"[My App]" would become @"My_App" +NSString *GTMFetcherCleanedUserAgentString(NSString *str); + +// Grab the data from an input stream. Since streams cannot be assumed to be rewindable, +// this may be destructive; the caller can try to rewind the stream (by setting the +// NSStreamFileCurrentOffsetKey property) or can just use the NSData to make a new +// NSInputStream. This function is intended to facilitate testing rather than be used in +// production. +// +// This function operates synchronously on the current thread. Depending on how the +// input stream is implemented, it may be appropriate to dispatch to a different +// queue before calling this function. +// +// Failure is indicated by a returned data value of nil. +NSData * GTM_NULLABLE_TYPE GTMDataFromInputStream(NSInputStream *inputStream, NSError **outError); + +#ifdef __cplusplus +} // extern "C" +#endif + + +#if !GTM_USE_SESSION_FETCHER +@protocol GTMHTTPFetcherServiceProtocol; +#endif + +// This protocol allows abstract references to the fetcher service, primarily for +// fetchers (which may be compiled without the fetcher service class present.) +// +// Apps should not need to use this protocol. +@protocol GTMSessionFetcherServiceProtocol +// This protocol allows us to call into the service without requiring +// GTMSessionFetcherService sources in this project + +@property(strong) dispatch_queue_t callbackQueue; + +- (BOOL)fetcherShouldBeginFetching:(GTMSessionFetcher *)fetcher; +- (void)fetcherDidCreateSession:(GTMSessionFetcher *)fetcher; +- (void)fetcherDidBeginFetching:(GTMSessionFetcher *)fetcher; +- (void)fetcherDidStop:(GTMSessionFetcher *)fetcher; + +- (GTMSessionFetcher *)fetcherWithRequest:(NSURLRequest *)request; +- (BOOL)isDelayingFetcher:(GTMSessionFetcher *)fetcher; + +@property(atomic, assign) BOOL reuseSession; +- (GTM_NULLABLE NSURLSession *)session; +- (GTM_NULLABLE NSURLSession *)sessionForFetcherCreation; +- (GTM_NULLABLE id)sessionDelegate; +- (GTM_NULLABLE NSDate *)stoppedAllFetchersDate; + +// Methods for compatibility with the old GTMHTTPFetcher. +@property(readonly, strong, GTM_NULLABLE) NSOperationQueue *delegateQueue; + +@end // @protocol GTMSessionFetcherServiceProtocol + +#ifndef GTM_FETCHER_AUTHORIZATION_PROTOCOL +#define GTM_FETCHER_AUTHORIZATION_PROTOCOL 1 +@protocol GTMFetcherAuthorizationProtocol +@required +// This protocol allows us to call the authorizer without requiring its sources +// in this project. +- (void)authorizeRequest:(NSMutableURLRequest * GTM_NULLABLE_TYPE)request + delegate:(id)delegate + didFinishSelector:(SEL)sel; + +- (void)stopAuthorization; + +- (void)stopAuthorizationForRequest:(NSURLRequest *)request; + +- (BOOL)isAuthorizingRequest:(NSURLRequest *)request; + +- (BOOL)isAuthorizedRequest:(NSURLRequest *)request; + +@property(strong, readonly) NSString *userEmail; + +@optional + +// Indicate if authorization may be attempted. Even if this succeeds, +// authorization may fail if the user's permissions have been revoked. +@property(readonly) BOOL canAuthorize; + +// For development only, allow authorization of non-SSL requests, allowing +// transmission of the bearer token unencrypted. +@property(assign) BOOL shouldAuthorizeAllRequests; + +- (void)authorizeRequest:(GTM_NULLABLE NSMutableURLRequest *)request + completionHandler:(void (^)(NSError * GTM_NULLABLE_TYPE error))handler; + +#if GTM_USE_SESSION_FETCHER +@property (weak, GTM_NULLABLE) id fetcherService; +#else +@property (weak, GTM_NULLABLE) id fetcherService; +#endif + +- (BOOL)primeForRefresh; + +@end +#endif // GTM_FETCHER_AUTHORIZATION_PROTOCOL + +#pragma mark - + +// GTMSessionFetcher objects are used for async retrieval of an http get or post +// +// See additional comments at the beginning of this file +@interface GTMSessionFetcher : NSObject + +// 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. ++ (instancetype)fetcherWithRequest:(GTM_NULLABLE NSURLRequest *)request; + +// Convenience methods that make a request, like +fetcherWithRequest ++ (instancetype)fetcherWithURL:(NSURL *)requestURL; ++ (instancetype)fetcherWithURLString:(NSString *)requestURLString; + +// Methods for creating fetchers to continue previous fetches. ++ (instancetype)fetcherWithDownloadResumeData:(NSData *)resumeData; ++ (instancetype)fetcherWithSessionIdentifier:(NSString *)sessionIdentifier; + +// Returns an array of currently active fetchers for background sessions, +// both restarted and newly created ones. ++ (GTM_NSArrayOf(GTMSessionFetcher *) *)fetchersForBackgroundSessions; + +// Designated initializer. +- (instancetype)initWithRequest:(GTM_NULLABLE NSURLRequest *)request + configuration:(GTM_NULLABLE NSURLSessionConfiguration *)configuration; + +// The fetcher's request +// +// The underlying request is mutable and may be modified by the caller. Request changes will not +// affect a fetch after it has begun. +@property(readonly, GTM_NULLABLE) NSMutableURLRequest *mutableRequest; + +// Data used for resuming a download task. +@property(strong, GTM_NULLABLE) NSData *downloadResumeData; + +// The configuration; this must be set before the fetch begins. If no configuration is +// set or inherited from the fetcher service, then the fetcher uses an ephemeral config. +@property(strong, GTM_NULLABLE) NSURLSessionConfiguration *configuration; + +// A block the client may use to customize the configuration used to create the session. +// +// This is called synchronously, either on the thread that begins the fetch or, during a retry, +// on the main thread. The configuration block may be called repeatedly if multiple fetchers are +// created. +// +// The configuration block is for modifying the NSURLSessionConfiguration only. +// DO NOT change any fetcher properties in the configuration block. Fetcher properties +// may be set in the fetcher service prior to fetcher creation, or on the fetcher prior +// to invoking beginFetch. +@property(copy, GTM_NULLABLE) GTMSessionFetcherConfigurationBlock configurationBlock; + +// A session is created as needed by the fetcher. A fetcher service object +// may maintain sessions for multiple fetches to the same host. +@property(strong, GTM_NULLABLE) NSURLSession *session; + +// The task in flight. +@property(readonly, GTM_NULLABLE) NSURLSessionTask *sessionTask; + +// The background session identifier. +@property(readonly, GTM_NULLABLE) NSString *sessionIdentifier; + +// Indicates a fetcher created to finish a background session task. +@property(readonly) BOOL wasCreatedFromBackgroundSession; + +// Additional user-supplied data to encode into the session identifier. Since session identifier +// length limits are unspecified, this should be kept small. Key names beginning with an underscore +// are reserved for use by the fetcher. +@property(strong, GTM_NULLABLE) GTM_NSDictionaryOf(NSString *, NSString *) *sessionUserInfo; + +// The human-readable description to be assigned to the task. +@property(copy, GTM_NULLABLE) NSString *taskDescription; + +// The priority assigned to the task, if any. Use NSURLSessionTaskPriorityLow, +// NSURLSessionTaskPriorityDefault, or NSURLSessionTaskPriorityHigh. +@property(assign) float taskPriority; + +// The fetcher encodes information used to resume a session in the session identifier. +// This method, intended for internal use returns the encoded information. The sessionUserInfo +// dictionary is stored as identifier metadata. +- (GTM_NULLABLE GTM_NSDictionaryOf(NSString *, NSString *) *)sessionIdentifierMetadata; + +#if TARGET_OS_IPHONE +// The app should pass to this method the completion handler passed in the app delegate method +// application:handleEventsForBackgroundURLSession:completionHandler: ++ (void)application:(UIApplication *)application + handleEventsForBackgroundURLSession:(NSString *)identifier + completionHandler:(GTMSessionFetcherSystemCompletionHandler)completionHandler; +#endif + +// Indicate that a newly created session should be a background session. +// A new session identifier will be created by the fetcher. +@property(assign) BOOL useBackgroundSession; + +// Indicates if the fetcher was started using a background session. +@property(atomic, readonly, getter=isUsingBackgroundSession) BOOL usingBackgroundSession; + +// Indicates if uploads should use an upload task. This is always set for file or stream-provider +// bodies, but may be set explicitly for NSData bodies. +@property(assign) BOOL useUploadTask; + +// Indicates that the fetcher is using a session that may be shared with other fetchers. +@property(readonly) BOOL canShareSession; + +// By default, the fetcher allows only secure (https) schemes unless this +// property is set, or the GTM_ALLOW_INSECURE_REQUESTS build flag is set. +// +// For example, during debugging when fetching from a development server that lacks SSL support, +// this may be set to @[ @"http" ], or when the fetcher is used to retrieve local files, +// this may be set to @[ @"file" ]. +// +// This should be left as nil for release builds to avoid creating the opportunity for +// leaking private user behavior and data. If a server is providing insecure URLs +// for fetching by the client app, report the problem as server security & privacy bug. +// +// For builds with the iOS 9/OS X 10.11 and later SDKs, this property is required only when +// the app specifies NSAppTransportSecurity/NSAllowsArbitraryLoads in the main bundle's Info.plist. +@property(copy, GTM_NULLABLE) GTM_NSArrayOf(NSString *) *allowedInsecureSchemes; + +// By default, the fetcher prohibits localhost requests unless this property is set, +// or the GTM_ALLOW_INSECURE_REQUESTS build flag is set. +// +// For localhost requests, the URL scheme is not checked when this property is set. +// +// For builds with the iOS 9/OS X 10.11 and later SDKs, this property is required only when +// the app specifies NSAppTransportSecurity/NSAllowsArbitraryLoads in the main bundle's Info.plist. +@property(assign) BOOL allowLocalhostRequest; + +// By default, the fetcher requires valid server certs. This may be bypassed +// temporarily for development against a test server with an invalid cert. +@property(assign) BOOL allowInvalidServerCertificates; + +// Cookie storage object for this fetcher. If nil, the fetcher will use a static cookie +// storage instance shared among fetchers. If this fetcher was created by a fetcher service +// object, it will be set to use the service object's cookie storage. See Cookies section above for +// the full discussion. +// +// Because as of Jan 2014 standalone instances of NSHTTPCookieStorage do not actually +// store any cookies (Radar 15735276) we use our own subclass, GTMSessionCookieStorage, +// to hold cookies in memory. +@property(strong, GTM_NULLABLE) NSHTTPCookieStorage *cookieStorage; + +// Setting the credential is optional; it is used if the connection receives +// an authentication challenge. +@property(strong, GTM_NULLABLE) NSURLCredential *credential; + +// Setting the proxy credential is optional; it is used if the connection +// receives an authentication challenge from a proxy. +@property(strong, GTM_NULLABLE) NSURLCredential *proxyCredential; + +// If body data, body file URL, or body stream provider is not set, then a GET request +// method is assumed. +@property(strong, GTM_NULLABLE) NSData *bodyData; + +// File to use as the request body. This forces use of an upload task. +@property(strong, GTM_NULLABLE) NSURL *bodyFileURL; + +// Length of body to send, expected or actual. +@property(readonly) int64_t bodyLength; + +// The body stream provider may be called repeatedly to provide a body. +// Setting a body stream provider forces use of an upload task. +@property(copy, GTM_NULLABLE) GTMSessionFetcherBodyStreamProvider bodyStreamProvider; + +// Object to add authorization to the request, if needed. +@property(strong, GTM_NULLABLE) id authorizer; + +// The service object that created and monitors this fetcher, if any. +@property(strong) id service; + +// The host, if any, used to classify this fetcher in the fetcher service. +@property(copy, GTM_NULLABLE) 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 when the running fetchers +// exceeds the service's maxRunningFetchersPerHost. A priority of NSIntegerMin will +// exempt this fetcher from delay. +@property(assign) NSInteger servicePriority; + +// The delegate's optional didReceiveResponse block may be used to inspect or alter +// the session response. +// +// This is called on the callback queue. +@property(copy, GTM_NULLABLE) GTMSessionFetcherDidReceiveResponseBlock didReceiveResponseBlock; + +// The delegate's optional willRedirect block may be used to inspect or alter +// the redirection. +// +// This is called on the callback queue. +@property(copy, GTM_NULLABLE) GTMSessionFetcherWillRedirectBlock willRedirectBlock; + +// The optional send progress block reports body bytes uploaded. +// +// This is called on the callback queue. +@property(copy, GTM_NULLABLE) GTMSessionFetcherSendProgressBlock sendProgressBlock; + +// The optional accumulate block may be set by clients wishing to accumulate data +// themselves rather than let the fetcher append each buffer to an NSData. +// +// When this is called with nil data (such as on redirect) the client +// should empty its accumulation buffer. +// +// This is called on the callback queue. +@property(copy, GTM_NULLABLE) GTMSessionFetcherAccumulateDataBlock accumulateDataBlock; + +// The optional received progress block may be used to monitor data +// received from a data task. +// +// This is called on the callback queue. +@property(copy, GTM_NULLABLE) GTMSessionFetcherReceivedProgressBlock receivedProgressBlock; + +// The delegate's optional downloadProgress block may be used to monitor download +// progress in writing to disk. +// +// This is called on the callback queue. +@property(copy, GTM_NULLABLE) GTMSessionFetcherDownloadProgressBlock downloadProgressBlock; + +// The delegate's optional willCacheURLResponse block may be used to alter the cached +// NSURLResponse. The user may prevent caching by passing nil to the block's response. +// +// This is called on the callback queue. +@property(copy, GTM_NULLABLE) GTMSessionFetcherWillCacheURLResponseBlock willCacheURLResponseBlock; + +// Enable retrying; see comments at the top of this file. Setting +// retryEnabled=YES resets the min and max retry intervals. +@property(assign, getter=isRetryEnabled) BOOL retryEnabled; + +// Retry block is optional for retries. +// +// If present, this block should call the response block with YES to cause a retry or NO to end the +// fetch. +// See comments at the top of this file. +@property(copy, GTM_NULLABLE) GTMSessionFetcherRetryBlock retryBlock; + +// 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, 60 seconds for downloads and 600 seconds for uploads. +@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 +// set 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 set this. +@property(assign) double retryFactor; + +// Number of retries attempted. +@property(readonly) NSUInteger retryCount; + +// Interval delay to precede next retry. +@property(readonly) NSTimeInterval nextRetryInterval; + +#if GTM_BACKGROUND_TASK_FETCHING +// Skip use of a UIBackgroundTask, thus requiring fetches to complete when the app is in the +// foreground. +// +// Targets should define GTM_BACKGROUND_TASK_FETCHING to 0 to avoid use of a UIBackgroundTask +// on iOS to allow fetches to complete in the background. This property is available when +// it's not practical to set the preprocessor define. +@property(assign) BOOL skipBackgroundTask; +#endif // GTM_BACKGROUND_TASK_FETCHING + +// Begin fetching the request +// +// The delegate may optionally implement the callback or pass nil for the selector or handler. +// +// The delegate and all callback blocks are retained between the beginFetch call until after the +// finish callback, or until the fetch is stopped. +// +// 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:(GTMSessionFetcher *)fetcher +// finishedWithData:(NSData *)data +// error:(NSError *)error; +// +// If the application has specified a destinationFileURL or an accumulateDataBlock +// for the fetcher, the data parameter passed to the callback will be nil. + +- (void)beginFetchWithDelegate:(GTM_NULLABLE_TYPE id)delegate + didFinishSelector:(GTM_NULLABLE_TYPE SEL)finishedSEL; + +- (void)beginFetchWithCompletionHandler:(GTM_NULLABLE GTMSessionFetcherCompletionHandler)handler; + +// Returns YES if this fetcher is in the process of fetching a URL. +@property(readonly, getter=isFetching) BOOL fetching; + +// Cancel the fetch of the request that's currently in progress. The completion handler +// will not be called. +- (void)stopFetching; + +// A block to be called when the fetch completes. +@property(copy, GTM_NULLABLE) GTMSessionFetcherCompletionHandler completionHandler; + +// A block to be called if download resume data becomes available. +@property(strong, GTM_NULLABLE) void (^resumeDataBlock)(NSData *); + +// Return the status code from the server response. +@property(readonly) NSInteger statusCode; + +// Return the http headers from the response. +@property(strong, readonly, GTM_NULLABLE) GTM_NSDictionaryOf(NSString *, NSString *) *responseHeaders; + +// The response, once it's been received. +@property(strong, readonly, GTM_NULLABLE) NSURLResponse *response; + +// Bytes downloaded so far. +@property(readonly) int64_t downloadedLength; + +// Buffer of currently-downloaded data, if available. +@property(readonly, strong, GTM_NULLABLE) NSData *downloadedData; + +// Local path to which the downloaded file will be moved. +// +// If a file already exists at the path, it will be overwritten. +// Will create the enclosing folders if they are not present. +@property(strong, GTM_NULLABLE) NSURL *destinationFileURL; + +// The time this fetcher originally began fetching. This is useful as a time +// barrier for ignoring irrelevant fetch notifications or callbacks. +@property(strong, readonly, GTM_NULLABLE) NSDate *initialBeginFetchDate; + +// userData is retained solely for the convenience of the client. +@property(strong, GTM_NULLABLE) id userData; + +// Stored property values are retained solely for the convenience of the client. +@property(copy, GTM_NULLABLE) GTM_NSDictionaryOf(NSString *, id) *properties; + +- (void)setProperty:(GTM_NULLABLE id)obj forKey:(NSString *)key; // Pass nil for obj to remove the property. +- (id GTM_NULLABLE_TYPE)propertyForKey:(NSString *)key; + +- (void)addPropertiesFromDictionary:(GTM_NSDictionaryOf(NSString *, id) *)dict; + +// Comments are useful for logging, so are strongly recommended for each fetcher. +@property(copy, GTM_NULLABLE) NSString *comment; + +- (void)setCommentWithFormat:(NSString *)format, ... NS_FORMAT_FUNCTION(1, 2); + +// Log of request and response, if logging is enabled +@property(copy, GTM_NULLABLE) NSString *log; + +// Callbacks are run on this queue. If none is supplied, the main queue is used. +@property(strong, GTM_NULL_RESETTABLE) dispatch_queue_t callbackQueue; + +// The queue used internally by the session to invoke its delegate methods in the fetcher. +// +// Application callbacks are always called by the fetcher on the callbackQueue above, +// not on this queue. Apps should generally not change this queue. +// +// The default delegate queue is the main queue. A nil value tells NSURLSession to +// create a serial queue. +// +// This value is ignored after the session has been created, so this +// property should be set in the fetcher service rather in the fetcher as it applies +// to a shared session. +@property(strong, GTM_NULL_RESETTABLE) NSOperationQueue *sessionDelegateQueue; + +// Spin the run loop or sleep the thread, discarding events, until the fetch has completed. +// +// This is only for use in testing or in tools without a user interface. +// +// Note: Synchronous fetches should never be used by shipping apps; they are +// sufficient reason for rejection from the app store. +// +// Returns NO if timed out. +- (BOOL)waitForCompletionWithTimeout:(NSTimeInterval)timeoutInSeconds; + +// Test block is optional for testing. +// +// If present, this block will cause the fetcher to skip starting the session, and instead +// use the test block response values when calling the completion handler and delegate code. +// +// Test code can set this on the fetcher or on the fetcher service. For testing libraries +// that use a fetcher without exposing either the fetcher or the fetcher service, the global +// method setGlobalTestBlock: will set the block for all fetchers that do not have a test +// block set. +// +// The test code can pass nil for all response parameters to indicate that the fetch +// should proceed. +// +// Applications can exclude test block support by setting GTM_DISABLE_FETCHER_TEST_BLOCK. +@property(copy, GTM_NULLABLE) GTMSessionFetcherTestBlock testBlock; + ++ (void)setGlobalTestBlock:(GTM_NULLABLE GTMSessionFetcherTestBlock)block; + +// Exposed for testing. ++ (GTMSessionCookieStorage *)staticCookieStorage; ++ (BOOL)appAllowsInsecureRequests; + +#if STRIP_GTM_FETCH_LOGGING +// If logging is stripped, provide a stub for the main method +// for controlling logging. ++ (void)setLoggingEnabled:(BOOL)flag; ++ (BOOL)isLoggingEnabled; + +#else + +// These methods let an application log specific body text, such as the text description of a binary +// request or response. The application should set the fetcher to defer response body logging until +// the response has been received and the log response body has been set by the app. For example: +// +// fetcher.logRequestBody = [binaryObject stringDescription]; +// fetcher.deferResponseBodyLogging = YES; +// [fetcher beginFetchWithCompletionHandler:^(NSData *data, NSError *error) { +// if (error == nil) { +// fetcher.logResponseBody = [[[MyThing alloc] initWithData:data] stringDescription]; +// } +// fetcher.deferResponseBodyLogging = NO; +// }]; + +@property(copy, GTM_NULLABLE) NSString *logRequestBody; +@property(assign) BOOL deferResponseBodyLogging; +@property(copy, GTM_NULLABLE) NSString *logResponseBody; + +// Internal logging support. +@property(readonly) NSData *loggedStreamData; +@property(assign) BOOL hasLoggedError; +@property(strong, GTM_NULLABLE) NSURL *redirectedFromURL; +- (void)appendLoggedStreamData:(NSData *)dataToAdd; +- (void)clearLoggedStreamData; + +#endif // STRIP_GTM_FETCH_LOGGING + +@end + +@interface GTMSessionFetcher (BackwardsCompatibilityOnly) +// Clients using GTMSessionFetcher should set the cookie storage explicitly themselves. +// This method is just for compatibility with the old GTMHTTPFetcher class. +- (void)setCookieStorageMethod:(NSInteger)method; +@end + +// Until we can just instantiate NSHTTPCookieStorage for local use, we'll +// implement all the public methods ourselves. This stores cookies only in +// memory. Additional methods are provided for testing. +// +// iOS 9/OS X 10.11 added +[NSHTTPCookieStorage sharedCookieStorageForGroupContainerIdentifier:] +// which may also be used to create cookie storage. +@interface GTMSessionCookieStorage : NSHTTPCookieStorage + +// Add the array off cookies to the storage, replacing duplicates. +// Also removes expired cookies from the storage. +- (void)setCookies:(GTM_NULLABLE GTM_NSArrayOf(NSHTTPCookie *) *)cookies; + +- (void)removeAllCookies; + +@end + +// Macros to monitor synchronization blocks in debug builds. +// These report problems using GTMSessionCheckDebug. +// +// GTMSessionMonitorSynchronized Start monitoring a top-level-only +// @sync scope. +// GTMSessionMonitorRecursiveSynchronized Start monitoring a top-level or +// recursive @sync scope. +// GTMSessionCheckSynchronized Verify that the current execution +// is inside a @sync scope. +// GTMSessionCheckNotSynchronized Verify that the current execution +// is not inside a @sync scope. +// +// Example usage: +// +// - (void)myExternalMethod { +// @synchronized(self) { +// GTMSessionMonitorSynchronized(self) +// +// - (void)myInternalMethod { +// GTMSessionCheckSynchronized(self); +// +// - (void)callMyCallbacks { +// GTMSessionCheckNotSynchronized(self); +// +// GTMSessionCheckNotSynchronized is available for verifying the code isn't +// in a deadlockable @sync state when posting notifications and invoking +// callbacks. Don't use GTMSessionCheckNotSynchronized immediately before a +// @sync scope; the normal recursiveness check of GTMSessionMonitorSynchronized +// can catch those. + +#ifdef __OBJC__ +#if DEBUG + #define __GTMSessionMonitorSynchronizedVariableInner(varname, counter) \ + varname ## counter + #define __GTMSessionMonitorSynchronizedVariable(varname, counter) \ + __GTMSessionMonitorSynchronizedVariableInner(varname, counter) + + #define GTMSessionMonitorSynchronized(obj) \ + NS_VALID_UNTIL_END_OF_SCOPE id \ + __GTMSessionMonitorSynchronizedVariable(__monitor, __COUNTER__) = \ + [[GTMSessionSyncMonitorInternal alloc] initWithSynchronizationObject:obj \ + allowRecursive:NO \ + functionName:__func__] + + #define GTMSessionMonitorRecursiveSynchronized(obj) \ + NS_VALID_UNTIL_END_OF_SCOPE id \ + __GTMSessionMonitorSynchronizedVariable(__monitor, __COUNTER__) = \ + [[GTMSessionSyncMonitorInternal alloc] initWithSynchronizationObject:obj \ + allowRecursive:YES \ + functionName:__func__] + + #define GTMSessionCheckSynchronized(obj) { \ + GTMSESSION_ASSERT_DEBUG( \ + [GTMSessionSyncMonitorInternal functionsHoldingSynchronizationOnObject:obj], \ + @"GTMSessionCheckSynchronized(" #obj ") failed: not sync'd" \ + @" on " #obj " in %s. Call stack:\n%@", \ + __func__, [NSThread callStackSymbols]); \ + } + + #define GTMSessionCheckNotSynchronized(obj) { \ + GTMSESSION_ASSERT_DEBUG( \ + ![GTMSessionSyncMonitorInternal functionsHoldingSynchronizationOnObject:obj], \ + @"GTMSessionCheckNotSynchronized(" #obj ") failed: was sync'd" \ + @" on " #obj " in %s by %@. Call stack:\n%@", __func__, \ + [GTMSessionSyncMonitorInternal functionsHoldingSynchronizationOnObject:obj], \ + [NSThread callStackSymbols]); \ + } + +// GTMSessionSyncMonitorInternal is a private class that keeps track of the +// beginning and end of synchronized scopes. +// +// This class should not be used directly, but only via the +// GTMSessionMonitorSynchronized macro. +@interface GTMSessionSyncMonitorInternal : NSObject +- (instancetype)initWithSynchronizationObject:(id)object + allowRecursive:(BOOL)allowRecursive + functionName:(const char *)functionName; +// Return the names of the functions that hold sync on the object, or nil if none. ++ (NSArray *)functionsHoldingSynchronizationOnObject:(id)object; +@end + +#else + #define GTMSessionMonitorSynchronized(obj) do { } while (0) + #define GTMSessionMonitorRecursiveSynchronized(obj) do { } while (0) + #define GTMSessionCheckSynchronized(obj) do { } while (0) + #define GTMSessionCheckNotSynchronized(obj) do { } while (0) +#endif // !DEBUG +#endif // __OBJC__ + + +GTM_ASSUME_NONNULL_END diff --git a/XCDYouTubeKit Demo/Pods/GTMSessionFetcher/Source/GTMSessionFetcher.m b/XCDYouTubeKit Demo/Pods/GTMSessionFetcher/Source/GTMSessionFetcher.m new file mode 100644 index 000000000..eee3d4909 --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GTMSessionFetcher/Source/GTMSessionFetcher.m @@ -0,0 +1,4157 @@ +/* Copyright 2014 Google Inc. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + +#import "GTMSessionFetcher.h" + +#import + +GTM_ASSUME_NONNULL_BEGIN + +NSString *const kGTMSessionFetcherStartedNotification = @"kGTMSessionFetcherStartedNotification"; +NSString *const kGTMSessionFetcherStoppedNotification = @"kGTMSessionFetcherStoppedNotification"; +NSString *const kGTMSessionFetcherRetryDelayStartedNotification = @"kGTMSessionFetcherRetryDelayStartedNotification"; +NSString *const kGTMSessionFetcherRetryDelayStoppedNotification = @"kGTMSessionFetcherRetryDelayStoppedNotification"; + +NSString *const kGTMSessionFetcherCompletionInvokedNotification = @"kGTMSessionFetcherCompletionInvokedNotification"; +NSString *const kGTMSessionFetcherCompletionDataKey = @"data"; +NSString *const kGTMSessionFetcherCompletionErrorKey = @"error"; + +NSString *const kGTMSessionFetcherErrorDomain = @"com.google.GTMSessionFetcher"; +NSString *const kGTMSessionFetcherStatusDomain = @"com.google.HTTPStatus"; +NSString *const kGTMSessionFetcherStatusDataKey = @"data"; // data returned with a kGTMSessionFetcherStatusDomain error + +NSString *const kGTMSessionFetcherNumberOfRetriesDoneKey = @"kGTMSessionFetcherNumberOfRetriesDoneKey"; +NSString *const kGTMSessionFetcherElapsedIntervalWithRetriesKey = @"kGTMSessionFetcherElapsedIntervalWithRetriesKey"; + +static NSString *const kGTMSessionIdentifierPrefix = @"com.google.GTMSessionFetcher"; +static NSString *const kGTMSessionIdentifierDestinationFileURLMetadataKey = @"_destURL"; +static NSString *const kGTMSessionIdentifierBodyFileURLMetadataKey = @"_bodyURL"; + +// The default max retry interview is 10 minutes for uploads (POST/PUT/PATCH), +// 1 minute for downloads. +static const NSTimeInterval kUnsetMaxRetryInterval = -1.0; +static const NSTimeInterval kDefaultMaxDownloadRetryInterval = 60.0; +static const NSTimeInterval kDefaultMaxUploadRetryInterval = 60.0 * 10.; + +#ifdef GTMSESSION_PERSISTED_DESTINATION_KEY +// Projects using unique class names should also define a unique persisted destination key. +static NSString * const kGTMSessionFetcherPersistedDestinationKey = + GTMSESSION_PERSISTED_DESTINATION_KEY; +#else +static NSString * const kGTMSessionFetcherPersistedDestinationKey = + @"com.google.GTMSessionFetcher.downloads"; +#endif + +GTM_ASSUME_NONNULL_END + +// +// GTMSessionFetcher +// + +#if 0 +#define GTM_LOG_BACKGROUND_SESSION(...) GTMSESSION_LOG_DEBUG(__VA_ARGS__) +#else +#define GTM_LOG_BACKGROUND_SESSION(...) +#endif + +#ifndef GTM_TARGET_SUPPORTS_APP_TRANSPORT_SECURITY + #if (!TARGET_OS_IPHONE && defined(MAC_OS_X_VERSION_10_11) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_11) \ + || (TARGET_OS_IPHONE && defined(__IPHONE_9_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_9_0) + #define GTM_TARGET_SUPPORTS_APP_TRANSPORT_SECURITY 1 + #endif +#endif + +@interface GTMSessionFetcher () + +@property(strong, readwrite, GTM_NULLABLE) NSData *downloadedData; +@property(strong, readwrite, GTM_NULLABLE) NSMutableURLRequest *mutableRequest; + +#if GTM_BACKGROUND_TASK_FETCHING +@property(assign, atomic) UIBackgroundTaskIdentifier backgroundTaskIdentifier; +#endif + +@property(atomic, readwrite, getter=isUsingBackgroundSession) BOOL usingBackgroundSession; + +@end + +#if !GTMSESSION_BUILD_COMBINED_SOURCES +@interface GTMSessionFetcher (GTMSessionFetcherLoggingInternal) +- (void)logFetchWithError:(NSError *)error; +- (void)logNowWithError:(NSError * GTM_NULLABLE_TYPE)error; +- (NSInputStream *)loggedInputStreamForInputStream:(NSInputStream *)inputStream; +- (GTMSessionFetcherBodyStreamProvider)loggedStreamProviderForStreamProvider: + (GTMSessionFetcherBodyStreamProvider)streamProvider; +@end +#endif // !GTMSESSION_BUILD_COMBINED_SOURCES + +GTM_ASSUME_NONNULL_BEGIN + +static NSTimeInterval InitialMinRetryInterval(void) { + return 1.0 + ((double)(arc4random_uniform(0x0FFFF)) / (double) 0x0FFFF); +} + +static BOOL IsLocalhost(NSString * GTM_NULLABLE_TYPE host) { + // We check if there's host, and then make the comparisons. + if (host == nil) return NO; + return ([host caseInsensitiveCompare:@"localhost"] == NSOrderedSame + || [host isEqual:@"::1"] + || [host isEqual:@"127.0.0.1"]); +} + +static GTMSessionFetcherTestBlock GTM_NULLABLE_TYPE gGlobalTestBlock; + +@implementation GTMSessionFetcher { + NSMutableURLRequest *_request; + NSURLSession *_session; + BOOL _shouldInvalidateSession; // immutable after beginFetch + NSURLSession *_sessionNeedingInvalidation; + NSURLSessionConfiguration *_configuration; + NSURLSessionTask *_sessionTask; + NSString *_taskDescription; + float _taskPriority; + NSURLResponse *_response; + NSString *_sessionIdentifier; + BOOL _wasCreatedFromBackgroundSession; + BOOL _didCreateSessionIdentifier; + NSString *_sessionIdentifierUUID; + BOOL _userRequestedBackgroundSession; + BOOL _usingBackgroundSession; + NSMutableData * GTM_NULLABLE_TYPE _downloadedData; + NSError *_downloadFinishedError; + NSData *_downloadResumeData; // immutable after construction + NSURL *_destinationFileURL; + int64_t _downloadedLength; + NSURLCredential *_credential; // username & password + NSURLCredential *_proxyCredential; // credential supplied to proxy servers + BOOL _isStopNotificationNeeded; // set when start notification has been sent + BOOL _isUsingTestBlock; // set when a test block was provided (remains set when the block is released) + id _userData; // retained, if set by caller + NSMutableDictionary *_properties; // more data retained for caller + dispatch_queue_t _callbackQueue; + dispatch_group_t _callbackGroup; // read-only after creation + NSOperationQueue *_delegateQueue; + + id _authorizer; // immutable after beginFetch + + // The service object that created and monitors this fetcher, if any. + id _service; // immutable; set by the fetcher service upon creation + NSString *_serviceHost; + NSInteger _servicePriority; + BOOL _userStoppedFetching; + + BOOL _isRetryEnabled; // user wants auto-retry + NSTimer *_retryTimer; + NSUInteger _retryCount; + NSTimeInterval _maxRetryInterval; // default 60 (download) or 600 (upload) seconds + NSTimeInterval _minRetryInterval; // random between 1 and 2 seconds + NSTimeInterval _retryFactor; // default interval multiplier is 2 + NSTimeInterval _lastRetryInterval; + NSDate *_initialBeginFetchDate; // date that beginFetch was first invoked; immutable after initial beginFetch + NSDate *_initialRequestDate; // date of first request to the target server (ignoring auth) + BOOL _hasAttemptedAuthRefresh; // accessed only in shouldRetryNowForStatus: + + NSString *_comment; // comment for log + NSString *_log; +#if !STRIP_GTM_FETCH_LOGGING + NSMutableData *_loggedStreamData; + NSURL *_redirectedFromURL; + NSString *_logRequestBody; + NSString *_logResponseBody; + BOOL _hasLoggedError; + BOOL _deferResponseBodyLogging; +#endif +} + +#if !GTMSESSION_UNIT_TESTING ++ (void)load { + [self fetchersForBackgroundSessions]; +} +#endif + ++ (instancetype)fetcherWithRequest:(GTM_NULLABLE NSURLRequest *)request { + return [[self alloc] initWithRequest:request configuration:nil]; +} + ++ (instancetype)fetcherWithURL:(NSURL *)requestURL { + return [self fetcherWithRequest:[NSURLRequest requestWithURL:requestURL]]; +} + ++ (instancetype)fetcherWithURLString:(NSString *)requestURLString { + return [self fetcherWithURL:(NSURL * GTM_NONNULL_TYPE)[NSURL URLWithString:requestURLString]]; +} + ++ (instancetype)fetcherWithDownloadResumeData:(NSData *)resumeData { + GTMSessionFetcher *fetcher = [self fetcherWithRequest:nil]; + fetcher.comment = @"Resuming download"; + fetcher.downloadResumeData = resumeData; + return fetcher; +} + ++ (instancetype)fetcherWithSessionIdentifier:(NSString *)sessionIdentifier { + GTMSESSION_ASSERT_DEBUG(sessionIdentifier != nil, @"Invalid session identifier"); + NSMapTable *sessionIdentifierToFetcherMap = [self sessionIdentifierToFetcherMap]; + GTMSessionFetcher *fetcher = [sessionIdentifierToFetcherMap objectForKey:sessionIdentifier]; + if (!fetcher && [sessionIdentifier hasPrefix:kGTMSessionIdentifierPrefix]) { + fetcher = [self fetcherWithRequest:nil]; + [fetcher setSessionIdentifier:sessionIdentifier]; + [sessionIdentifierToFetcherMap setObject:fetcher forKey:sessionIdentifier]; + fetcher->_wasCreatedFromBackgroundSession = YES; + [fetcher setCommentWithFormat:@"Resuming %@", + fetcher && fetcher->_sessionIdentifierUUID ? fetcher->_sessionIdentifierUUID : @"?"]; + } + return fetcher; +} + ++ (NSMapTable *)sessionIdentifierToFetcherMap { + // TODO: What if a service is involved in creating the fetcher? Currently, when re-creating + // fetchers, if a service was involved, it is not re-created. Should the service maintain a map? + static NSMapTable *gSessionIdentifierToFetcherMap = nil; + + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + gSessionIdentifierToFetcherMap = [NSMapTable strongToWeakObjectsMapTable]; + }); + return gSessionIdentifierToFetcherMap; +} + +#if !GTM_ALLOW_INSECURE_REQUESTS ++ (BOOL)appAllowsInsecureRequests { + // If the main bundle Info.plist key NSAppTransportSecurity is present, and it specifies + // NSAllowsArbitraryLoads, then we need to explicitly enforce secure schemes. +#if GTM_TARGET_SUPPORTS_APP_TRANSPORT_SECURITY + static BOOL allowsInsecureRequests; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + NSBundle *mainBundle = [NSBundle mainBundle]; + NSDictionary *appTransportSecurity = + [mainBundle objectForInfoDictionaryKey:@"NSAppTransportSecurity"]; + allowsInsecureRequests = + [[appTransportSecurity objectForKey:@"NSAllowsArbitraryLoads"] boolValue]; + }); + return allowsInsecureRequests; +#else + // For builds targeting iOS 8 or 10.10 and earlier, we want to require fetcher + // security checks. + return YES; +#endif // GTM_TARGET_SUPPORTS_APP_TRANSPORT_SECURITY +} +#else // GTM_ALLOW_INSECURE_REQUESTS ++ (BOOL)appAllowsInsecureRequests { + return YES; +} +#endif // !GTM_ALLOW_INSECURE_REQUESTS + + +- (instancetype)init { + return [self initWithRequest:nil configuration:nil]; +} + +- (instancetype)initWithRequest:(NSURLRequest *)request { + return [self initWithRequest:request configuration:nil]; +} + +- (instancetype)initWithRequest:(GTM_NULLABLE NSURLRequest *)request + configuration:(GTM_NULLABLE NSURLSessionConfiguration *)configuration { + self = [super init]; + if (self) { + if (![NSURLSession class]) { + Class oldFetcherClass = NSClassFromString(@"GTMHTTPFetcher"); + if (oldFetcherClass && request) { + self = [[oldFetcherClass alloc] initWithRequest:(NSURLRequest *)request]; + } else { + self = nil; + } + return self; + } +#if GTM_BACKGROUND_TASK_FETCHING + _backgroundTaskIdentifier = UIBackgroundTaskInvalid; +#endif + _request = [request mutableCopy]; + _configuration = configuration; + + NSData *bodyData = request.HTTPBody; + if (bodyData) { + _bodyLength = (int64_t)bodyData.length; + } else { + _bodyLength = NSURLSessionTransferSizeUnknown; + } + + _callbackQueue = dispatch_get_main_queue(); + _callbackGroup = dispatch_group_create(); + _delegateQueue = [NSOperationQueue mainQueue]; + + _minRetryInterval = InitialMinRetryInterval(); + _maxRetryInterval = kUnsetMaxRetryInterval; + + _taskPriority = -1.0f; // Valid values if set are 0.0...1.0. + +#if !STRIP_GTM_FETCH_LOGGING + // Encourage developers to set the comment property or use + // setCommentWithFormat: by providing a default string. + _comment = @"(No fetcher comment set)"; +#endif + } + return self; +} + +- (id)copyWithZone:(NSZone *)zone { + // disallow use of fetchers in a copy property + [self doesNotRecognizeSelector:_cmd]; + return nil; +} + +- (NSString *)description { + NSString *requestStr = self.mutableRequest.URL.description; + if (requestStr.length == 0) { + if (self.downloadResumeData.length > 0) { + requestStr = @""; + } else if (_wasCreatedFromBackgroundSession) { + requestStr = @""; + } else { + requestStr = @""; + } + } + return [NSString stringWithFormat:@"%@ %p (%@)", [self class], self, requestStr]; +} + +- (void)dealloc { + GTMSESSION_ASSERT_DEBUG(!_isStopNotificationNeeded, + @"unbalanced fetcher notification for %@", _request.URL); + [self forgetSessionIdentifierForFetcherWithoutSyncCheck]; + + // Note: if a session task 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 +} + +#pragma mark - + +// Begin fetching the URL (or begin a retry fetch). The delegate is retained +// for the duration of the fetch connection. + +- (void)beginFetchWithCompletionHandler:(GTM_NULLABLE GTMSessionFetcherCompletionHandler)handler { + _completionHandler = [handler copy]; + + // 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. + [self beginFetchMayDelay:YES mayAuthorize:YES]; +} + +- (GTMSessionFetcherCompletionHandler)completionHandlerWithTarget:(GTM_NULLABLE_TYPE id)target + didFinishSelector:(GTM_NULLABLE_TYPE SEL)finishedSelector { + GTMSessionFetcherAssertValidSelector(target, finishedSelector, @encode(GTMSessionFetcher *), + @encode(NSData *), @encode(NSError *), 0); + GTMSessionFetcherCompletionHandler completionHandler = ^(NSData *data, NSError *error) { + if (target && finishedSelector) { + id selfArg = self; // Placate ARC. + NSMethodSignature *sig = [target methodSignatureForSelector:finishedSelector]; + NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:sig]; + [invocation setSelector:(SEL)finishedSelector]; + [invocation setTarget:target]; + [invocation setArgument:&selfArg atIndex:2]; + [invocation setArgument:&data atIndex:3]; + [invocation setArgument:&error atIndex:4]; + [invocation invoke]; + } + }; + return completionHandler; +} + +- (void)beginFetchWithDelegate:(GTM_NULLABLE_TYPE id)target + didFinishSelector:(GTM_NULLABLE_TYPE SEL)finishedSelector { + GTMSessionFetcherCompletionHandler handler = [self completionHandlerWithTarget:target + didFinishSelector:finishedSelector]; + [self beginFetchWithCompletionHandler:handler]; +} + +- (void)beginFetchMayDelay:(BOOL)mayDelay + mayAuthorize:(BOOL)mayAuthorize { + // This is the internal entry point for re-starting fetches. + + NSMutableURLRequest *fetchRequest = self.mutableRequest; + NSURL *fetchRequestURL = fetchRequest.URL; + NSString *priorSessionIdentifier = self.sessionIdentifier; + + // A utility block for creating error objects when we fail to start the fetch. + NSError *(^beginFailureError)(NSInteger) = ^(NSInteger code){ + NSString *urlString = fetchRequestURL.absoluteString; + NSDictionary *userInfo = @{ + NSURLErrorFailingURLStringErrorKey : (urlString ? urlString : @"(missing URL)") + }; + return [NSError errorWithDomain:kGTMSessionFetcherErrorDomain + code:code + userInfo:userInfo]; + }; + + // Catch delegate queue maxConcurrentOperationCount values other than 1, particularly + // NSOperationQueueDefaultMaxConcurrentOperationCount (-1), to avoid the additional complexity + // of simultaneous or out-of-order delegate callbacks. + GTMSESSION_ASSERT_DEBUG(_delegateQueue.maxConcurrentOperationCount == 1, + @"delegate queue %@ should support one concurrent operation, not %zd", + _delegateQueue.name, _delegateQueue.maxConcurrentOperationCount); + + if (!_initialBeginFetchDate) { + // This ivar is set once here on the initial beginFetch so need not be synchronized. + _initialBeginFetchDate = [[NSDate alloc] init]; + } + + if (self.sessionTask != nil) { + // If cached fetcher returned through fetcherWithSessionIdentifier:, then it's + // already begun, but don't consider this a failure, since the user need not know this. + if (self.sessionIdentifier != nil) { + return; + } + GTMSESSION_ASSERT_DEBUG(NO, @"Fetch object %@ being reused; this should never happen", self); + [self failToBeginFetchWithError:beginFailureError(GTMSessionFetcherErrorDownloadFailed)]; + return; + } + + if (fetchRequestURL == nil && !_downloadResumeData && !priorSessionIdentifier) { + GTMSESSION_ASSERT_DEBUG(NO, @"Beginning a fetch requires a request with a URL"); + [self failToBeginFetchWithError:beginFailureError(GTMSessionFetcherErrorDownloadFailed)]; + return; + } + + // We'll respect the user's request for a background session (unless this is + // an upload fetcher, which does its initial request foreground.) + self.usingBackgroundSession = self.useBackgroundSession && [self canFetchWithBackgroundSession]; + + NSURL *bodyFileURL = self.bodyFileURL; + if (bodyFileURL) { + NSError *fileCheckError; + if (![bodyFileURL checkResourceIsReachableAndReturnError:&fileCheckError]) { + // This assert fires when the file being uploaded no longer exists once + // the fetcher is ready to start the upload. + GTMSESSION_ASSERT_DEBUG_OR_LOG(0, @"Body file is unreachable: %@\n %@", + bodyFileURL.path, fileCheckError); + [self failToBeginFetchWithError:fileCheckError]; + return; + } + } + + NSString *requestScheme = fetchRequestURL.scheme; + BOOL isDataRequest = [requestScheme isEqual:@"data"]; + if (isDataRequest && priorSessionIdentifier) { + // NSURLSession does not support data URLs in background sessions. + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + _sessionIdentifier = nil; + _usingBackgroundSession = NO; + } // @synchronized(self) + } + +#if GTM_ALLOW_INSECURE_REQUESTS + BOOL shouldCheckSecurity = NO; +#else + BOOL shouldCheckSecurity = (fetchRequestURL != nil + && !isDataRequest + && [[self class] appAllowsInsecureRequests]); +#endif + + if (shouldCheckSecurity) { + // Allow https only for requests, unless overridden by the client. + // + // Non-https requests may too easily be snooped, so we disallow them by default. + // + // file: and data: schemes are usually safe if they are hardcoded in the client or provided + // by a trusted source, but since it's fairly rare to need them, it's safest to make clients + // explicitly whitelist them. + BOOL isSecure = + requestScheme != nil && [requestScheme caseInsensitiveCompare:@"https"] == NSOrderedSame; + if (!isSecure) { + BOOL allowRequest = NO; + NSString *host = fetchRequestURL.host; + + // Check schemes first. A file scheme request may be allowed here, or as a localhost request. + for (NSString *allowedScheme in _allowedInsecureSchemes) { + if (requestScheme != nil && + [requestScheme caseInsensitiveCompare:allowedScheme] == NSOrderedSame) { + allowRequest = YES; + break; + } + } + if (!allowRequest) { + // Check for localhost requests. Security checks only occur for non-https requests, so + // this check won't happen for an https request to localhost. + BOOL isLocalhostRequest = (host.length == 0 && [fetchRequestURL isFileURL]) || IsLocalhost(host); + if (isLocalhostRequest) { + if (self.allowLocalhostRequest) { + allowRequest = YES; + } else { + GTMSESSION_ASSERT_DEBUG(NO, @"Fetch request for localhost but fetcher" + @" allowLocalhostRequest is not set: %@", fetchRequestURL); + } + } else { + GTMSESSION_ASSERT_DEBUG(NO, @"Insecure fetch request has a scheme (%@)" + @" not found in fetcher allowedInsecureSchemes (%@): %@", + requestScheme, _allowedInsecureSchemes ?: @" @[] ", fetchRequestURL); + } + } + + if (!allowRequest) { +#if !DEBUG + NSLog(@"Insecure fetch disallowed for %@", fetchRequestURL.description ?: @"nil request URL"); +#endif + [self failToBeginFetchWithError:beginFailureError(GTMSessionFetcherErrorInsecureRequest)]; + return; + } + } // !isSecure + } // (requestURL != nil) && !isDataRequest + + if (self.cookieStorage == nil) { + self.cookieStorage = [[self class] staticCookieStorage]; + } + + BOOL isRecreatingSession = (self.sessionIdentifier != nil) && (fetchRequest == nil); + + self.canShareSession = !isRecreatingSession && !self.usingBackgroundSession; + + if (!self.session && self.canShareSession) { + self.session = [_service sessionForFetcherCreation]; + // If _session is nil, then the service's session creation semaphore will block + // until this fetcher invokes fetcherDidCreateSession: below, so this *must* invoke + // that method, even if the session fails to be created. + } + + if (!self.session) { + // Create a session. + if (!_configuration) { + if (priorSessionIdentifier || self.usingBackgroundSession) { + NSString *sessionIdentifier = priorSessionIdentifier; + if (!sessionIdentifier) { + sessionIdentifier = [self createSessionIdentifierWithMetadata:nil]; + } + NSMapTable *sessionIdentifierToFetcherMap = [[self class] sessionIdentifierToFetcherMap]; + [sessionIdentifierToFetcherMap setObject:self forKey:self.sessionIdentifier]; + +#if (!TARGET_OS_IPHONE && defined(MAC_OS_X_VERSION_10_10) && MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10) \ + || (TARGET_OS_IPHONE && defined(__IPHONE_8_0) && __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_8_0) + // iOS 8/10.10 builds require the new backgroundSessionConfiguration method name. + _configuration = + [NSURLSessionConfiguration backgroundSessionConfigurationWithIdentifier:sessionIdentifier]; +#elif (!TARGET_OS_IPHONE && defined(MAC_OS_X_VERSION_10_10) && MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_10) \ + || (TARGET_OS_IPHONE && defined(__IPHONE_8_0) && __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_8_0) + // Do a runtime check to avoid a deprecation warning about using + // +backgroundSessionConfiguration: on iOS 8. + if ([NSURLSessionConfiguration respondsToSelector:@selector(backgroundSessionConfigurationWithIdentifier:)]) { + // Running on iOS 8+/OS X 10.10+. + _configuration = + [NSURLSessionConfiguration backgroundSessionConfigurationWithIdentifier:sessionIdentifier]; + } else { + // Running on iOS 7/OS X 10.9. + _configuration = + [NSURLSessionConfiguration backgroundSessionConfiguration:sessionIdentifier]; + } +#else + // Building with an SDK earlier than iOS 8/OS X 10.10. + _configuration = + [NSURLSessionConfiguration backgroundSessionConfiguration:sessionIdentifier]; +#endif + self.usingBackgroundSession = YES; + self.canShareSession = NO; + } else { + _configuration = [NSURLSessionConfiguration ephemeralSessionConfiguration]; + } +#if !GTM_ALLOW_INSECURE_REQUESTS + _configuration.TLSMinimumSupportedProtocol = kTLSProtocol12; +#endif + } // !_configuration + _configuration.HTTPCookieStorage = self.cookieStorage; + + if (_configurationBlock) { + _configurationBlock(self, _configuration); + } + + id delegate = [_service sessionDelegate]; + if (!delegate || !self.canShareSession) { + delegate = self; + } + self.session = [NSURLSession sessionWithConfiguration:_configuration + delegate:delegate + delegateQueue:self.sessionDelegateQueue]; + GTMSESSION_ASSERT_DEBUG(self.session, @"Couldn't create session"); + + // Tell the service about the session created by this fetcher. This also signals the + // service's semaphore to allow other fetchers to request this session. + [_service fetcherDidCreateSession:self]; + + // If this assertion fires, the client probably tried to use a session identifier that was + // already used. The solution is to make the client use a unique identifier (or better yet let + // the session fetcher assign the identifier). + GTMSESSION_ASSERT_DEBUG(self.session.delegate == delegate, @"Couldn't assign delegate."); + + if (self.session) { + BOOL isUsingSharedDelegate = (delegate != self); + if (!isUsingSharedDelegate) { + _shouldInvalidateSession = YES; + } + } + } + + if (isRecreatingSession) { + _shouldInvalidateSession = YES; + + // Let's make sure there are tasks still running or if not that we get a callback from a + // completed one; otherwise, we assume the tasks failed. + // This is the observed behavior perhaps 25% of the time within the Simulator running 7.0.3 on + // exiting the app after starting an upload and relaunching the app if we manage to relaunch + // after the task has completed, but before the system relaunches us in the background. + [self.session getTasksWithCompletionHandler:^(NSArray *dataTasks, NSArray *uploadTasks, + NSArray *downloadTasks) { + if (dataTasks.count == 0 && uploadTasks.count == 0 && downloadTasks.count == 0) { + double const kDelayInSeconds = 1.0; // We should get progress indication or completion soon + dispatch_time_t checkForFeedbackDelay = + dispatch_time(DISPATCH_TIME_NOW, (int64_t)(kDelayInSeconds * NSEC_PER_SEC)); + dispatch_after(checkForFeedbackDelay, dispatch_get_main_queue(), ^{ + if (!self.sessionTask && !fetchRequest) { + // If our task and/or request haven't been restored, then we assume task feedback lost. + [self removePersistedBackgroundSessionFromDefaults]; + NSError *sessionError = + [NSError errorWithDomain:kGTMSessionFetcherErrorDomain + code:GTMSessionFetcherErrorBackgroundFetchFailed + userInfo:nil]; + [self failToBeginFetchWithError:sessionError]; + } + }); + } + }]; + return; + } + + self.downloadedData = nil; + self.downloadedLength = 0; + + if (_servicePriority == NSIntegerMin) { + mayDelay = NO; + } + if (mayDelay && _service) { + BOOL shouldFetchNow = [_service fetcherShouldBeginFetching:self]; + if (!shouldFetchNow) { + // The fetch is deferred, but will happen later. + // + // If this session is held by the fetcher service, clear the session now so that we don't + // assume it's still valid after the fetcher is restarted. + if (self.canShareSession) { + self.session = nil; + } + return; + } + } + + NSString *effectiveHTTPMethod = [fetchRequest valueForHTTPHeaderField:@"X-HTTP-Method-Override"]; + if (effectiveHTTPMethod == nil) { + effectiveHTTPMethod = fetchRequest.HTTPMethod; + } + BOOL isEffectiveHTTPGet = (effectiveHTTPMethod == nil + || [effectiveHTTPMethod isEqual:@"GET"]); + + BOOL needsUploadTask = (_useUploadTask || _bodyFileURL || _bodyStreamProvider); + if (_bodyData || _bodyStreamProvider || fetchRequest.HTTPBodyStream) { + if (isEffectiveHTTPGet) { + [fetchRequest setHTTPMethod:@"POST"]; + isEffectiveHTTPGet = NO; + } + + if (_bodyData) { + if (!needsUploadTask) { + [fetchRequest setHTTPBody:_bodyData]; + } +#if !STRIP_GTM_FETCH_LOGGING + } else if (fetchRequest.HTTPBodyStream) { + if ([self respondsToSelector:@selector(loggedInputStreamForInputStream:)]) { + fetchRequest.HTTPBodyStream = [self performSelector:@selector(loggedInputStreamForInputStream:) + withObject:fetchRequest.HTTPBodyStream]; + } +#endif + } + } + + // 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 && !isDataRequest) { + BOOL isAuthorized = [_authorizer isAuthorizedRequest:fetchRequest]; + if (!isAuthorized) { + // Authorization needed. + // + // If this session is held by the fetcher service, clear the session now so that we don't + // assume it's still valid after authorization completes. + if (self.canShareSession) { + self.session = nil; + } + + // Authorizing the request will recursively call this beginFetch:mayDelay: + // or failToBeginFetchWithError:. + [self authorizeRequest]; + return; + } + } + + // set the default upload or download retry interval, if necessary + if ([self isRetryEnabled] && self.maxRetryInterval <= 0) { + if (isEffectiveHTTPGet || [effectiveHTTPMethod isEqual:@"HEAD"]) { + [self setMaxRetryInterval:kDefaultMaxDownloadRetryInterval]; + } else { + [self setMaxRetryInterval:kDefaultMaxUploadRetryInterval]; + } + } + + // finally, start the connection + NSURLSessionTask *newSessionTask; + BOOL needsDataAccumulator = NO; + if (_downloadResumeData) { + newSessionTask = [_session downloadTaskWithResumeData:_downloadResumeData]; + GTMSESSION_ASSERT_DEBUG_OR_LOG(newSessionTask, + @"Failed downloadTaskWithResumeData for %@, resume data %tu bytes", + _session, _downloadResumeData.length); + } else if (_destinationFileURL && !isDataRequest) { + newSessionTask = [_session downloadTaskWithRequest:fetchRequest]; + GTMSESSION_ASSERT_DEBUG_OR_LOG(newSessionTask, @"Failed downloadTaskWithRequest for %@, %@", + _session, fetchRequest); + } else if (needsUploadTask) { + if (_bodyFileURL) { + newSessionTask = [_session uploadTaskWithRequest:fetchRequest + fromFile:(NSURL * GTM_NONNULL_TYPE)_bodyFileURL]; + GTMSESSION_ASSERT_DEBUG_OR_LOG(newSessionTask, + @"Failed uploadTaskWithRequest for %@, %@, file %@", + _session, fetchRequest, _bodyFileURL.path); + } else if (_bodyStreamProvider) { + newSessionTask = [_session uploadTaskWithStreamedRequest:fetchRequest]; + GTMSESSION_ASSERT_DEBUG_OR_LOG(newSessionTask, + @"Failed uploadTaskWithStreamedRequest for %@, %@", + _session, fetchRequest); + } else { + GTMSESSION_ASSERT_DEBUG_OR_LOG(_bodyData != nil, + @"Upload task needs body data, %@", fetchRequest); + newSessionTask = [_session uploadTaskWithRequest:fetchRequest + fromData:(NSData * GTM_NONNULL_TYPE)_bodyData]; + GTMSESSION_ASSERT_DEBUG_OR_LOG(newSessionTask, + @"Failed uploadTaskWithRequest for %@, %@, body data %tu bytes", + _session, fetchRequest, _bodyData.length); + } + needsDataAccumulator = YES; + } else { + newSessionTask = [_session dataTaskWithRequest:fetchRequest]; + needsDataAccumulator = YES; + GTMSESSION_ASSERT_DEBUG_OR_LOG(newSessionTask, @"Failed dataTaskWithRequest for %@, %@", + _session, fetchRequest); + } + self.sessionTask = newSessionTask; + + if (!newSessionTask) { + // We shouldn't get here; if we're here, an earlier assertion should have fired to explain + // which session task creation failed. + [self failToBeginFetchWithError:beginFailureError(GTMSessionFetcherErrorTaskCreationFailed)]; + return; + } + + if (needsDataAccumulator && _accumulateDataBlock == nil) { + self.downloadedData = [NSMutableData data]; + } + if (_taskDescription) { + newSessionTask.taskDescription = _taskDescription; + } + if (_taskPriority >= 0) { +#if (!TARGET_OS_IPHONE && defined(MAC_OS_X_VERSION_10_10) && MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10) \ + || (TARGET_OS_IPHONE && defined(__IPHONE_8_0) && __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_8_0) + BOOL hasTaskPriority = YES; +#else + BOOL hasTaskPriority = [newSessionTask respondsToSelector:@selector(setPriority:)]; +#endif + if (hasTaskPriority) { + newSessionTask.priority = _taskPriority; + } + } + +#if GTM_DISABLE_FETCHER_TEST_BLOCK + GTMSESSION_ASSERT_DEBUG(_testBlock == nil && gGlobalTestBlock == nil, @"test blocks disabled"); + _testBlock = nil; +#else + if (!_testBlock) { + if (gGlobalTestBlock) { + // Note that the test block may pass nil for all of its response parameters, + // indicating that the fetch should actually proceed. This is useful when the + // global test block has been set, and the app is only testing a specific + // fetcher. The block simulation code will then resume the task. + _testBlock = gGlobalTestBlock; + } + } + _isUsingTestBlock = (_testBlock != nil); +#endif // GTM_DISABLE_FETCHER_TEST_BLOCK + +#if GTM_BACKGROUND_TASK_FETCHING + // Background tasks seem to interfere with out-of-process uploads and downloads. + if (!self.skipBackgroundTask && !_usingBackgroundSession) { + // Tell UIApplication that we want to continue even when the app is in the + // background. + UIApplication *app = [UIApplication sharedApplication]; +#if DEBUG + NSString *bgTaskName = [NSString stringWithFormat:@"%@-%@", + NSStringFromClass([self class]), fetchRequest.URL.host]; +#else + NSString *bgTaskName = @"GTMSessionFetcher"; +#endif + self.backgroundTaskIdentifier = [app beginBackgroundTaskWithName:bgTaskName + expirationHandler:^{ + // Background task expiration callback - this block is always invoked by + // UIApplication on the main thread. + UIBackgroundTaskIdentifier identifier = self.backgroundTaskIdentifier; + if (identifier != UIBackgroundTaskInvalid) { + [[UIApplication sharedApplication] endBackgroundTask:identifier]; + + self.backgroundTaskIdentifier = UIBackgroundTaskInvalid; + } + }]; + } +#endif + + if (!_initialRequestDate) { + _initialRequestDate = [[NSDate alloc] init]; + } + + // We don't expect to reach here even on retry or auth until a stop notification has been sent + // for the previous task, but we should ensure that we don't unbalance that. + GTMSESSION_ASSERT_DEBUG(!_isStopNotificationNeeded, @"Start notification without a prior stop"); + [self sendStopNotificationIfNeeded]; + + [self addPersistedBackgroundSessionToDefaults]; + + [self setStopNotificationNeeded:YES]; + + [self postNotificationOnMainThreadWithName:kGTMSessionFetcherStartedNotification + userInfo:nil + requireAsync:NO]; + + // The service needs to know our task if it is serving as delegate. + [_service fetcherDidBeginFetching:self]; + + if (_testBlock) { +#if !GTM_DISABLE_FETCHER_TEST_BLOCK + [self simulateFetchForTestBlock]; +#endif + } else { + // We resume the session task after posting the notification since the + // delegate callbacks may happen immediately if the fetch is started off + // the main thread or the session delegate queue is on a background thread, + // and we don't want to post a start notification after a premature finish + // of the session task. + [newSessionTask resume]; + } +} + +NSData * GTM_NULLABLE_TYPE GTMDataFromInputStream(NSInputStream *inputStream, NSError **outError) { + NSMutableData *data = [NSMutableData data]; + + [inputStream open]; + NSInteger numberOfBytesRead = 0; + while ([inputStream hasBytesAvailable]) { + uint8_t buffer[512]; + numberOfBytesRead = [inputStream read:buffer maxLength:sizeof(buffer)]; + if (numberOfBytesRead > 0) { + [data appendBytes:buffer length:(NSUInteger)numberOfBytesRead]; + } else { + break; + } + } + [inputStream close]; + NSError *streamError = inputStream.streamError; + + if (streamError) { + data = nil; + } + if (outError) { + *outError = streamError; + } + return data; +} + +#if !GTM_DISABLE_FETCHER_TEST_BLOCK + +- (void)simulateFetchForTestBlock { + // This is invoked on the same thread as the beginFetch method was. + // + // Callbacks will all occur on the callback queue. + _testBlock(self, ^(NSURLResponse *response, NSData *responseData, NSError *error) { + // Callback from test block. + if (response == nil && responseData == nil && error == nil) { + // Assume the fetcher should execute rather than be tested. + _testBlock = nil; + _isUsingTestBlock = NO; + [_sessionTask resume]; + return; + } + + if (_bodyStreamProvider) { + _bodyStreamProvider(^(NSInputStream *bodyStream){ + // Read from the input stream into an NSData buffer. We'll drain the stream + // explicitly on a background queue. + [self invokeOnCallbackQueue:dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0) + afterUserStopped:NO + block:^{ + NSError *streamError; + NSData *streamedData = GTMDataFromInputStream(bodyStream, &streamError); + + dispatch_async(dispatch_get_main_queue(), ^{ + // Continue callbacks on the main thread, since serial behavior + // is more reliable for tests. + [self simulateDataCallbacksForTestBlockWithBodyData:streamedData + response:response + responseData:responseData + error:(error ?: streamError)]; + }); + }]; + }); + } else { + // No input stream; use the supplied data or file URL. + if (_bodyFileURL) { + NSError *readError; + _bodyData = [NSData dataWithContentsOfURL:(NSURL * GTM_NONNULL_TYPE)_bodyFileURL + options:NSDataReadingMappedIfSafe + error:&readError]; + error = readError; + } + + // No stream provider. + + // In real fetches, nothing happens until the run loop spins, so apps have leeway to + // set callbacks after they call beginFetch. We'll mirror that fetcher behavior by + // delaying callbacks here at least to the next spin of the run loop. That keeps + // immediate, synchronous setting of callback blocks after beginFetch working in tests. + dispatch_async(dispatch_get_main_queue(), ^{ + [self simulateDataCallbacksForTestBlockWithBodyData:_bodyData + response:response + responseData:responseData + error:error]; + }); + } + }); +} + +- (void)simulateByteTransferReportWithDataLength:(int64_t)totalDataLength + block:(GTMSessionFetcherSendProgressBlock)block { + // This utility method simulates transfer progress with up to three callbacks. + // It is used to call back to any of the progress blocks. + int64_t sendReportSize = totalDataLength / 3 + 1; + int64_t totalSent = 0; + while (totalSent < totalDataLength) { + int64_t bytesRemaining = totalDataLength - totalSent; + sendReportSize = MIN(sendReportSize, bytesRemaining); + totalSent += sendReportSize; + [self invokeOnCallbackQueueUnlessStopped:^{ + block(sendReportSize, totalSent, totalDataLength); + }]; + } +} + +- (void)simulateDataCallbacksForTestBlockWithBodyData:(NSData * GTM_NULLABLE_TYPE)bodyData + response:(NSURLResponse *)response + responseData:(NSData *)responseData + error:(NSError *)error { + // This method does the test simulation of callbacks once the upload + // and download data are known. + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + // Simulate receipt of redirection. + if (_willRedirectBlock) { + [self invokeOnCallbackUnsynchronizedQueueAfterUserStopped:YES + block:^{ + if (_willRedirectBlock) { + _willRedirectBlock((NSHTTPURLResponse *)response, _request, + ^(NSURLRequest *redirectRequest) { + // For simulation, we'll assume the app will just continue. + }); + } + }]; + } + + // Simulate receipt of an initial response. + if (_didReceiveResponseBlock) { + [self invokeOnCallbackUnsynchronizedQueueAfterUserStopped:YES + block:^{ + if (_didReceiveResponseBlock) { + _didReceiveResponseBlock(response, ^(NSURLSessionResponseDisposition desiredDisposition) { + // For simulation, we'll assume the disposition is to continue. + }); + } + }]; + } + + // Simulate reporting send progress. + if (_sendProgressBlock) { + [self simulateByteTransferReportWithDataLength:(int64_t)bodyData.length + block:^(int64_t bytesSent, + int64_t totalBytesSent, + int64_t totalBytesExpectedToSend) { + // This is invoked on the callback queue unless stopped. + if (_sendProgressBlock) { + _sendProgressBlock(bytesSent, totalBytesSent, totalBytesExpectedToSend); + } + }]; + } + + if (_destinationFileURL) { + // Simulate download to file progress. + if (_downloadProgressBlock) { + [self simulateByteTransferReportWithDataLength:(int64_t)responseData.length + block:^(int64_t bytesDownloaded, + int64_t totalBytesDownloaded, + int64_t totalBytesExpectedToDownload) { + // This is invoked on the callback queue unless stopped. + if (_downloadProgressBlock) { + _downloadProgressBlock(bytesDownloaded, totalBytesDownloaded, + totalBytesExpectedToDownload); + } + }]; + } + + NSError *writeError; + [responseData writeToURL:_destinationFileURL + options:NSDataWritingAtomic + error:&writeError]; + if (writeError) { + // Tell the test code that writing failed. + error = writeError; + } + } else { + // Simulate download to NSData progress. + if (_accumulateDataBlock) { + if (responseData) { + [self invokeOnCallbackQueueUnlessStopped:^{ + if (_accumulateDataBlock) { + _accumulateDataBlock(responseData); + } + }]; + } + } else { + _downloadedData = [responseData mutableCopy]; + } + + if (_receivedProgressBlock) { + [self simulateByteTransferReportWithDataLength:(int64_t)responseData.length + block:^(int64_t bytesReceived, + int64_t totalBytesReceived, + int64_t totalBytesExpectedToReceive) { + // This is invoked on the callback queue unless stopped. + if (_receivedProgressBlock) { + _receivedProgressBlock(bytesReceived, totalBytesReceived); + } + }]; + } + + if (_willCacheURLResponseBlock) { + // Simulate letting the client inspect and alter the cached response. + NSCachedURLResponse *cachedResponse = + [[NSCachedURLResponse alloc] initWithResponse:response + data:responseData]; + [self invokeOnCallbackUnsynchronizedQueueAfterUserStopped:YES + block:^{ + if (_willCacheURLResponseBlock) { + _willCacheURLResponseBlock(cachedResponse, ^(NSCachedURLResponse *responseToCache){ + // The app may provide an alternative response, or nil to defeat caching. + }); + } + }]; + } + } + _response = response; + } // @synchronized(self) + + NSOperationQueue *queue = self.sessionDelegateQueue; + [queue addOperationWithBlock:^{ + // Rather than invoke failToBeginFetchWithError: we want to simulate completion of + // a connection that started and ended, so we'll call down to finishWithError: + NSInteger status = error ? error.code : 200; + if (status >= 200 && status <= 399) { + [self finishWithError:nil shouldRetry:NO]; + } else { + [self shouldRetryNowForStatus:status + error:error + forceAssumeRetry:NO + response:^(BOOL shouldRetry) { + [self finishWithError:error shouldRetry:shouldRetry]; + }]; + } + }]; +} + +#endif // !GTM_DISABLE_FETCHER_TEST_BLOCK + +- (void)setSessionTask:(NSURLSessionTask *)sessionTask { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + if (_sessionTask != sessionTask) { + _sessionTask = sessionTask; + if (_sessionTask) { + // Request could be nil on restoring this fetcher from a background session. + if (!_request) { + _request = [_sessionTask.originalRequest mutableCopy]; + } + } + } + } // @synchronized(self) +} + +- (NSURLSessionTask * GTM_NULLABLE_TYPE)sessionTask { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + return _sessionTask; + } // @synchronized(self) +} + ++ (NSUserDefaults *)fetcherUserDefaults { + static NSUserDefaults *gFetcherUserDefaults = nil; + + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + Class fetcherUserDefaultsClass = NSClassFromString(@"GTMSessionFetcherUserDefaultsFactory"); + if (fetcherUserDefaultsClass) { + gFetcherUserDefaults = [fetcherUserDefaultsClass fetcherUserDefaults]; + } else { + gFetcherUserDefaults = [NSUserDefaults standardUserDefaults]; + } + }); + return gFetcherUserDefaults; +} + +- (void)addPersistedBackgroundSessionToDefaults { + NSString *sessionIdentifier = self.sessionIdentifier; + if (!sessionIdentifier) { + return; + } + NSArray *oldBackgroundSessions = [[self class] activePersistedBackgroundSessions]; + if ([oldBackgroundSessions containsObject:_sessionIdentifier]) { + return; + } + NSMutableArray *newBackgroundSessions = + [NSMutableArray arrayWithArray:oldBackgroundSessions]; + [newBackgroundSessions addObject:sessionIdentifier]; + GTM_LOG_BACKGROUND_SESSION(@"Add to background sessions: %@", newBackgroundSessions); + + NSUserDefaults *userDefaults = [[self class] fetcherUserDefaults]; + [userDefaults setObject:newBackgroundSessions + forKey:kGTMSessionFetcherPersistedDestinationKey]; + [userDefaults synchronize]; +} + +- (void)removePersistedBackgroundSessionFromDefaults { + NSString *sessionIdentifier = self.sessionIdentifier; + if (!sessionIdentifier) return; + + NSArray *oldBackgroundSessions = [[self class] activePersistedBackgroundSessions]; + if (!oldBackgroundSessions) { + return; + } + NSMutableArray *newBackgroundSessions = + [NSMutableArray arrayWithArray:oldBackgroundSessions]; + NSUInteger sessionIndex = [newBackgroundSessions indexOfObject:sessionIdentifier]; + if (sessionIndex == NSNotFound) { + return; + } + [newBackgroundSessions removeObjectAtIndex:sessionIndex]; + GTM_LOG_BACKGROUND_SESSION(@"Remove from background sessions: %@", newBackgroundSessions); + + NSUserDefaults *userDefaults = [[self class] fetcherUserDefaults]; + if (newBackgroundSessions.count == 0) { + [userDefaults removeObjectForKey:kGTMSessionFetcherPersistedDestinationKey]; + } else { + [userDefaults setObject:newBackgroundSessions + forKey:kGTMSessionFetcherPersistedDestinationKey]; + } + [userDefaults synchronize]; +} + ++ (NSArray *)activePersistedBackgroundSessions { + NSUserDefaults *userDefaults = [[self class] fetcherUserDefaults]; + NSArray *oldBackgroundSessions = + [userDefaults arrayForKey:kGTMSessionFetcherPersistedDestinationKey]; + if (oldBackgroundSessions.count == 0) { + return nil; + } + NSMutableArray *activeBackgroundSessions = nil; + NSMapTable *sessionIdentifierToFetcherMap = [self sessionIdentifierToFetcherMap]; + for (NSString *sessionIdentifier in oldBackgroundSessions) { + GTMSessionFetcher *fetcher = [sessionIdentifierToFetcherMap objectForKey:sessionIdentifier]; + if (fetcher) { + if (!activeBackgroundSessions) { + activeBackgroundSessions = [[NSMutableArray alloc] init]; + } + [activeBackgroundSessions addObject:sessionIdentifier]; + } + } + return activeBackgroundSessions; +} + ++ (NSArray *)fetchersForBackgroundSessions { + NSUserDefaults *userDefaults = [[self class] fetcherUserDefaults]; + NSArray *backgroundSessions = + [userDefaults arrayForKey:kGTMSessionFetcherPersistedDestinationKey]; + NSMapTable *sessionIdentifierToFetcherMap = [self sessionIdentifierToFetcherMap]; + NSMutableArray *fetchers = [NSMutableArray array]; + for (NSString *sessionIdentifier in backgroundSessions) { + GTMSessionFetcher *fetcher = [sessionIdentifierToFetcherMap objectForKey:sessionIdentifier]; + if (!fetcher) { + fetcher = [self fetcherWithSessionIdentifier:sessionIdentifier]; + GTMSESSION_ASSERT_DEBUG(fetcher != nil, + @"Unexpected invalid session identifier: %@", sessionIdentifier); + [fetcher beginFetchWithCompletionHandler:nil]; + } + GTM_LOG_BACKGROUND_SESSION(@"%@ restoring session %@ by creating fetcher %@ %p", + [self class], sessionIdentifier, fetcher, fetcher); + if (fetcher != nil) { + [fetchers addObject:fetcher]; + } + } + return fetchers; +} + +#if TARGET_OS_IPHONE ++ (void)application:(UIApplication *)application + handleEventsForBackgroundURLSession:(NSString *)identifier + completionHandler:(GTMSessionFetcherSystemCompletionHandler)completionHandler { + GTMSessionFetcher *fetcher = [self fetcherWithSessionIdentifier:identifier]; + if (fetcher != nil) { + fetcher.systemCompletionHandler = completionHandler; + } else { + GTM_LOG_BACKGROUND_SESSION(@"%@ did not create background session identifier: %@", + [self class], identifier); + } +} +#endif + +- (NSString * GTM_NULLABLE_TYPE)sessionIdentifier { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + return _sessionIdentifier; + } // @synchronized(self) +} + +- (void)setSessionIdentifier:(NSString *)sessionIdentifier { + GTMSESSION_ASSERT_DEBUG(sessionIdentifier != nil, @"Invalid session identifier"); + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + GTMSESSION_ASSERT_DEBUG(!_session, @"Unable to set session identifier after session created"); + _sessionIdentifier = [sessionIdentifier copy]; + _usingBackgroundSession = YES; + _canShareSession = NO; + [self restoreDefaultStateForSessionIdentifierMetadata]; + } // @synchronized(self) +} + +- (NSDictionary * GTM_NULLABLE_TYPE)sessionUserInfo { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + if (_sessionUserInfo == nil) { + // We'll return the metadata dictionary with internal keys removed. This avoids the user + // re-using the userInfo dictionary later and accidentally including the internal keys. + NSMutableDictionary *metadata = [[self sessionIdentifierMetadataUnsynchronized] mutableCopy]; + NSSet *keysToRemove = [metadata keysOfEntriesPassingTest:^BOOL(id key, id obj, BOOL *stop) { + return [key hasPrefix:@"_"]; + }]; + [metadata removeObjectsForKeys:[keysToRemove allObjects]]; + if (metadata.count > 0) { + _sessionUserInfo = metadata; + } + } + return _sessionUserInfo; + } // @synchronized(self) +} + +- (void)setSessionUserInfo:(NSDictionary * GTM_NULLABLE_TYPE)dictionary { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + GTMSESSION_ASSERT_DEBUG(_sessionIdentifier == nil, @"Too late to assign userInfo"); + _sessionUserInfo = dictionary; + } // @synchronized(self) +} + +- (NSDictionary *)sessionIdentifierDefaultMetadata { + GTMSessionCheckSynchronized(self); + + NSMutableDictionary *defaultUserInfo = [[NSMutableDictionary alloc] init]; + if (_destinationFileURL) { + defaultUserInfo[kGTMSessionIdentifierDestinationFileURLMetadataKey] = + [_destinationFileURL absoluteString]; + } + if (_bodyFileURL) { + defaultUserInfo[kGTMSessionIdentifierBodyFileURLMetadataKey] = [_bodyFileURL absoluteString]; + } + return (defaultUserInfo.count > 0) ? defaultUserInfo : nil; +} + +- (void)restoreDefaultStateForSessionIdentifierMetadata { + GTMSessionCheckSynchronized(self); + + NSDictionary *metadata = [self sessionIdentifierMetadataUnsynchronized]; + NSString *destinationFileURLString = metadata[kGTMSessionIdentifierDestinationFileURLMetadataKey]; + if (destinationFileURLString) { + _destinationFileURL = [NSURL URLWithString:destinationFileURLString]; + GTM_LOG_BACKGROUND_SESSION(@"Restoring destination file URL: %@", _destinationFileURL); + } + NSString *bodyFileURLString = metadata[kGTMSessionIdentifierBodyFileURLMetadataKey]; + if (bodyFileURLString) { + _bodyFileURL = [NSURL URLWithString:bodyFileURLString]; + GTM_LOG_BACKGROUND_SESSION(@"Restoring body file URL: %@", _bodyFileURL); + } +} + +- (NSDictionary * GTM_NULLABLE_TYPE)sessionIdentifierMetadata { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + return [self sessionIdentifierMetadataUnsynchronized]; + } +} + +- (NSDictionary * GTM_NULLABLE_TYPE)sessionIdentifierMetadataUnsynchronized { + GTMSessionCheckSynchronized(self); + + // Session Identifier format: "com.google.__ + if (!_sessionIdentifier) { + return nil; + } + NSScanner *metadataScanner = [NSScanner scannerWithString:_sessionIdentifier]; + [metadataScanner setCharactersToBeSkipped:nil]; + NSString *metadataString; + NSString *uuid; + if ([metadataScanner scanUpToString:@"_" intoString:NULL] && + [metadataScanner scanString:@"_" intoString:NULL] && + [metadataScanner scanUpToString:@"_" intoString:&uuid] && + [metadataScanner scanString:@"_" intoString:NULL] && + [metadataScanner scanUpToString:@"\n" intoString:&metadataString]) { + _sessionIdentifierUUID = uuid; + NSData *metadataData = [metadataString dataUsingEncoding:NSUTF8StringEncoding]; + NSError *error; + NSDictionary *metadataDict = + [NSJSONSerialization JSONObjectWithData:metadataData + options:0 + error:&error]; + GTM_LOG_BACKGROUND_SESSION(@"User Info from session identifier: %@ %@", + metadataDict, error ? error : @""); + return metadataDict; + } + return nil; +} + +- (NSString *)createSessionIdentifierWithMetadata:(NSDictionary * GTM_NULLABLE_TYPE)metadataToInclude { + NSString *result; + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + // Session Identifier format: "com.google.__ + GTMSESSION_ASSERT_DEBUG(!_sessionIdentifier, @"Session identifier already created"); + _sessionIdentifierUUID = [[NSUUID UUID] UUIDString]; + _sessionIdentifier = + [NSString stringWithFormat:@"%@_%@", kGTMSessionIdentifierPrefix, _sessionIdentifierUUID]; + // Start with user-supplied keys so they cannot accidentally override the fetcher's keys. + NSMutableDictionary *metadataDict = + [NSMutableDictionary dictionaryWithDictionary:(NSDictionary * GTM_NONNULL_TYPE)_sessionUserInfo]; + + if (metadataToInclude) { + [metadataDict addEntriesFromDictionary:(NSDictionary *)metadataToInclude]; + } + NSDictionary *defaultMetadataDict = [self sessionIdentifierDefaultMetadata]; + if (defaultMetadataDict) { + [metadataDict addEntriesFromDictionary:defaultMetadataDict]; + } + if (metadataDict.count > 0) { + NSData *metadataData = [NSJSONSerialization dataWithJSONObject:metadataDict + options:0 + error:NULL]; + GTMSESSION_ASSERT_DEBUG(metadataData != nil, + @"Session identifier user info failed to convert to JSON"); + if (metadataData.length > 0) { + NSString *metadataString = [[NSString alloc] initWithData:metadataData + encoding:NSUTF8StringEncoding]; + _sessionIdentifier = + [_sessionIdentifier stringByAppendingFormat:@"_%@", metadataString]; + } + } + _didCreateSessionIdentifier = YES; + result = _sessionIdentifier; + } // @synchronized(self) + return result; +} + +- (void)failToBeginFetchWithError:(NSError *)error { + GTMSessionCheckNotSynchronized(self); + + if (error == nil) { + error = [NSError errorWithDomain:kGTMSessionFetcherErrorDomain + code:GTMSessionFetcherErrorDownloadFailed + userInfo:nil]; + } + + [self invokeFetchCallbacksOnCallbackQueueWithData:nil + error:error]; + [self releaseCallbacks]; + + [_service fetcherDidStop:self]; + + self.authorizer = nil; +} + ++ (GTMSessionCookieStorage *)staticCookieStorage { + static GTMSessionCookieStorage *gCookieStorage = nil; + + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + gCookieStorage = [[GTMSessionCookieStorage alloc] init]; + }); + return gCookieStorage; +} + +#if GTM_BACKGROUND_TASK_FETCHING + +- (void)endBackgroundTask { + // Whenever the connection stops or background execution expires, + // we need to tell UIApplication we're done. + // + // We'll wait on _callbackGroup to ensure that any callbacks in flight have executed, + // and that we access backgroundTaskIdentifier on the main thread, as happens when the + // task has expired. + dispatch_group_notify(_callbackGroup, dispatch_get_main_queue(), ^{ + UIBackgroundTaskIdentifier identifier = self.backgroundTaskIdentifier; + if (identifier != UIBackgroundTaskInvalid) { + [[UIApplication sharedApplication] endBackgroundTask:identifier]; + + self.backgroundTaskIdentifier = UIBackgroundTaskInvalid; + } + }); +} + +#endif // GTM_BACKGROUND_TASK_FETCHING + +- (void)authorizeRequest { + GTMSessionCheckNotSynchronized(self); + + id authorizer = self.authorizer; + SEL asyncAuthSel = @selector(authorizeRequest:delegate:didFinishSelector:); + if ([authorizer respondsToSelector:asyncAuthSel]) { + SEL callbackSel = @selector(authorizer:request:finishedWithError:); + [authorizer authorizeRequest:self.mutableRequest + delegate:self + didFinishSelector:callbackSel]; + } else { + GTMSESSION_ASSERT_DEBUG(authorizer == nil, @"invalid authorizer for fetch"); + + // No authorizing possible, and authorizing happens only after any delay; + // just begin fetching + [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 failToBeginFetchWithError:error]; + } else { + [self beginFetchMayDelay:NO + mayAuthorize:NO]; + } +} + + +- (BOOL)canFetchWithBackgroundSession { + // Subclasses may override. + return YES; +} + +// 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 { + NSMutableURLRequest *request; + + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + if (_sessionTask != nil || _retryTimer != nil) return YES; + + request = _request; + if (request == nil) return NO; + } + + BOOL isAuthorizing = [_authorizer isAuthorizingRequest:request]; + if (isAuthorizing) return YES; + + BOOL isDelayed = [_service isDelayingFetcher:self]; + return isDelayed; +} + +- (NSURLResponse * GTM_NULLABLE_TYPE)response { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + NSURLResponse *response = [self responseUnsynchronized]; + return response; + } // @synchronized(self) +} + +- (NSURLResponse * GTM_NULLABLE_TYPE)responseUnsynchronized { + GTMSessionCheckSynchronized(self); + + NSURLResponse *response = _sessionTask.response; + if (!response) response = _response; + return response; +} + +- (NSInteger)statusCode { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + NSInteger statusCode = [self statusCodeUnsynchronized]; + return statusCode; + } // @synchronized(self) +} + +- (NSInteger)statusCodeUnsynchronized { + GTMSessionCheckSynchronized(self); + + NSURLResponse *response = [self responseUnsynchronized]; + NSInteger statusCode; + + if ([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 * GTM_NULLABLE_TYPE)responseHeaders { + GTMSessionCheckNotSynchronized(self); + + NSURLResponse *response = self.response; + if ([response respondsToSelector:@selector(allHeaderFields)]) { + NSDictionary *headers = [(NSHTTPURLResponse *)response allHeaderFields]; + return headers; + } + return nil; +} + +- (NSDictionary * GTM_NULLABLE_TYPE)responseHeadersUnsynchronized { + GTMSessionCheckSynchronized(self); + + NSURLResponse *response = [self responseUnsynchronized]; + if ([response respondsToSelector:@selector(allHeaderFields)]) { + NSDictionary *headers = [(NSHTTPURLResponse *)response allHeaderFields]; + return headers; + } + return nil; +} + +- (void)releaseCallbacks { + // Avoid releasing blocks in the sync section since objects dealloc'd by + // the blocks being released may call back into the fetcher or fetcher + // service. + dispatch_queue_t NS_VALID_UNTIL_END_OF_SCOPE holdCallbackQueue; + GTMSessionFetcherCompletionHandler NS_VALID_UNTIL_END_OF_SCOPE holdCompletionHandler; + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + holdCallbackQueue = _callbackQueue; + holdCompletionHandler = _completionHandler; + + _callbackQueue = nil; + _completionHandler = nil; // Setter overridden in upload. Setter assumed to be used externally. + } + + // Set local callback pointers to nil here rather than let them release at the end of the scope + // to make any problems due to the blocks being released be a bit more obvious in a stack trace. + holdCallbackQueue = nil; + holdCompletionHandler = nil; + + self.configurationBlock = nil; + self.didReceiveResponseBlock = nil; + self.willRedirectBlock = nil; + self.sendProgressBlock = nil; + self.receivedProgressBlock = nil; + self.downloadProgressBlock = nil; + self.accumulateDataBlock = nil; + self.willCacheURLResponseBlock = nil; + self.retryBlock = nil; + self.testBlock = nil; + self.resumeDataBlock = nil; +} + +- (void)forgetSessionIdentifierForFetcher { + GTMSessionCheckSynchronized(self); + [self forgetSessionIdentifierForFetcherWithoutSyncCheck]; +} + +- (void)forgetSessionIdentifierForFetcherWithoutSyncCheck { + // This should be called inside a @synchronized block (except during dealloc.) + if (_sessionIdentifier) { + NSMapTable *sessionIdentifierToFetcherMap = [[self class] sessionIdentifierToFetcherMap]; + [sessionIdentifierToFetcherMap removeObjectForKey:_sessionIdentifier]; + _sessionIdentifier = nil; + _didCreateSessionIdentifier = NO; + } +} + +// External stop method +- (void)stopFetching { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + // Prevent enqueued callbacks from executing. + _userStoppedFetching = YES; + } // @synchronized(self) + [self stopFetchReleasingCallbacks:YES]; +} + +// Cancel the fetch of the URL that's currently in progress. +// +// If shouldReleaseCallbacks is NO then the fetch will be retried so the callbacks +// need to still be retained. +- (void)stopFetchReleasingCallbacks:(BOOL)shouldReleaseCallbacks { + [self removePersistedBackgroundSessionFromDefaults]; + + id service; + NSMutableURLRequest *request; + + // If the task 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. + __autoreleasing GTMSessionFetcher *holdSelf = self; + + BOOL hasCanceledTask = NO; + + [holdSelf destroyRetryTimer]; + + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + service = _service; + request = _request; + + if (_sessionTask) { + // In case cancelling the task or session calls this recursively, we want + // to ensure that we'll only release the task and delegate once, + // so first set _sessionTask to nil + // + // This may be called in a callback from the task, so use autorelease to avoid + // releasing the task in its own callback. + __autoreleasing NSURLSessionTask *oldTask = _sessionTask; + if (!_isUsingTestBlock) { + _response = _sessionTask.response; + } + _sessionTask = nil; + + if ([oldTask state] != NSURLSessionTaskStateCompleted) { + // For download tasks, when the fetch is stopped, we may provide resume data that can + // be used to create a new session. + BOOL mayResume = (_resumeDataBlock + && [oldTask respondsToSelector:@selector(cancelByProducingResumeData:)]); + if (!mayResume) { + [oldTask cancel]; + // A side effect of stopping the task is that URLSession:task:didCompleteWithError: + // will be invoked asynchronously on the delegate queue. + } else { + void (^resumeBlock)(NSData *) = _resumeDataBlock; + _resumeDataBlock = nil; + + // Save callbackQueue since releaseCallbacks clears it. + dispatch_queue_t callbackQueue = _callbackQueue; + dispatch_group_enter(_callbackGroup); + [(NSURLSessionDownloadTask *)oldTask cancelByProducingResumeData:^(NSData *resumeData) { + [self invokeOnCallbackQueue:callbackQueue + afterUserStopped:YES + block:^{ + resumeBlock(resumeData); + dispatch_group_leave(_callbackGroup); + }]; + }]; + } + hasCanceledTask = YES; + } + } + + // If the task was canceled, wait until the URLSession:task:didCompleteWithError: to call + // finishTasksAndInvalidate, since calling it immediately tends to crash, see radar 18471901. + if (_session) { + BOOL shouldInvalidate = _shouldInvalidateSession; +#if TARGET_OS_IPHONE + // Don't invalidate if we've got a systemCompletionHandler, since + // URLSessionDidFinishEventsForBackgroundURLSession: won't be called if invalidated. + shouldInvalidate = shouldInvalidate && !self.systemCompletionHandler; +#endif + if (shouldInvalidate) { + __autoreleasing NSURLSession *oldSession = _session; + _session = nil; + + if (!hasCanceledTask) { + [oldSession finishTasksAndInvalidate]; + } else { + _sessionNeedingInvalidation = oldSession; + } + } + } + } // @synchronized(self) + + // send the stopped notification + [self sendStopNotificationIfNeeded]; + + [_authorizer stopAuthorizationForRequest:request]; + + if (shouldReleaseCallbacks) { + [self releaseCallbacks]; + + self.authorizer = nil; + } + + [service fetcherDidStop:self]; + +#if GTM_BACKGROUND_TASK_FETCHING + [self endBackgroundTask]; +#endif +} + +- (void)setStopNotificationNeeded:(BOOL)flag { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + _isStopNotificationNeeded = flag; + } // @synchronized(self) +} + +- (void)sendStopNotificationIfNeeded { + BOOL sendNow = NO; + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + if (_isStopNotificationNeeded) { + _isStopNotificationNeeded = NO; + sendNow = YES; + } + } // @synchronized(self) + + if (sendNow) { + [self postNotificationOnMainThreadWithName:kGTMSessionFetcherStoppedNotification + userInfo:nil + requireAsync:NO]; + } +} + +- (void)retryFetch { + [self stopFetchReleasingCallbacks:NO]; + + GTMSessionFetcherCompletionHandler completionHandler; + + // A retry will need a configuration with a fresh session identifier. + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + if (_sessionIdentifier && _didCreateSessionIdentifier) { + [self forgetSessionIdentifierForFetcher]; + _configuration = nil; + } + + if (_canShareSession) { + // Force a grab of the current session from the fetcher service in case + // the service's old one has become invalid. + _session = nil; + } + + completionHandler = _completionHandler; + } // @synchronized(self) + + [self beginFetchWithCompletionHandler:completionHandler]; +} + +- (BOOL)waitForCompletionWithTimeout:(NSTimeInterval)timeoutInSeconds { + // Uncovered in upload fetcher testing, because the chunk fetcher is being waited on, and gets + // released by the upload code. The uploader just holds onto it with an ivar, and that gets + // nilled in the chunk fetcher callback. + // Used once in while loop just to avoid unused variable compiler warning. + __autoreleasing GTMSessionFetcher *holdSelf = self; + + NSDate *giveUpDate = [NSDate dateWithTimeIntervalSinceNow:timeoutInSeconds]; + + BOOL shouldSpinRunLoop = ([NSThread isMainThread] && + (!self.callbackQueue + || self.callbackQueue == dispatch_get_main_queue())); + BOOL expired = NO; + + // Loop until the callbacks have been called and released, and until + // the connection is no longer pending, until there are no callback dispatches + // in flight, or until the timeout has expired. + + int64_t delta = (int64_t)(100 * NSEC_PER_MSEC); // 100 ms + while ((holdSelf->_sessionTask && [_sessionTask state] != NSURLSessionTaskStateCompleted) + || _completionHandler != nil + || (_callbackGroup + && dispatch_group_wait(_callbackGroup, dispatch_time(DISPATCH_TIME_NOW, delta)))) { + expired = ([giveUpDate timeIntervalSinceNow] < 0); + if (expired) break; + + // Run the current run loop 1/1000 of a second to give the networking + // code a chance to work + const NSTimeInterval kSpinInterval = 0.001; + if (shouldSpinRunLoop) { + NSDate *stopDate = [NSDate dateWithTimeIntervalSinceNow:kSpinInterval]; + [[NSRunLoop currentRunLoop] runUntilDate:stopDate]; + } else { + [NSThread sleepForTimeInterval:kSpinInterval]; + } + } + return !expired; +} + ++ (void)setGlobalTestBlock:(GTMSessionFetcherTestBlock GTM_NULLABLE_TYPE)block { +#if GTM_DISABLE_FETCHER_TEST_BLOCK + GTMSESSION_ASSERT_DEBUG(block == nil, @"test blocks disabled"); +#endif + gGlobalTestBlock = [block copy]; +} + +#pragma mark NSURLSession Delegate Methods + +// NSURLSession documentation indicates that redirectRequest can be passed to the handler +// but empirically redirectRequest lacks the HTTP body, so passing it will break POSTs. +// Instead, we construct a new request, a copy of the original, with overrides from the +// redirect. + +- (void)URLSession:(NSURLSession *)session + task:(NSURLSessionTask *)task +willPerformHTTPRedirection:(NSHTTPURLResponse *)redirectResponse + newRequest:(NSURLRequest *)redirectRequest + completionHandler:(void (^)(NSURLRequest * GTM_NULLABLE_TYPE))handler { + [self setSessionTask:task]; + GTM_LOG_SESSION_DELEGATE(@"%@ %p URLSession:%@ task:%@ willPerformHTTPRedirection:%@ newRequest:%@", + [self class], self, session, task, redirectResponse, redirectRequest); + + if ([self userStoppedFetching]) { + handler(nil); + return; + } + if (redirectRequest && redirectResponse) { + // Copy the original request, including the body. + NSMutableURLRequest *originalRequest = self.mutableRequest; + NSMutableURLRequest *newRequest = [originalRequest mutableCopy]; + + // Disallow scheme changes (say, from https to http). + NSURL *originalRequestURL = originalRequest.URL; + NSURL *redirectRequestURL = redirectRequest.URL; + + NSString *originalScheme = originalRequestURL.scheme; + NSString *redirectScheme = redirectRequestURL.scheme; + + if (originalScheme != nil + && [originalScheme caseInsensitiveCompare:@"http"] == NSOrderedSame + && redirectScheme != nil + && [redirectScheme caseInsensitiveCompare:@"https"] == NSOrderedSame) { + // Allow the change from http to https. + } else { + // Disallow any other scheme changes. + redirectScheme = originalScheme; + } + // The new requests's URL overrides the original's URL. + NSURLComponents *components = [NSURLComponents componentsWithURL:redirectRequestURL + resolvingAgainstBaseURL:NO]; + components.scheme = redirectScheme; + NSURL *newURL = components.URL; + [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]; + } + + redirectRequest = newRequest; + + // Log the response we just received + [self setResponse:redirectResponse]; + [self logNowWithError:nil]; + + GTMSessionFetcherWillRedirectBlock willRedirectBlock = self.willRedirectBlock; + if (willRedirectBlock) { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + [self invokeOnCallbackQueueAfterUserStopped:YES + block:^{ + willRedirectBlock(redirectResponse, redirectRequest, ^(NSURLRequest *clientRequest) { + + // Update the request for future logging + self.mutableRequest = [clientRequest mutableCopy]; + + handler(clientRequest); + }); + }]; + } // @synchronized(self) + return; + } + // Continues here if the client did not provide a redirect block. + + // Update the request for future logging + self.mutableRequest = [redirectRequest mutableCopy]; + } + handler(redirectRequest); +} + +- (void)URLSession:(NSURLSession *)session + dataTask:(NSURLSessionDataTask *)dataTask +didReceiveResponse:(NSURLResponse *)response + completionHandler:(void (^)(NSURLSessionResponseDisposition disposition))handler { + [self setSessionTask:dataTask]; + GTM_LOG_SESSION_DELEGATE(@"%@ %p URLSession:%@ dataTask:%@ didReceiveResponse:%@", + [self class], self, session, dataTask, response); + void (^accumulateAndFinish)(NSURLSessionResponseDisposition) = + ^(NSURLSessionResponseDisposition dispositionValue) { + // 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. + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + BOOL hadPreviousData = _downloadedLength > 0; + + [_downloadedData setLength:0]; + _downloadedLength = 0; + + if (hadPreviousData && (dispositionValue != NSURLSessionResponseCancel)) { + // Tell the accumulate block to discard prior data. + GTMSessionFetcherAccumulateDataBlock accumulateBlock = _accumulateDataBlock; + if (accumulateBlock) { + [self invokeOnCallbackQueueUnlessStopped:^{ + accumulateBlock(nil); + }]; + } + } + } // @synchronized(self) + handler(dispositionValue); + }; + + GTMSessionFetcherDidReceiveResponseBlock receivedResponseBlock; + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + receivedResponseBlock = _didReceiveResponseBlock; + if (receivedResponseBlock) { + // We will ultimately need to call back to NSURLSession's handler with the disposition value + // for this delegate method even if the user has stopped the fetcher. + [self invokeOnCallbackQueueAfterUserStopped:YES + block:^{ + receivedResponseBlock(response, ^(NSURLSessionResponseDisposition desiredDisposition) { + accumulateAndFinish(desiredDisposition); + }); + }]; + } + } // @synchronized(self) + + if (receivedResponseBlock == nil) { + accumulateAndFinish(NSURLSessionResponseAllow); + } +} + +- (void)URLSession:(NSURLSession *)session + dataTask:(NSURLSessionDataTask *)dataTask +didBecomeDownloadTask:(NSURLSessionDownloadTask *)downloadTask { + GTM_LOG_SESSION_DELEGATE(@"%@ %p URLSession:%@ dataTask:%@ didBecomeDownloadTask:%@", + [self class], self, session, dataTask, downloadTask); + [self setSessionTask:downloadTask]; +} + + +- (void)URLSession:(NSURLSession *)session + task:(NSURLSessionTask *)task +didReceiveChallenge:(NSURLAuthenticationChallenge *)challenge + completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition disposition, + NSURLCredential * GTM_NULLABLE_TYPE credential))handler { + [self setSessionTask:task]; + GTM_LOG_SESSION_DELEGATE(@"%@ %p URLSession:%@ task:%@ didReceiveChallenge:%@", + [self class], self, session, task, challenge); + + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + NSInteger previousFailureCount = [challenge previousFailureCount]; + if (previousFailureCount <= 2) { + NSURLProtectionSpace *protectionSpace = [challenge protectionSpace]; + NSString *authenticationMethod = [protectionSpace authenticationMethod]; + if ([authenticationMethod isEqual:NSURLAuthenticationMethodServerTrust]) { + // SSL. + // + // Background sessions seem to require an explicit check of the server trust object + // rather than default handling. + SecTrustRef serverTrust = challenge.protectionSpace.serverTrust; + if (serverTrust == NULL) { + // No server trust information is available. + handler(NSURLSessionAuthChallengePerformDefaultHandling, nil); + } else { + // Server trust information is available. + void (^callback)(SecTrustRef, BOOL) = ^(SecTrustRef trustRef, BOOL allow){ + if (allow) { + NSURLCredential *trustCredential = [NSURLCredential credentialForTrust:trustRef]; + handler(NSURLSessionAuthChallengeUseCredential, trustCredential); + } else { + GTMSESSION_LOG_DEBUG(@"Cancelling authentication challenge for %@", _request.URL); + handler(NSURLSessionAuthChallengeCancelAuthenticationChallenge, nil); + } + }; + if (_allowInvalidServerCertificates) { + callback(serverTrust, YES); + } else { + // Retain the trust object to avoid a SecTrustEvaluate() crash on iOS 7. + CFRetain(serverTrust); + + // Evaluate the certificate chain. + // + // The delegate queue may be the main thread. Trust evaluation could cause some + // blocking network activity, so we must evaluate async, as documented at + // https://developer.apple.com/library/ios/technotes/tn2232/ + // + // We must also avoid multiple uses of the trust object, per docs: + // "It is not safe to call this function concurrently with any other function that uses + // the same trust management object, or to re-enter this function for the same trust + // management object." + // + // SecTrustEvaluateAsync both does sync execution of Evaluate and calls back on the + // queue passed to it, according to at sources in + // http://www.opensource.apple.com/source/libsecurity_keychain/libsecurity_keychain-55050.9/lib/SecTrust.cpp + // It would require a global serial queue to ensure the evaluate happens only on a + // single thread at a time, so we'll stick with using SecTrustEvaluate on a background + // thread. + dispatch_queue_t evaluateBackgroundQueue = + dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); + dispatch_async(evaluateBackgroundQueue, ^{ + // It looks like the implementation of SecTrustEvaluate() on Mac grabs a global lock, + // so it may be redundant for us to also lock, but it's easy to synchronize here + // anyway. + SecTrustResultType trustEval = kSecTrustResultInvalid; + BOOL shouldAllow; + OSStatus trustError; + @synchronized([GTMSessionFetcher class]) { + trustError = SecTrustEvaluate(serverTrust, &trustEval); + } + if (trustError != errSecSuccess) { + GTMSESSION_LOG_DEBUG(@"Error %d evaluating trust for %@", + (int)trustError, _request); + shouldAllow = NO; + } else { + // Having a trust level "unspecified" by the user is the usual result, described at + // https://developer.apple.com/library/mac/qa/qa1360 + if (trustEval == kSecTrustResultUnspecified + || trustEval == kSecTrustResultProceed) { + shouldAllow = YES; + } else { + shouldAllow = NO; + GTMSESSION_LOG_DEBUG(@"Challenge SecTrustResultType %u for %@, properties: %@", + trustEval, _request.URL.host, + CFBridgingRelease(SecTrustCopyProperties(serverTrust))); + } + } + callback(serverTrust, shouldAllow); + + CFRelease(serverTrust); + }); + } + } + return; + } + + NSURLCredential *credential = _credential; + + if ([[challenge protectionSpace] isProxy] && _proxyCredential != nil) { + credential = _proxyCredential; + } + + if (credential) { + handler(NSURLSessionAuthChallengeUseCredential, credential); + } else { + // The credential is still nil; tell the OS to use the default handling. This is needed + // for things that can come out of the keychain (proxies, client certificates, etc.). + // + // Note: Looking up a credential with NSURLCredentialStorage's + // defaultCredentialForProtectionSpace: is *not* the same invoking the handler with + // NSURLSessionAuthChallengePerformDefaultHandling. In the case of + // NSURLAuthenticationMethodClientCertificate, you can get nil back from + // NSURLCredentialStorage, while using this code path instead works. + handler(NSURLSessionAuthChallengePerformDefaultHandling, nil); + } + + } else { + // We've failed auth 3 times. The completion handler will be called with code + // NSURLErrorCancelled. + handler(NSURLSessionAuthChallengeCancelAuthenticationChallenge, nil); + } + } // @synchronized(self) +} + +- (void)invokeOnCallbackQueueUnlessStopped:(void (^)(void))block { + [self invokeOnCallbackQueueAfterUserStopped:NO + block:block]; +} + +- (void)invokeOnCallbackQueueAfterUserStopped:(BOOL)afterStopped + block:(void (^)(void))block { + GTMSessionCheckSynchronized(self); + + [self invokeOnCallbackUnsynchronizedQueueAfterUserStopped:afterStopped + block:block]; +} + +- (void)invokeOnCallbackUnsynchronizedQueueAfterUserStopped:(BOOL)afterStopped + block:(void (^)(void))block { + // testBlock simulation code may not be synchronizing when this is invoked. + [self invokeOnCallbackQueue:_callbackQueue + afterUserStopped:afterStopped + block:block]; +} + +- (void)invokeOnCallbackQueue:(dispatch_queue_t)callbackQueue + afterUserStopped:(BOOL)afterStopped + block:(void (^)(void))block { + if (callbackQueue) { + dispatch_group_async(_callbackGroup, callbackQueue, ^{ + if (!afterStopped) { + NSDate *serviceStoppedAllDate = [_service stoppedAllFetchersDate]; + + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + // Avoid a race between stopFetching and the callback. + if (_userStoppedFetching) { + return; + } + + // Also avoid calling back if the service has stopped all fetchers + // since this one was created. The fetcher may have stopped before + // stopAllFetchers was invoked, so _userStoppedFetching wasn't set, + // but the app still won't expect the callback to fire after + // the service's stopAllFetchers was invoked. + if (serviceStoppedAllDate + && [_initialBeginFetchDate compare:serviceStoppedAllDate] != NSOrderedDescending) { + // stopAllFetchers was called after this fetcher began. + return; + } + } // @synchronized(self) + } + block(); + }); + } +} + +- (void)invokeFetchCallbacksOnCallbackQueueWithData:(NSData * GTM_NULLABLE_TYPE)data + error:(NSError * GTM_NULLABLE_TYPE)error { + // Callbacks will be released in the method stopFetchReleasingCallbacks: + GTMSessionFetcherCompletionHandler handler; + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + handler = _completionHandler; + + if (handler) { + [self invokeOnCallbackQueueUnlessStopped:^{ + handler(data, error); + + // Post a notification, primarily to allow code to collect responses for + // testing. + // + // The observing code is not likely on the fetcher's callback + // queue, so this posts explicitly to the main queue. + NSMutableDictionary *userInfo = [NSMutableDictionary dictionary]; + if (data) { + userInfo[kGTMSessionFetcherCompletionDataKey] = data; + } + if (error) { + userInfo[kGTMSessionFetcherCompletionErrorKey] = error; + } + [self postNotificationOnMainThreadWithName:kGTMSessionFetcherCompletionInvokedNotification + userInfo:userInfo + requireAsync:NO]; + }]; + } + } // @synchronized(self) +} + +- (void)postNotificationOnMainThreadWithName:(NSString *)noteName + userInfo:(NSDictionary * GTM_NULLABLE_TYPE)userInfo + requireAsync:(BOOL)requireAsync { + dispatch_block_t postBlock = ^{ + [[NSNotificationCenter defaultCenter] postNotificationName:noteName + object:self + userInfo:userInfo]; + }; + + if ([NSThread isMainThread] && !requireAsync) { + // Post synchronously for compatibility with older code using the fetcher. + + // Avoid calling out to other code from inside a sync block to avoid risk + // of a deadlock or of recursive sync. + GTMSessionCheckNotSynchronized(self); + + postBlock(); + } else { + dispatch_async(dispatch_get_main_queue(), postBlock); + } +} + +- (void)URLSession:(NSURLSession *)session + task:(NSURLSessionTask *)uploadTask + needNewBodyStream:(void (^)(NSInputStream * GTM_NULLABLE_TYPE bodyStream))completionHandler { + [self setSessionTask:uploadTask]; + GTM_LOG_SESSION_DELEGATE(@"%@ %p URLSession:%@ task:%@ needNewBodyStream:", + [self class], self, session, uploadTask); + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + GTMSessionFetcherBodyStreamProvider provider = _bodyStreamProvider; +#if !STRIP_GTM_FETCH_LOGGING + if ([self respondsToSelector:@selector(loggedStreamProviderForStreamProvider:)]) { + provider = [self performSelector:@selector(loggedStreamProviderForStreamProvider:) + withObject:provider]; + } +#endif + if (provider) { + [self invokeOnCallbackQueueUnlessStopped:^{ + provider(completionHandler); + }]; + } else { + GTMSESSION_ASSERT_DEBUG(NO, @"NSURLSession expects a stream provider"); + + completionHandler(nil); + } + } // @synchronized(self) +} + +- (void)URLSession:(NSURLSession *)session + task:(NSURLSessionTask *)task + didSendBodyData:(int64_t)bytesSent + totalBytesSent:(int64_t)totalBytesSent +totalBytesExpectedToSend:(int64_t)totalBytesExpectedToSend { + [self setSessionTask:task]; + GTM_LOG_SESSION_DELEGATE(@"%@ %p URLSession:%@ task:%@ didSendBodyData:%lld" + @" totalBytesSent:%lld totalBytesExpectedToSend:%lld", + [self class], self, session, task, bytesSent, totalBytesSent, + totalBytesExpectedToSend); + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + if (!_sendProgressBlock) { + return; + } + // We won't hold on to send progress block; it's ok to not send it if the upload finishes. + [self invokeOnCallbackQueueUnlessStopped:^{ + GTMSessionFetcherSendProgressBlock progressBlock; + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + progressBlock = _sendProgressBlock; + } + if (progressBlock) { + progressBlock(bytesSent, totalBytesSent, totalBytesExpectedToSend); + } + }]; + } // @synchronized(self) +} + +- (void)URLSession:(NSURLSession *)session + dataTask:(NSURLSessionDataTask *)dataTask + didReceiveData:(NSData *)data { + [self setSessionTask:dataTask]; + NSUInteger bufferLength = data.length; + GTM_LOG_SESSION_DELEGATE(@"%@ %p URLSession:%@ dataTask:%@ didReceiveData:%p (%llu bytes)", + [self class], self, session, dataTask, data, + (unsigned long long)bufferLength); + if (bufferLength == 0) { + // Observed on completing an out-of-process upload. + return; + } + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + GTMSessionFetcherAccumulateDataBlock accumulateBlock = _accumulateDataBlock; + if (accumulateBlock) { + // Let the client accumulate the data. + _downloadedLength += bufferLength; + [self invokeOnCallbackQueueUnlessStopped:^{ + accumulateBlock(data); + }]; + } else if (!_userStoppedFetching) { + // Append to the mutable data buffer unless the fetch has been cancelled. + + // Resumed upload tasks may not yet have a data buffer. + if (_downloadedData == nil) { + // Using NSClassFromString for iOS 6 compatibility. + GTMSESSION_ASSERT_DEBUG( + ![dataTask isKindOfClass:NSClassFromString(@"NSURLSessionDownloadTask")], + @"Resumed download tasks should not receive data bytes"); + _downloadedData = [[NSMutableData alloc] init]; + } + + [_downloadedData appendData:data]; + _downloadedLength = (int64_t)_downloadedData.length; + + // We won't hold on to receivedProgressBlock here; it's ok to not send + // it if the transfer finishes. + if (_receivedProgressBlock) { + [self invokeOnCallbackQueueUnlessStopped:^{ + GTMSessionFetcherReceivedProgressBlock progressBlock; + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + progressBlock = _receivedProgressBlock; + } + if (progressBlock) { + progressBlock((int64_t)bufferLength, _downloadedLength); + } + }]; + } + } + } // @synchronized(self) +} + +- (void)URLSession:(NSURLSession *)session + dataTask:(NSURLSessionDataTask *)dataTask + willCacheResponse:(NSCachedURLResponse *)proposedResponse + completionHandler:(void (^)(NSCachedURLResponse *cachedResponse))completionHandler { + GTM_LOG_SESSION_DELEGATE(@"%@ %p URLSession:%@ dataTask:%@ willCacheResponse:%@ %@", + [self class], self, session, dataTask, + proposedResponse, proposedResponse.response); + GTMSessionFetcherWillCacheURLResponseBlock callback; + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + callback = _willCacheURLResponseBlock; + + if (callback) { + [self invokeOnCallbackQueueAfterUserStopped:YES + block:^{ + callback(proposedResponse, completionHandler); + }]; + } + } // @synchronized(self) + if (!callback) { + completionHandler(proposedResponse); + } +} + + +- (void)URLSession:(NSURLSession *)session + downloadTask:(NSURLSessionDownloadTask *)downloadTask + didWriteData:(int64_t)bytesWritten + totalBytesWritten:(int64_t)totalBytesWritten +totalBytesExpectedToWrite:(int64_t)totalBytesExpectedToWrite { + GTM_LOG_SESSION_DELEGATE(@"%@ %p URLSession:%@ downloadTask:%@ didWriteData:%lld" + @" bytesWritten:%lld totalBytesExpectedToWrite:%lld", + [self class], self, session, downloadTask, bytesWritten, + totalBytesWritten, totalBytesExpectedToWrite); + [self setSessionTask:downloadTask]; + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + if ((totalBytesExpectedToWrite != NSURLSessionTransferSizeUnknown) && + (totalBytesExpectedToWrite < totalBytesWritten)) { + // Have observed cases were bytesWritten == totalBytesExpectedToWrite, + // but totalBytesWritten > totalBytesExpectedToWrite, so setting to unkown in these cases. + totalBytesExpectedToWrite = NSURLSessionTransferSizeUnknown; + } + // We won't hold on to download progress block during the enqueue; + // it's ok to not send it if the upload finishes. + + [self invokeOnCallbackQueueUnlessStopped:^{ + GTMSessionFetcherDownloadProgressBlock progressBlock; + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + progressBlock = _downloadProgressBlock; + } + if (progressBlock) { + progressBlock(bytesWritten, totalBytesWritten, totalBytesExpectedToWrite); + } + }]; + } // @synchronized(self) +} + +- (void)URLSession:(NSURLSession *)session + downloadTask:(NSURLSessionDownloadTask *)downloadTask + didResumeAtOffset:(int64_t)fileOffset +expectedTotalBytes:(int64_t)expectedTotalBytes { + GTM_LOG_SESSION_DELEGATE(@"%@ %p URLSession:%@ downloadTask:%@ didResumeAtOffset:%lld" + @" expectedTotalBytes:%lld", + [self class], self, session, downloadTask, fileOffset, + expectedTotalBytes); + [self setSessionTask:downloadTask]; +} + +- (void)URLSession:(NSURLSession *)session + downloadTask:(NSURLSessionDownloadTask *)downloadTask +didFinishDownloadingToURL:(NSURL *)downloadLocationURL { + // Download may have relaunched app, so update _sessionTask. + [self setSessionTask:downloadTask]; + GTM_LOG_SESSION_DELEGATE(@"%@ %p URLSession:%@ downloadTask:%@ didFinishDownloadingToURL:%@", + [self class], self, session, downloadTask, downloadLocationURL); + NSNumber *fileSizeNum; + [downloadLocationURL getResourceValue:&fileSizeNum + forKey:NSURLFileSizeKey + error:NULL]; + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + NSURL *destinationURL = _destinationFileURL; + + _downloadedLength = fileSizeNum.longLongValue; + + // Overwrite any previous file at the destination URL. + NSFileManager *fileMgr = [NSFileManager defaultManager]; + NSError *removeError; + if (![fileMgr removeItemAtURL:destinationURL error:&removeError] + && removeError.code != NSFileNoSuchFileError) { + GTMSESSION_LOG_DEBUG(@"Could not remove previous file at %@ due to %@", + downloadLocationURL.path, removeError); + } + + NSInteger statusCode = [self statusCodeUnsynchronized]; + if (statusCode < 200 || statusCode > 399) { + // In OS X 10.11, the response body is written to a file even on a server + // status error. For convenience of the fetcher client, we'll skip saving the + // downloaded body to the destination URL so that clients do not need to know + // to delete the file following fetch errors. A downside of this is that + // the server may have included error details in the response body, and + // abandoning the downloaded file here means that the details from the + // body are not available to the fetcher client. + GTMSESSION_LOG_DEBUG(@"Abandoning download due to status %zd, file %@", + statusCode, downloadLocationURL.path); + } else { + NSError *moveError; + NSURL *destinationFolderURL = [destinationURL URLByDeletingLastPathComponent]; + BOOL didMoveDownload = NO; + if ([fileMgr createDirectoryAtURL:destinationFolderURL + withIntermediateDirectories:YES + attributes:nil + error:&moveError]) { + didMoveDownload = [fileMgr moveItemAtURL:downloadLocationURL + toURL:destinationURL + error:&moveError]; + } + if (!didMoveDownload) { + _downloadFinishedError = moveError; + } + GTM_LOG_BACKGROUND_SESSION(@"%@ %p Moved download from \"%@\" to \"%@\" %@", + [self class], self, + downloadLocationURL.path, destinationURL.path, + error ? error : @""); + } + } // @synchronized(self) +} + +/* Sent as the last message related to a specific task. Error may be + * nil, which implies that no error occurred and this task is complete. + */ +- (void)URLSession:(NSURLSession *)session + task:(NSURLSessionTask *)task +didCompleteWithError:(NSError *)error { + [self setSessionTask:task]; + GTM_LOG_SESSION_DELEGATE(@"%@ %p URLSession:%@ task:%@ didCompleteWithError:%@", + [self class], self, session, task, error); + + NSInteger status = self.statusCode; + BOOL forceAssumeRetry = NO; + BOOL succeeded = NO; + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + +#if !GTM_DISABLE_FETCHER_TEST_BLOCK + // The task is never resumed when a testBlock is used. When the session is destroyed, + // we should ignore the callback, since the testBlock support code itself invokes + // shouldRetryNowForStatus: and finishWithError:shouldRetry: + if (_isUsingTestBlock) return; +#endif + + if (error == nil) { + error = _downloadFinishedError; + } + succeeded = (error == nil && status >= 0 && status < 300); + if (succeeded) { + // Succeeded. + _bodyLength = task.countOfBytesSent; + } + } // @synchronized(self) + + if (succeeded) { + [self finishWithError:nil shouldRetry:NO]; + return; + } + // For background redirects, no delegate method is called, so we cannot restore a stripped + // Authorization header, so if a 403 ("Forbidden") was generated due to a missing OAuth 2 header, + // set the current request's URL to the redirected URL, so we in effect restore the Authorization + // header. + if ((status == 403) && self.usingBackgroundSession) { + NSURL *redirectURL = self.response.URL; + NSMutableURLRequest *request = self.mutableRequest; + if (![request.URL isEqual:redirectURL]) { + NSString *authorizationHeader = [request.allHTTPHeaderFields objectForKey:@"Authorization"]; + if (authorizationHeader != nil) { + request.URL = redirectURL; + // Avoid assuming the session is still valid. + self.session = nil; + forceAssumeRetry = YES; + } + } + } + + // If invalidating the session was deferred in stopFetchReleasingCallbacks: then do it now. + NSURLSession *oldSession = self.sessionNeedingInvalidation; + if (oldSession) { + [self setSessionNeedingInvalidation:NULL]; + [oldSession finishTasksAndInvalidate]; + } + + // Failed. + [self shouldRetryNowForStatus:status + error:error + forceAssumeRetry:forceAssumeRetry + response:^(BOOL shouldRetry) { + [self finishWithError:error shouldRetry:shouldRetry]; + }]; +} + +#if TARGET_OS_IPHONE +- (void)URLSessionDidFinishEventsForBackgroundURLSession:(NSURLSession *)session { + GTM_LOG_SESSION_DELEGATE(@"%@ %p URLSessionDidFinishEventsForBackgroundURLSession:%@", + [self class], self, session); + [self removePersistedBackgroundSessionFromDefaults]; + + GTMSessionFetcherSystemCompletionHandler handler; + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + handler = self.systemCompletionHandler; + self.systemCompletionHandler = nil; + } // @synchronized(self) + if (handler) { + GTM_LOG_BACKGROUND_SESSION(@"%@ %p Calling system completionHandler", [self class], self); + handler(); + + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + NSURLSession *oldSession = _session; + _session = nil; + if (_shouldInvalidateSession) { + [oldSession finishTasksAndInvalidate]; + } + } // @synchronized(self) + } +} +#endif + +- (void)URLSession:(NSURLSession *)session didBecomeInvalidWithError:(NSError * GTM_NULLABLE_TYPE)error { + // This may happen repeatedly for retries. On authentication callbacks, the retry + // may begin before the prior session sends the didBecomeInvalid delegate message. + GTM_LOG_SESSION_DELEGATE(@"%@ %p URLSession:%@ didBecomeInvalidWithError:%@", + [self class], self, session, error); + if (session == (NSURLSession *)self.session) { + GTM_LOG_SESSION_DELEGATE(@" Unexpected retained invalid session: %@", session); + self.session = nil; + } +} + +- (void)finishWithError:(NSError * GTM_NULLABLE_TYPE)error shouldRetry:(BOOL)shouldRetry { + [self removePersistedBackgroundSessionFromDefaults]; + + BOOL shouldStopFetching = YES; + NSData *downloadedData = nil; +#if !STRIP_GTM_FETCH_LOGGING + BOOL shouldDeferLogging = NO; +#endif + BOOL shouldBeginRetryTimer = NO; + NSInteger status = [self statusCode]; + NSURL *destinationURL = self.destinationFileURL; + + BOOL fetchSucceeded = (error == nil && status >= 0 && status < 300); + +#if !STRIP_GTM_FETCH_LOGGING + if (!fetchSucceeded) { + if (!shouldDeferLogging && !self.hasLoggedError) { + [self logNowWithError:error]; + self.hasLoggedError = YES; + } + } +#endif // !STRIP_GTM_FETCH_LOGGING + + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + +#if !STRIP_GTM_FETCH_LOGGING + shouldDeferLogging = _deferResponseBodyLogging; +#endif + if (fetchSucceeded) { + // Success + if ((_downloadedData.length > 0) && (destinationURL != nil)) { + // Overwrite any previous file at the destination URL. + NSFileManager *fileMgr = [NSFileManager defaultManager]; + [fileMgr removeItemAtURL:destinationURL + error:NULL]; + NSURL *destinationFolderURL = [destinationURL URLByDeletingLastPathComponent]; + BOOL didMoveDownload = NO; + if ([fileMgr createDirectoryAtURL:destinationFolderURL + withIntermediateDirectories:YES + attributes:nil + error:&error]) { + didMoveDownload = [_downloadedData writeToURL:destinationURL + options:NSDataWritingAtomic + error:&error]; + } + if (didMoveDownload) { + _downloadedData = nil; + } else { + _downloadFinishedError = error; + } + } + downloadedData = _downloadedData; + } else { + // Unsuccessful with error or status over 300. Retry or notify the delegate of failure + if (shouldRetry) { + // Retrying. + shouldBeginRetryTimer = YES; + shouldStopFetching = NO; + } else { + if (error == nil) { + // Create an error. + NSDictionary *userInfo = nil; + if (_downloadedData.length > 0) { + userInfo = @{ kGTMSessionFetcherStatusDataKey : _downloadedData }; + } + error = [NSError errorWithDomain:kGTMSessionFetcherStatusDomain + code:status + userInfo:userInfo]; + } else { + // If the error had resume data, and the client supplied a resume block, pass the + // data to the client. + void (^resumeBlock)(NSData *) = _resumeDataBlock; + _resumeDataBlock = nil; + if (resumeBlock) { + NSData *resumeData = [error.userInfo objectForKey:NSURLSessionDownloadTaskResumeData]; + if (resumeData) { + [self invokeOnCallbackQueueAfterUserStopped:YES block:^{ + resumeBlock(resumeData); + }]; + } + } + } + if (_downloadedData.length > 0) { + downloadedData = _downloadedData; + } + // If the error occurred after retries, report the number and duration of the + // retries. This provides a clue to a developer looking at the error description + // that the fetcher did retry before failing with this error. + if (_retryCount > 0) { + NSMutableDictionary *userInfoWithRetries = + [NSMutableDictionary dictionaryWithDictionary:(NSDictionary *)error.userInfo]; + NSTimeInterval timeSinceInitialRequest = -[_initialRequestDate timeIntervalSinceNow]; + [userInfoWithRetries setObject:@(timeSinceInitialRequest) + forKey:kGTMSessionFetcherElapsedIntervalWithRetriesKey]; + [userInfoWithRetries setObject:@(_retryCount) + forKey:kGTMSessionFetcherNumberOfRetriesDoneKey]; + error = [NSError errorWithDomain:(NSString *)error.domain + code:error.code + userInfo:userInfoWithRetries]; + } + } + } + } // @synchronized(self) + + if (shouldBeginRetryTimer) { + [self beginRetryTimer]; + } + + // 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]; + + if (shouldStopFetching) { + [self invokeFetchCallbacksOnCallbackQueueWithData:downloadedData + error:error]; + // The upload subclass doesn't want to release callbacks until upload chunks have completed. + BOOL shouldRelease = [self shouldReleaseCallbacksUponCompletion]; + [self stopFetchReleasingCallbacks:shouldRelease]; + } + +#if !STRIP_GTM_FETCH_LOGGING + // _hasLoggedError is only set by this method + if (!shouldDeferLogging && !_hasLoggedError) { + [self logNowWithError:error]; + } +#endif +} + +- (BOOL)shouldReleaseCallbacksUponCompletion { + // A subclass can override this to keep callbacks around after the + // connection has finished successfully + return YES; +} + +- (void)logNowWithError:(NSError * GTM_NULLABLE_TYPE)error { + GTMSessionCheckNotSynchronized(self); + + // 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 { + __unsafe_unretained NSString *const domain; + NSInteger code; + }; + + struct RetryRecord retries[] = { + { kGTMSessionFetcherStatusDomain, 408 }, // request timeout + { kGTMSessionFetcherStatusDomain, 502 }, // failure gatewaying to another server + { kGTMSessionFetcherStatusDomain, 503 }, // service unavailable + { kGTMSessionFetcherStatusDomain, 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 + NSString *domain = error.domain; + NSInteger code = error.code; + for (int idx = 0; retries[idx].domain != nil; idx++) { + if (code == retries[idx].code && [domain isEqual:retries[idx].domain]) { + return YES; + } + } + return NO; +} + +// shouldRetryNowForStatus:error: responds with 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 retry block is present and returns YES when called, or the +// authorizer may be able to fix. +- (void)shouldRetryNowForStatus:(NSInteger)status + error:(NSError *)error + forceAssumeRetry:(BOOL)forceAssumeRetry + response:(GTMSessionFetcherRetryResponse)response { + // Determine if a refreshed authorizer may avoid an authorization error + BOOL willRetry = NO; + + // We assume _authorizer is immutable after beginFetch, and _hasAttemptedAuthRefresh is modified + // only in this method, and this method is invoked on the serial delegate queue. + // + // We want to avoid calling the authorizer from inside a sync block. + BOOL isFirstAuthError = (_authorizer != nil + && !_hasAttemptedAuthRefresh + && status == GTMSessionFetcherStatusUnauthorized); // 401 + + BOOL hasPrimed = NO; + if (isFirstAuthError) { + if ([_authorizer respondsToSelector:@selector(primeForRefresh)]) { + hasPrimed = [_authorizer primeForRefresh]; + } + } + + BOOL shouldRetryForAuthRefresh = NO; + if (hasPrimed) { + shouldRetryForAuthRefresh = YES; + _hasAttemptedAuthRefresh = YES; + [self.mutableRequest setValue:nil forHTTPHeaderField:@"Authorization"]; + } + + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + BOOL shouldDoRetry = [self isRetryEnabledUnsynchronized]; + if (shouldDoRetry && ![self hasRetryAfterInterval]) { + + // Determine if we're doing exponential backoff retries + shouldDoRetry = [self nextRetryIntervalUnsynchronized] < _maxRetryInterval; + + if (shouldDoRetry) { + // If an explicit max retry interval was set, we expect repeated backoffs to take + // up to roughly twice that for repeated fast failures. If the initial attempt is + // already more than 3 times the max retry interval, then failures have taken a long time + // (such as from network timeouts) so don't retry again to avoid the app becoming + // unexpectedly unresponsive. + if (_maxRetryInterval > 0) { + NSTimeInterval maxAllowedIntervalBeforeRetry = _maxRetryInterval * 3; + NSTimeInterval timeSinceInitialRequest = -[_initialRequestDate timeIntervalSinceNow]; + if (timeSinceInitialRequest > maxAllowedIntervalBeforeRetry) { + shouldDoRetry = NO; + } + } + } + } + BOOL canRetry = shouldRetryForAuthRefresh || forceAssumeRetry || shouldDoRetry; + if (canRetry) { + NSDictionary *userInfo = nil; + if (_downloadedData.length > 0) { + userInfo = @{ kGTMSessionFetcherStatusDataKey : _downloadedData }; + } + NSError *statusError = [NSError errorWithDomain:kGTMSessionFetcherStatusDomain + code:status + userInfo:userInfo]; + if (error == nil) { + error = statusError; + } + willRetry = shouldRetryForAuthRefresh || + forceAssumeRetry || + [self isRetryError:error] || + ((error != statusError) && [self isRetryError:statusError]); + + // If the user has installed a retry callback, consult that. + GTMSessionFetcherRetryBlock retryBlock = _retryBlock; + if (retryBlock) { + [self invokeOnCallbackQueueUnlessStopped:^{ + retryBlock(willRetry, error, response); + }]; + return; + } + } + } // @synchronized(self) + response(willRetry); +} + +- (BOOL)hasRetryAfterInterval { + GTMSessionCheckSynchronized(self); + + NSDictionary *responseHeaders = [self responseHeadersUnsynchronized]; + NSString *retryAfterValue = [responseHeaders valueForKey:@"Retry-After"]; + return (retryAfterValue != nil); +} + +- (NSTimeInterval)retryAfterInterval { + GTMSessionCheckSynchronized(self); + + NSDictionary *responseHeaders = [self responseHeadersUnsynchronized]; + NSString *retryAfterValue = [responseHeaders valueForKey:@"Retry-After"]; + if (retryAfterValue == nil) { + return 0; + } + // Retry-After formatted as HTTP-date | delta-seconds + // Reference: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html + NSDateFormatter *rfc1123DateFormatter = [[NSDateFormatter alloc] init]; + rfc1123DateFormatter.locale = [[NSLocale alloc] initWithLocaleIdentifier:@"en_US"]; + rfc1123DateFormatter.timeZone = [NSTimeZone timeZoneWithAbbreviation:@"GMT"]; + rfc1123DateFormatter.dateFormat = @"EEE',' dd MMM yyyy HH':'mm':'ss z"; + NSDate *retryAfterDate = [rfc1123DateFormatter dateFromString:retryAfterValue]; + NSTimeInterval retryAfterInterval = (retryAfterDate != nil) ? + retryAfterDate.timeIntervalSinceNow : retryAfterValue.intValue; + retryAfterInterval = MAX(0, retryAfterInterval); + return retryAfterInterval; +} + +- (void)beginRetryTimer { + if (![NSThread isMainThread]) { + // Defer creating and starting the timer until we're on the main thread to ensure it has + // a run loop. + dispatch_group_async(_callbackGroup, dispatch_get_main_queue(), ^{ + [self beginRetryTimer]; + }); + return; + } + + [self destroyRetryTimer]; + + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + NSTimeInterval nextInterval = [self nextRetryIntervalUnsynchronized]; + NSTimeInterval maxInterval = _maxRetryInterval; + NSTimeInterval newInterval = MIN(nextInterval, (maxInterval > 0 ? maxInterval : DBL_MAX)); + + _lastRetryInterval = newInterval; + + _retryTimer = [NSTimer timerWithTimeInterval:newInterval + target:self + selector:@selector(retryTimerFired:) + userInfo:nil + repeats:NO]; + [[NSRunLoop mainRunLoop] addTimer:_retryTimer + forMode:NSDefaultRunLoopMode]; + } // @synchronized(self) + + [self postNotificationOnMainThreadWithName:kGTMSessionFetcherRetryDelayStartedNotification + userInfo:nil + requireAsync:NO]; +} + +- (void)retryTimerFired:(NSTimer *)timer { + [self destroyRetryTimer]; + + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + _retryCount++; + } // @synchronized(self) + + NSOperationQueue *queue = self.sessionDelegateQueue; + [queue addOperationWithBlock:^{ + [self retryFetch]; + }]; +} + +- (void)destroyRetryTimer { + BOOL shouldNotify = NO; + + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + if (_retryTimer) { + [_retryTimer invalidate]; + _retryTimer = nil; + shouldNotify = YES; + } + } + + if (shouldNotify) { + [self postNotificationOnMainThreadWithName:kGTMSessionFetcherRetryDelayStoppedNotification + userInfo:nil + requireAsync:NO]; + } +} + +- (NSUInteger)retryCount { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + return _retryCount; + } // @synchronized(self) +} + +- (NSTimeInterval)nextRetryInterval { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + NSTimeInterval interval = [self nextRetryIntervalUnsynchronized]; + return interval; + } // @synchronized(self) +} + +- (NSTimeInterval)nextRetryIntervalUnsynchronized { + GTMSessionCheckSynchronized(self); + + NSInteger statusCode = [self statusCodeUnsynchronized]; + if ((statusCode == 503) && [self hasRetryAfterInterval]) { + NSTimeInterval secs = [self retryAfterInterval]; + return secs; + } + // The next wait interval is the factor (2.0) times the last interval, + // but never less than the minimum interval. + NSTimeInterval secs = _lastRetryInterval * _retryFactor; + if (_maxRetryInterval > 0) { + secs = MIN(secs, _maxRetryInterval); + } + secs = MAX(secs, _minRetryInterval); + + return secs; +} + +- (NSTimer *)retryTimer { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + return _retryTimer; + } // @synchronized(self) +} + +- (BOOL)isRetryEnabled { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + return _isRetryEnabled; + } // @synchronized(self) +} + +- (BOOL)isRetryEnabledUnsynchronized { + GTMSessionCheckSynchronized(self); + + return _isRetryEnabled; +} + +- (void)setRetryEnabled:(BOOL)flag { + + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + 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 + _minRetryInterval = InitialMinRetryInterval(); + _maxRetryInterval = kUnsetMaxRetryInterval; + _retryFactor = 2.0; + _lastRetryInterval = 0.0; + } + _isRetryEnabled = flag; + } // @synchronized(self) +}; + +- (NSTimeInterval)maxRetryInterval { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + return _maxRetryInterval; + } // @synchronized(self) +} + +- (void)setMaxRetryInterval:(NSTimeInterval)secs { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + if (secs > 0) { + _maxRetryInterval = secs; + } else { + _maxRetryInterval = kUnsetMaxRetryInterval; + } + } // @synchronized(self) +} + +- (double)minRetryInterval { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + return _minRetryInterval; + } // @synchronized(self) +} + +- (void)setMinRetryInterval:(NSTimeInterval)secs { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + 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 = InitialMinRetryInterval(); + } + } // @synchronized(self) + +} + +#pragma mark iOS System Completion Handlers + +#if TARGET_OS_IPHONE +static NSMutableDictionary *gSystemCompletionHandlers = nil; + +- (GTMSessionFetcherSystemCompletionHandler GTM_NULLABLE_TYPE)systemCompletionHandler { + return [[self class] systemCompletionHandlerForSessionIdentifier:_sessionIdentifier]; +} + +- (void)setSystemCompletionHandler:(GTMSessionFetcherSystemCompletionHandler GTM_NULLABLE_TYPE)systemCompletionHandler { + [[self class] setSystemCompletionHandler:systemCompletionHandler + forSessionIdentifier:_sessionIdentifier]; +} + ++ (void)setSystemCompletionHandler:(GTMSessionFetcherSystemCompletionHandler GTM_NULLABLE_TYPE)systemCompletionHandler + forSessionIdentifier:(NSString *)sessionIdentifier { + if (!sessionIdentifier) { + NSLog(@"%s with nil identifier", __PRETTY_FUNCTION__); + return; + } + + @synchronized([GTMSessionFetcher class]) { + if (gSystemCompletionHandlers == nil && systemCompletionHandler != nil) { + gSystemCompletionHandlers = [[NSMutableDictionary alloc] init]; + } + // Use setValue: to remove the object if completionHandler is nil. + [gSystemCompletionHandlers setValue:systemCompletionHandler + forKey:sessionIdentifier]; + } +} + ++ (GTMSessionFetcherSystemCompletionHandler GTM_NULLABLE_TYPE)systemCompletionHandlerForSessionIdentifier:(NSString *)sessionIdentifier { + if (!sessionIdentifier) { + return nil; + } + @synchronized([GTMSessionFetcher class]) { + return [gSystemCompletionHandlers objectForKey:sessionIdentifier]; + } +} +#endif // TARGET_OS_IPHONE + +#pragma mark Getters and Setters + +@synthesize mutableRequest = _request, + downloadResumeData = _downloadResumeData, + configuration = _configuration, + configurationBlock = _configurationBlock, + sessionTask = _sessionTask, + wasCreatedFromBackgroundSession = _wasCreatedFromBackgroundSession, + sessionUserInfo = _sessionUserInfo, + taskDescription = _taskDescription, + taskPriority = _taskPriority, + useBackgroundSession = _userRequestedBackgroundSession, + usingBackgroundSession = _usingBackgroundSession, + canShareSession = _canShareSession, + completionHandler = _completionHandler, + credential = _credential, + proxyCredential = _proxyCredential, + bodyData = _bodyData, + bodyFileURL = _bodyFileURL, + bodyLength = _bodyLength, + bodyStreamProvider = _bodyStreamProvider, + authorizer = _authorizer, + service = _service, + serviceHost = _serviceHost, + servicePriority = _servicePriority, + accumulateDataBlock = _accumulateDataBlock, + receivedProgressBlock = _receivedProgressBlock, + downloadProgressBlock = _downloadProgressBlock, + resumeDataBlock = _resumeDataBlock, + didReceiveResponseBlock = _didReceiveResponseBlock, + willRedirectBlock = _willRedirectBlock, + sendProgressBlock = _sendProgressBlock, + willCacheURLResponseBlock = _willCacheURLResponseBlock, + retryBlock = _retryBlock, + retryFactor = _retryFactor, + downloadedLength = _downloadedLength, + useUploadTask = _useUploadTask, + allowedInsecureSchemes = _allowedInsecureSchemes, + allowLocalhostRequest = _allowLocalhostRequest, + allowInvalidServerCertificates = _allowInvalidServerCertificates, + cookieStorage = _cookieStorage, + callbackQueue = _callbackQueue, + initialBeginFetchDate = _initialBeginFetchDate, + testBlock = _testBlock, + comment = _comment, + log = _log; + +#if !STRIP_GTM_FETCH_LOGGING +@synthesize redirectedFromURL = _redirectedFromURL, + logRequestBody = _logRequestBody, + logResponseBody = _logResponseBody, + hasLoggedError = _hasLoggedError; +#endif + +#if GTM_BACKGROUND_TASK_FETCHING +@synthesize backgroundTaskIdentifier = _backgroundTaskIdentifier, + skipBackgroundTask = _skipBackgroundTask; +#endif + + +- (NSMutableURLRequest * GTM_NULLABLE_TYPE)mutableRequest { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + return _request; + } // @synchronized(self) +} + +- (NSMutableURLRequest * GTM_NULLABLE_TYPE)mutableRequestUnsynchronized { + return _request; +} + +- (void)setMutableRequest:(NSMutableURLRequest * GTM_NULLABLE_TYPE)request { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + _request = request; + } // @synchronized(self) +} + +- (void)setResponse:(NSURLResponse * GTM_NULLABLE_TYPE)response { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + _response = response; + } // @synchronized(self) +} + +- (int64_t)bodyLength { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + if (_bodyLength == NSURLSessionTransferSizeUnknown) { + if (_bodyData) { + _bodyLength = (int64_t)_bodyData.length; + } else if (_bodyFileURL) { + NSNumber *fileSizeNum = nil; + NSError *fileSizeError = nil; + if ([_bodyFileURL getResourceValue:&fileSizeNum + forKey:NSURLFileSizeKey + error:&fileSizeError]) { + _bodyLength = [fileSizeNum longLongValue]; + } + } + } + return _bodyLength; + } // @synchronized(self) +} + +- (NSURL * GTM_NULLABLE_TYPE)bodyFileURL { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + return _bodyFileURL; + } // @synchronized(self) +} + +- (void)setBodyFileURL:(NSURL * GTM_NULLABLE_TYPE)fileURL { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + _bodyFileURL = fileURL; + } // @synchronized(self) +} + +- (NSData * GTM_NULLABLE_TYPE)downloadedData { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + return _downloadedData; + } // @synchronized(self) +} + +- (void)setDownloadedData:(NSData * GTM_NULLABLE_TYPE)data { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + _downloadedData = [data mutableCopy]; + } // @synchronized(self) +} + +- (int64_t)downloadedLength { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + return _downloadedLength; + } // @synchronized(self) +} + +- (void)setDownloadedLength:(int64_t)length { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + _downloadedLength = length; + } // @synchronized(self) +} + +- (dispatch_queue_t GTM_NONNULL_TYPE)callbackQueue { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + return _callbackQueue; + } // @synchronized(self) +} + +- (void)setCallbackQueue:(dispatch_queue_t GTM_NULLABLE_TYPE)queue { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + _callbackQueue = queue ?: dispatch_get_main_queue(); + } // @synchronized(self) +} + +- (NSURLSession * GTM_NULLABLE_TYPE)session { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + return _session; + } // @synchronized(self) +} + +- (void)setSession:(NSURLSession * GTM_NULLABLE_TYPE)session { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + _session = session; + } // @synchronized(self) +} + +- (BOOL)canShareSession { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + return _canShareSession; + } // @synchronized(self) +} + +- (void)setCanShareSession:(BOOL)flag { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + _canShareSession = flag; + } // @synchronized(self) +} + +- (BOOL)useBackgroundSession { + // This reflects if the user requested a background session, not necessarily + // if one was created. That is tracked with _usingBackgroundSession. + + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + return _userRequestedBackgroundSession; + } // @synchronized(self) +} + +- (void)setUseBackgroundSession:(BOOL)flag { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + _userRequestedBackgroundSession = flag; + } // @synchronized(self) +} + +- (BOOL)isUsingBackgroundSession { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + return _usingBackgroundSession; + } // @synchronized(self) +} + +- (void)setUsingBackgroundSession:(BOOL)flag { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + _usingBackgroundSession = flag; + } // @synchronized(self) +} + +- (NSURLSession * GTM_NULLABLE_TYPE)sessionNeedingInvalidation { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + return _sessionNeedingInvalidation; + } // @synchronized(self) +} + +- (void)setSessionNeedingInvalidation:(NSURLSession * GTM_NULLABLE_TYPE)session { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + _sessionNeedingInvalidation = session; + } // @synchronized(self) +} + +- (NSOperationQueue * GTM_NONNULL_TYPE)sessionDelegateQueue { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + return _delegateQueue; + } // @synchronized(self) +} + +- (void)setSessionDelegateQueue:(NSOperationQueue * GTM_NULLABLE_TYPE)queue { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + _delegateQueue = queue ?: [NSOperationQueue mainQueue]; + } // @synchronized(self) +} + +- (BOOL)userStoppedFetching { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + return _userStoppedFetching; + } // @synchronized(self) +} + +- (id GTM_NULLABLE_TYPE)userData { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + return _userData; + } // @synchronized(self) +} + +- (void)setUserData:(id GTM_NULLABLE_TYPE)theObj { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + _userData = theObj; + } // @synchronized(self) +} + +- (NSURL * GTM_NULLABLE_TYPE)destinationFileURL { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + return _destinationFileURL; + } // @synchronized(self) +} + +- (void)setDestinationFileURL:(NSURL * GTM_NULLABLE_TYPE)destinationFileURL { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + if (((_destinationFileURL == nil) && (destinationFileURL == nil)) || + [_destinationFileURL isEqual:destinationFileURL]) { + return; + } + if (_sessionIdentifier) { + // This is something we don't expect to happen in production. + // However if it ever happen, leave a system log. + NSLog(@"%@: Destination File URL changed from (%@) to (%@) after session identifier has " + @"been created.", + [self class], _destinationFileURL, destinationFileURL); +#if DEBUG + // On both the simulator and devices, the path can change to the download file, but the name + // shouldn't change. Technically, this isn't supported in the fetcher, but the change of + // URL is expected to happen only across development runs through Xcode. + NSString *oldFilename = [_destinationFileURL lastPathComponent]; + NSString *newFilename = [destinationFileURL lastPathComponent]; + #pragma unused(oldFilename) + #pragma unused(newFilename) + GTMSESSION_ASSERT_DEBUG([oldFilename isEqualToString:newFilename], + @"Destination File URL cannot be changed after session identifier has been created"); +#endif + } + _destinationFileURL = destinationFileURL; + } // @synchronized(self) +} + +- (void)setProperties:(NSDictionary * GTM_NULLABLE_TYPE)dict { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + _properties = [dict mutableCopy]; + } // @synchronized(self) +} + +- (NSDictionary * GTM_NULLABLE_TYPE)properties { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + return _properties; + } // @synchronized(self) +} + +- (void)setProperty:(id GTM_NULLABLE_TYPE)obj forKey:(NSString *)key { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + if (_properties == nil && obj != nil) { + _properties = [[NSMutableDictionary alloc] init]; + } + [_properties setValue:obj forKey:key]; + } // @synchronized(self) +} + +- (id GTM_NULLABLE_TYPE)propertyForKey:(NSString *)key { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + return [_properties objectForKey:key]; + } // @synchronized(self) +} + +- (void)addPropertiesFromDictionary:(NSDictionary *)dict { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + if (_properties == nil && dict != nil) { + [self setProperties:[dict mutableCopy]]; + } else { + [_properties addEntriesFromDictionary:dict]; + } + } // @synchronized(self) +} + +- (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]; + va_end(argList); + } + [self setComment:result]; +#endif +} + +#if !STRIP_GTM_FETCH_LOGGING +- (NSData *)loggedStreamData { + return _loggedStreamData; +} + +- (void)appendLoggedStreamData:dataToAdd { + if (!_loggedStreamData) { + _loggedStreamData = [NSMutableData data]; + } + [_loggedStreamData appendData:dataToAdd]; +} + +- (void)clearLoggedStreamData { + _loggedStreamData = nil; +} + +- (void)setDeferResponseBodyLogging:(BOOL)deferResponseBodyLogging { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + if (deferResponseBodyLogging != _deferResponseBodyLogging) { + _deferResponseBodyLogging = deferResponseBodyLogging; + if (!deferResponseBodyLogging && !self.hasLoggedError) { + [_delegateQueue addOperationWithBlock:^{ + [self logNowWithError:nil]; + }]; + } + } + } // @synchronized(self) +} + +- (BOOL)deferResponseBodyLogging { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + return _deferResponseBodyLogging; + } // @synchronized(self) +} + +#else ++ (void)setLoggingEnabled:(BOOL)flag { +} + ++ (BOOL)isLoggingEnabled { + return NO; +} +#endif // STRIP_GTM_FETCH_LOGGING + +@end + +@implementation GTMSessionFetcher (BackwardsCompatibilityOnly) + +- (void)setCookieStorageMethod:(NSInteger)method { + // For backwards compatibility with the old fetcher, we'll support the old constants. + // + // Clients using the GTMSessionFetcher class should set the cookie storage explicitly + // themselves. + NSHTTPCookieStorage *storage = nil; + switch(method) { + case 0: // kGTMHTTPFetcherCookieStorageMethodStatic + // nil storage will use [[self class] staticCookieStorage] when the fetch begins. + break; + case 1: // kGTMHTTPFetcherCookieStorageMethodFetchHistory + // Do nothing; use whatever was set by the fetcher service. + return; + case 2: // kGTMHTTPFetcherCookieStorageMethodSystemDefault + storage = [NSHTTPCookieStorage sharedHTTPCookieStorage]; + break; + case 3: // kGTMHTTPFetcherCookieStorageMethodNone + // Create temporary storage for this fetcher only. + storage = [[GTMSessionCookieStorage alloc] init]; + break; + default: + GTMSESSION_ASSERT_DEBUG(0, @"Invalid cookie storage method: %d", (int)method); + } + self.cookieStorage = storage; +} + +@end + +@implementation GTMSessionCookieStorage { + NSMutableArray *_cookies; + NSHTTPCookieAcceptPolicy _policy; +} + +- (id)init { + self = [super init]; + if (self != nil) { + _cookies = [[NSMutableArray alloc] init]; + } + return self; +} + +- (NSArray * GTM_NULLABLE_TYPE)cookies { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + return [_cookies copy]; + } // @synchronized(self) +} + +- (void)setCookie:(NSHTTPCookie *)cookie { + if (!cookie) return; + if (_policy == NSHTTPCookieAcceptPolicyNever) return; + + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + [self internalSetCookie:cookie]; + } // @synchronized(self) +} + +// Note: this should only be called from inside a @synchronized(self) block. +- (void)internalSetCookie:(NSHTTPCookie *)newCookie { + GTMSessionCheckSynchronized(self); + + if (_policy == NSHTTPCookieAcceptPolicyNever) return; + + BOOL isValidCookie = (newCookie.name.length > 0 + && newCookie.domain.length > 0 + && newCookie.path.length > 0); + GTMSESSION_ASSERT_DEBUG(isValidCookie, @"invalid cookie: %@", newCookie); + + if (isValidCookie) { + // Remove the cookie if it's currently in the array. + NSHTTPCookie *oldCookie = [self cookieMatchingCookie:newCookie]; + if (oldCookie) { + [_cookies removeObjectIdenticalTo:oldCookie]; + } + + if (![[self class] hasCookieExpired:newCookie]) { + [_cookies addObject:newCookie]; + } + } +} + +// 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 * GTM_NULLABLE_TYPE)newCookies { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + [self removeExpiredCookies]; + + for (NSHTTPCookie *newCookie in newCookies) { + [self internalSetCookie:newCookie]; + } + } // @synchronized(self) +} + +- (void)setCookies:(NSArray *)cookies forURL:(NSURL * GTM_NULLABLE_TYPE)URL mainDocumentURL:(NSURL * GTM_NULLABLE_TYPE)mainDocumentURL { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + if (_policy == NSHTTPCookieAcceptPolicyNever) { + return; + } + + if (_policy == NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain) { + NSString *mainHost = mainDocumentURL.host; + NSString *associatedHost = URL.host; + if (!mainHost || ![associatedHost hasSuffix:mainHost]) { + return; + } + } + } // @synchronized(self) + [self setCookies:cookies]; +} + +- (void)deleteCookie:(NSHTTPCookie *)cookie { + if (!cookie) return; + + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + NSHTTPCookie *foundCookie = [self cookieMatchingCookie:cookie]; + if (foundCookie) { + [_cookies removeObjectIdenticalTo:foundCookie]; + } + } // @synchronized(self) +} + +// 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 * GTM_NULLABLE_TYPE)cookiesForURL:(NSURL *)theURL { + NSMutableArray *foundCookies = nil; + + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + [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 *requestingDomain = nil; + BOOL isLocalhostRetrieval = NO; + + if (IsLocalhost(host)) { + isLocalhostRetrieval = YES; + } else { + if (host.length > 0) { + requestingDomain = [@"." stringByAppendingString:host]; + } + } + + for (NSHTTPCookie *storedCookie in _cookies) { + 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 = (IsLocalhost(cookieDomain) + || [cookieDomain isEqual:@"localhost.local"]); + } else { + // Ensure we're matching exact domain names. We prepended a dot to the + // requesting domain, so we can also prepend one here if needed before + // checking if the request contains the cookie domain. + if (![cookieDomain hasPrefix:@"."]) { + cookieDomain = [@"." stringByAppendingString:cookieDomain]; + } + isDomainOK = [requestingDomain hasSuffix:cookieDomain]; + } + + BOOL isPathOK = [cookiePath isEqual:@"/"] || [path hasPrefix:cookiePath]; + BOOL isSecureOK = (!cookieIsSecure + || [scheme caseInsensitiveCompare:@"https"] == NSOrderedSame); + + if (isDomainOK && isPathOK && isSecureOK) { + if (foundCookies == nil) { + foundCookies = [NSMutableArray array]; + } + [foundCookies addObject:storedCookie]; + } + } + } // @synchronized(self) + return foundCookies; +} + +// Override methods from the NSHTTPCookieStorage (NSURLSessionTaskAdditions) category. +- (void)storeCookies:(NSArray *)cookies forTask:(NSURLSessionTask *)task { + NSURLRequest *currentRequest = task.currentRequest; + [self setCookies:cookies forURL:currentRequest.URL mainDocumentURL:nil]; +} + +- (void)getCookiesForTask:(NSURLSessionTask *)task + completionHandler:(void (^)(GTM_NSArrayOf(NSHTTPCookie *) *))completionHandler { + if (completionHandler) { + NSURLRequest *currentRequest = task.currentRequest; + NSURL *currentRequestURL = currentRequest.URL; + NSArray *cookies = [self cookiesForURL:currentRequestURL]; + completionHandler(cookies); + } +} + +// 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(self) block +- (NSHTTPCookie *)cookieMatchingCookie:(NSHTTPCookie *)cookie { + GTMSessionCheckSynchronized(self); + + NSString *name = cookie.name; + NSString *domain = cookie.domain; + NSString *path = cookie.path; + + GTMSESSION_ASSERT_DEBUG(name && domain && path, + @"Invalid stored cookie (name:%@ domain:%@ path:%@)", name, domain, path); + + for (NSHTTPCookie *storedCookie in _cookies) { + 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(self) block +- (void)removeExpiredCookies { + GTMSessionCheckSynchronized(self); + + // 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]; + if ([[self class] hasCookieExpired:storedCookie]) { + [_cookies removeObjectAtIndex:(NSUInteger)idx]; + } + } +} + ++ (BOOL)hasCookieExpired:(NSHTTPCookie *)cookie { + NSDate *expiresDate = [cookie expiresDate]; + if (expiresDate == nil) { + // Cookies seem to have a Expires property even when the expiresDate method returns nil. + id expiresVal = [[cookie properties] objectForKey:NSHTTPCookieExpires]; + if ([expiresVal isKindOfClass:[NSDate class]]) { + expiresDate = expiresVal; + } + } + BOOL hasExpired = (expiresDate != nil && [expiresDate timeIntervalSinceNow] < 0); + return hasExpired; +} + +- (void)removeAllCookies { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + [_cookies removeAllObjects]; + } // @synchronized(self) +} + +- (NSHTTPCookieAcceptPolicy)cookieAcceptPolicy { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + return _policy; + } // @synchronized(self) +} + +- (void)setCookieAcceptPolicy:(NSHTTPCookieAcceptPolicy)cookieAcceptPolicy { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + _policy = cookieAcceptPolicy; + } // @synchronized(self) +} + +@end + +void GTMSessionFetcherAssertValidSelector(id GTM_NULLABLE_TYPE obj, SEL GTM_NULLABLE_TYPE 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([(id)obj class]), + NSStringFromSelector((SEL)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([(id)obj class]), + NSStringFromSelector((SEL)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([(id)obj class]), + NSStringFromSelector((SEL)sel), (argCount - 2)); + NSCAssert(0, @"callback selector arguments incorrect"); + } + } + } + + va_end(argList); +#endif +} + +NSString *GTMFetcherCleanedUserAgentString(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 @""; + + NSMutableString *result = [NSMutableString stringWithString:str]; + + // Replace spaces and commas with underscores + [result replaceOccurrencesOfString:@" " + withString:@"_" + options:0 + range:NSMakeRange(0, result.length)]; + [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 = + [[NSCharacterSet whitespaceAndNewlineCharacterSet] mutableCopy]; + [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 *GTMFetcherSystemVersionString(void) { + static NSString *sSavedSystemString; + + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ +#if TARGET_OS_MAC && !TARGET_OS_IPHONE + // Mac build + NSProcessInfo *procInfo = [NSProcessInfo processInfo]; +#if !defined(MAC_OS_X_VERSION_10_10) + BOOL hasOperatingSystemVersion = NO; +#elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_10 + BOOL hasOperatingSystemVersion = + [procInfo respondsToSelector:@selector(operatingSystemVersion)]; +#else + BOOL hasOperatingSystemVersion = YES; +#endif + NSString *versString; + if (hasOperatingSystemVersion) { +#if defined(MAC_OS_X_VERSION_10_10) + // A reference to NSOperatingSystemVersion requires the 10.10 SDK. + NSOperatingSystemVersion version = procInfo.operatingSystemVersion; + versString = [NSString stringWithFormat:@"%zd.%zd.%zd", + version.majorVersion, version.minorVersion, version.patchVersion]; +#else +#pragma unused(procInfo) +#endif + } else { + // 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]; + versString = [plist objectForKey:@"ProductVersion"]; + if (versString.length == 0) { + versString = @"10.?.?"; + } + } + + sSavedSystemString = [[NSString alloc] initWithFormat:@"MacOSX/%@", versString]; +#elif TARGET_OS_IPHONE + // Compiling against the iPhone SDK + // Avoid the slowness of calling currentDevice repeatedly on the iPhone + UIDevice* currentDevice = [UIDevice currentDevice]; + + NSString *rawModel = [currentDevice model]; + NSString *model = GTMFetcherCleanedUserAgentString(rawModel); + + NSString *systemVersion = [currentDevice systemVersion]; + +#if TARGET_IPHONE_SIMULATOR + NSString *hardwareModel = @"sim"; +#else + NSString *hardwareModel; + struct utsname unameRecord; + if (uname(&unameRecord) == 0) { + NSString *machineName = [NSString stringWithCString:unameRecord.machine + encoding:NSUTF8StringEncoding]; + hardwareModel = GTMFetcherCleanedUserAgentString(machineName); + } else { + hardwareModel = @"unk"; + } +#endif + + sSavedSystemString = [[NSString alloc] initWithFormat:@"%@/%@ hw/%@", + model, systemVersion, hardwareModel]; + // Example: iPod_Touch/2.2 hw/iPod1_1 +#elif defined(_SYS_UTSNAME_H) + // Foundation-only build + struct utsname unameRecord; + uname(&unameRecord); + + sSavedSystemString = [NSString stringWithFormat:@"%s/%s", + unameRecord.sysname, unameRecord.release]; // "Darwin/8.11.1" +#endif + }); + return sSavedSystemString; +} + +NSString *GTMFetcherStandardUserAgentString(NSBundle * GTM_NULLABLE_TYPE bundle) { + NSString *result = [NSString stringWithFormat:@"%@ %@", + GTMFetcherApplicationIdentifier(bundle), + GTMFetcherSystemVersionString()]; + return result; +} + +NSString *GTMFetcherApplicationIdentifier(NSBundle * GTM_NULLABLE_TYPE bundle) { + @synchronized([GTMSessionFetcher class]) { + static NSMutableDictionary *sAppIDMap = nil; + + // If there's a bundle ID, use that; otherwise, use the process name + if (bundle == nil) { + bundle = [NSBundle mainBundle]; + } + NSString *bundleID = [bundle bundleIdentifier]; + if (bundleID == nil) { + bundleID = @""; + } + + NSString *identifier = [sAppIDMap objectForKey:bundleID]; + if (identifier) return identifier; + + // Apps may add a string to the info.plist to uniquely identify different builds. + identifier = [bundle objectForInfoDictionaryKey:@"GTMUserAgentID"]; + if (identifier.length == 0) { + 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 = GTMFetcherCleanedUserAgentString(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 = GTMFetcherCleanedUserAgentString(version); + + // Glue the two together (cleanup done above or else cleanup would strip the + // slash) + if (version.length > 0) { + identifier = [identifier stringByAppendingFormat:@"/%@", version]; + } + + if (sAppIDMap == nil) { + sAppIDMap = [[NSMutableDictionary alloc] init]; + } + [sAppIDMap setObject:identifier forKey:bundleID]; + return identifier; + } +} + +#if DEBUG +@implementation GTMSessionSyncMonitorInternal { + NSValue *_objectKey; // The synchronize target object. + const char *_functionName; // The function containing the monitored sync block. +} + +- (instancetype)initWithSynchronizationObject:(id)object + allowRecursive:(BOOL)allowRecursive + functionName:(const char *)functionName { + self = [super init]; + if (self) { + Class threadKey = [GTMSessionSyncMonitorInternal class]; + _objectKey = [NSValue valueWithNonretainedObject:object]; + _functionName = functionName; + + NSMutableDictionary *threadDict = [NSThread currentThread].threadDictionary; + NSMutableDictionary *counters = threadDict[threadKey]; + if (counters == nil) { + counters = [NSMutableDictionary dictionary]; + threadDict[(id)threadKey] = counters; + } + NSCountedSet *functionNamesCounter = counters[_objectKey]; + NSUInteger numberOfSyncingFunctions = functionNamesCounter.count; + + if (!allowRecursive) { + BOOL isTopLevelSyncScope = (numberOfSyncingFunctions == 0); + NSArray *stack = [NSThread callStackSymbols]; + GTMSESSION_ASSERT_DEBUG(isTopLevelSyncScope, + @"*** Recursive sync on %@ at %s; previous sync at %@\n%@", + [object class], functionName, functionNamesCounter.allObjects, + [stack subarrayWithRange:NSMakeRange(1, stack.count - 1)]); + } + + if (!functionNamesCounter) { + functionNamesCounter = [NSCountedSet set]; + counters[_objectKey] = functionNamesCounter; + } + [functionNamesCounter addObject:@(functionName)]; + } + return self; +} + +- (void)dealloc { + Class threadKey = [GTMSessionSyncMonitorInternal class]; + + NSMutableDictionary *threadDict = [NSThread currentThread].threadDictionary; + NSMutableDictionary *counters = threadDict[threadKey]; + NSCountedSet *functionNamesCounter = counters[_objectKey]; + NSString *functionNameStr = @(_functionName); + NSUInteger numberOfSyncsByThisFunction = [functionNamesCounter countForObject:functionNameStr]; + NSArray *stack = [NSThread callStackSymbols]; + GTMSESSION_ASSERT_DEBUG(numberOfSyncsByThisFunction > 0, @"Sync not found on %@ at %s\n%@", + [_objectKey.nonretainedObjectValue class], _functionName, + [stack subarrayWithRange:NSMakeRange(1, stack.count - 1)]); + [functionNamesCounter removeObject:functionNameStr]; + if (functionNamesCounter.count == 0) { + [counters removeObjectForKey:_objectKey]; + } +} + ++ (NSArray *)functionsHoldingSynchronizationOnObject:(id)object { + Class threadKey = [GTMSessionSyncMonitorInternal class]; + NSValue *localObjectKey = [NSValue valueWithNonretainedObject:object]; + + NSMutableDictionary *threadDict = [NSThread currentThread].threadDictionary; + NSMutableDictionary *counters = threadDict[threadKey]; + NSCountedSet *functionNamesCounter = counters[localObjectKey]; + return functionNamesCounter.count > 0 ? functionNamesCounter.allObjects : nil; +} +@end +#endif // DEBUG +GTM_ASSUME_NONNULL_END diff --git a/XCDYouTubeKit Demo/Pods/gtm-http-fetcher/Source/GTMHTTPFetcherLogging.h b/XCDYouTubeKit Demo/Pods/GTMSessionFetcher/Source/GTMSessionFetcherLogging.h similarity index 65% rename from XCDYouTubeKit Demo/Pods/gtm-http-fetcher/Source/GTMHTTPFetcherLogging.h rename to XCDYouTubeKit Demo/Pods/GTMSessionFetcher/Source/GTMSessionFetcherLogging.h index 93ca24c19..bc0a65c0a 100644 --- a/XCDYouTubeKit Demo/Pods/gtm-http-fetcher/Source/GTMHTTPFetcherLogging.h +++ b/XCDYouTubeKit Demo/Pods/GTMSessionFetcher/Source/GTMSessionFetcherLogging.h @@ -1,10 +1,10 @@ -/* Copyright (c) 2010 Google Inc. +/* Copyright 2014 Google Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -13,13 +13,13 @@ * limitations under the License. */ -#import "GTMHTTPFetcher.h" +#import "GTMSessionFetcher.h" // GTM HTTP Logging // -// All traffic using GTMHTTPFetcher can be easily logged. Call +// All traffic using GTMSessionFetcher can be easily logged. Call // -// [GTMHTTPFetcher setLoggingEnabled:YES]; +// [GTMSessionFetcher setLoggingEnabled:YES]; // // to begin generating log files. // @@ -52,7 +52,7 @@ #if !STRIP_GTM_FETCH_LOGGING -@interface GTMHTTPFetcher (GTMHTTPFetcherLogging) +@interface GTMSessionFetcher (GTMSessionFetcherLogging) // Note: the default logs directory is ~/Desktop/GTMHTTPDebugLogs; it will be // created as needed. If a custom directory is set, the directory should @@ -61,43 +61,47 @@ + (NSString *)loggingDirectory; // client apps can turn logging on and off -+ (void)setLoggingEnabled:(BOOL)flag; ++ (void)setLoggingEnabled:(BOOL)isLoggingEnabled; + (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; ++ (void)setLoggingToFileEnabled:(BOOL)isLoggingToFileEnabled; + (BOOL)isLoggingToFileEnabled; // client apps can optionally specify process name and date string used in // log file names -+ (void)setLoggingProcessName:(NSString *)str; ++ (void)setLoggingProcessName:(NSString *)processName; + (NSString *)loggingProcessName; -+ (void)setLoggingDateStamp:(NSString *)str; ++ (void)setLoggingDateStamp:(NSString *)dateStamp; + (NSString *)loggingDateStamp; +// client apps can specify the directory for the log for this specific run, +// typically to match the directory used by another fetcher class, like: +// +// [GTMSessionFetcher setLogDirectoryForCurrentRun:[GTMHTTPFetcher logDirectoryForCurrentRun]]; +// +// Setting this overrides the logging directory, process name, and date stamp when writing +// the log file. ++ (void)setLogDirectoryForCurrentRun:(NSString *)logDirectoryForCurrentRun; ++ (NSString *)logDirectoryForCurrentRun; + +// Prunes old log directories that have not been modified since the provided date. +// This will not delete the current run's log directory. ++ (void)deleteLogDirectoriesOlderThanDate:(NSDate *)date; + // internal; called by fetcher - (void)logFetchWithError:(NSError *)error; -- (BOOL)logCapturePostStream; +- (NSInputStream *)loggedInputStreamForInputStream:(NSInputStream *)inputStream; +- (GTMSessionFetcherBodyStreamProvider)loggedStreamProviderForStreamProvider: + (GTMSessionFetcherBodyStreamProvider)streamProvider; // internal; accessors useful for viewing logs + (NSString *)processNameLogPrefix; + (NSString *)symlinkNameSuffix; + (NSString *)htmlFileName; -// 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/XCDYouTubeKit Demo/Pods/GTMSessionFetcher/Source/GTMSessionFetcherLogging.m b/XCDYouTubeKit Demo/Pods/GTMSessionFetcher/Source/GTMSessionFetcherLogging.m new file mode 100644 index 000000000..8bffe5403 --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GTMSessionFetcher/Source/GTMSessionFetcherLogging.m @@ -0,0 +1,972 @@ +/* Copyright 2014 Google Inc. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + +#if !STRIP_GTM_FETCH_LOGGING + +#include +#include + +#import "GTMSessionFetcherLogging.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 +#if !GTMSESSION_BUILD_COMBINED_SOURCES +@interface GTMReadMonitorInputStream : NSInputStream + ++ (instancetype)inputStreamWithStream:(NSInputStream *)input; + +@property (assign) id readDelegate; +@property (assign) SEL readSelector; + +@end +#else +@class GTMReadMonitorInputStream; +#endif // !GTMSESSION_BUILD_COMBINED_SOURCES + +@interface GTMSessionFetcher (GTMHTTPFetcherLoggingUtilities) + ++ (NSString *)headersStringForDictionary:(NSDictionary *)dict; ++ (NSString *)snipSubstringOfString:(NSString *)originalStr + betweenStartString:(NSString *)startStr + endString:(NSString *)endStr; +- (void)inputStream:(GTMReadMonitorInputStream *)stream + readIntoBuffer:(void *)buffer + length:(int64_t)length; + +@end + +@implementation GTMSessionFetcher (GTMSessionFetcherLogging) + +// fetchers come and fetchers go, but statics are forever +static BOOL gIsLoggingEnabled = NO; +static BOOL gIsLoggingToFile = YES; +static NSString *gLoggingDirectoryPath = nil; +static NSString *gLogDirectoryForCurrentRun = nil; +static NSString *gLoggingDateStamp = nil; +static NSString *gLoggingProcessName = nil; + ++ (void)setLoggingDirectory:(NSString *)path { + gLoggingDirectoryPath = [path copy]; +} + ++ (NSString *)loggingDirectory { + if (!gLoggingDirectoryPath) { + NSArray *paths = nil; +#if TARGET_IPHONE_SIMULATOR + // default to a directory called GTMHTTPDebugLogs into a sandbox-safe + // directory that a developer can find easily, the application home + paths = @[ NSHomeDirectory() ]; +#elif TARGET_OS_IPHONE + // Neither ~/Desktop nor ~/Home is writable on an actual iPhone device. + // Put it in ~/Documents. + paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); +#else + // default to a directory called GTMHTTPDebugLogs in the desktop folder + paths = NSSearchPathForDirectoriesInDomains(NSDesktopDirectory, NSUserDomainMask, YES); +#endif + + NSString *desktopPath = paths.firstObject; + if (desktopPath) { + NSString *const kGTMLogFolderName = @"GTMHTTPDebugLogs"; + NSString *logsFolderPath = [desktopPath stringByAppendingPathComponent:kGTMLogFolderName]; + + NSFileManager *fileMgr = [NSFileManager defaultManager]; + BOOL isDir; + BOOL doesFolderExist = [fileMgr fileExistsAtPath:logsFolderPath isDirectory:&isDir]; + if (!doesFolderExist) { + // make the directory + doesFolderExist = [fileMgr createDirectoryAtPath:logsFolderPath + withIntermediateDirectories:YES + attributes:nil + error:NULL]; + } + if (doesFolderExist) { + // it's there; store it in the global + gLoggingDirectoryPath = [logsFolderPath copy]; + } + } + } + return gLoggingDirectoryPath; +} + ++ (void)setLogDirectoryForCurrentRun:(NSString *)logDirectoryForCurrentRun { + // Set the path for this run's logs. + gLogDirectoryForCurrentRun = [logDirectoryForCurrentRun copy]; +} + ++ (NSString *)logDirectoryForCurrentRun { + // make a directory for this run's logs, like SyncProto_logs_10-16_01-56-58PM + if (gLogDirectoryForCurrentRun) return gLogDirectoryForCurrentRun; + + NSString *parentDir = [self loggingDirectory]; + NSString *logNamePrefix = [self processNameLogPrefix]; + NSString *dateStamp = [self loggingDateStamp]; + NSString *dirName = [NSString stringWithFormat:@"%@%@", logNamePrefix, dateStamp]; + NSString *logDirectory = [parentDir stringByAppendingPathComponent:dirName]; + + if (gIsLoggingToFile) { + NSFileManager *fileMgr = [NSFileManager defaultManager]; + // Be sure that the first time this app runs, it's not writing to a preexisting folder + static BOOL gShouldReuseFolder = NO; + if (!gShouldReuseFolder) { + gShouldReuseFolder = YES; + NSString *origLogDir = logDirectory; + for (int ctr = 2; ctr < 20; ++ctr) { + if (![fileMgr fileExistsAtPath:logDirectory]) break; + + // append a digit + logDirectory = [origLogDir stringByAppendingFormat:@"_%d", ctr]; + } + } + if (![fileMgr createDirectoryAtPath:logDirectory + withIntermediateDirectories:YES + attributes:nil + error:NULL]) return nil; + } + gLogDirectoryForCurrentRun = logDirectory; + + return gLogDirectoryForCurrentRun; +} + ++ (void)setLoggingEnabled:(BOOL)isLoggingEnabled { + gIsLoggingEnabled = isLoggingEnabled; +} + ++ (BOOL)isLoggingEnabled { + return gIsLoggingEnabled; +} + ++ (void)setLoggingToFileEnabled:(BOOL)isLoggingToFileEnabled { + gIsLoggingToFile = isLoggingToFileEnabled; +} + ++ (BOOL)isLoggingToFileEnabled { + return gIsLoggingToFile; +} + ++ (void)setLoggingProcessName:(NSString *)processName { + gLoggingProcessName = [processName copy]; +} + ++ (NSString *)loggingProcessName { + // get the process name (once per run) replacing spaces with underscores + if (!gLoggingProcessName) { + NSString *procName = [[NSProcessInfo processInfo] processName]; + gLoggingProcessName = [procName stringByReplacingOccurrencesOfString:@" " withString:@"_"]; + } + return gLoggingProcessName; +} + ++ (void)setLoggingDateStamp:(NSString *)dateStamp { + gLoggingDateStamp = [dateStamp 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]; + [formatter setFormatterBehavior:NSDateFormatterBehavior10_4]; + [formatter setDateFormat:@"M-dd_hh-mm-ssa"]; + + gLoggingDateStamp = [formatter stringFromDate:[NSDate date]]; + } + return gLoggingDateStamp; +} + ++ (NSString *)processNameLogPrefix { + static NSString *gPrefix = nil; + if (!gPrefix) { + NSString *processName = [self loggingProcessName]; + gPrefix = [[NSString alloc] initWithFormat:@"%@_log_", processName]; + } + return gPrefix; +} + ++ (NSString *)symlinkNameSuffix { + return @"_log_newest.html"; +} + ++ (NSString *)htmlFileName { + return @"aperçu_http_log.html"; +} + ++ (void)deleteLogDirectoriesOlderThanDate:(NSDate *)cutoffDate { + NSFileManager *fileMgr = [NSFileManager defaultManager]; + NSURL *parentDir = [NSURL fileURLWithPath:[[self class] loggingDirectory]]; + NSURL *logDirectoryForCurrentRun = + [NSURL fileURLWithPath:[[self class] logDirectoryForCurrentRun]]; + NSError *error; + NSArray *contents = [fileMgr contentsOfDirectoryAtURL:parentDir + includingPropertiesForKeys:@[ NSURLContentModificationDateKey ] + options:0 + error:&error]; + for (NSURL *itemURL in contents) { + if ([itemURL isEqual:logDirectoryForCurrentRun]) continue; + + NSDate *modDate; + if ([itemURL getResourceValue:&modDate + forKey:NSURLContentModificationDateKey + error:&error]) { + if ([modDate compare:cutoffDate] == NSOrderedAscending) { + if (![fileMgr removeItemAtURL:itemURL error:&error]) { + NSLog(@"deleteLogDirectoriesOlderThanDate failed to delete %@: %@", + itemURL.path, error); + } + } + } else { + NSLog(@"deleteLogDirectoriesOlderThanDate failed to get mod date of %@: %@", + itemURL.path, error); + } + } +} + +// 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) 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 = [NSJSONSerialization JSONObjectWithData:inputData + options:NSJSONReadingMutableContainers + error:NULL]; + 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"]; + } + } + NSData *data = [NSJSONSerialization dataWithJSONObject:obj + options:NSJSONWritingPrettyPrinted + error:NULL]; + if (data) { + NSString *jsonStr = [[NSString alloc] initWithData:data + encoding:NSUTF8StringEncoding]; + return jsonStr; + } + } + } + +#if !TARGET_OS_IPHONE && !GTM_SKIP_LOG_XMLFORMAT + // verify that this data starts with the bytes indicating XML + + NSString *const kXMLLintPath = @"/usr/bin/xmllint"; + static BOOL gHasCheckedAvailability = NO; + static BOOL gIsXMLLintAvailable = NO; + + if (!gHasCheckedAvailability) { + gIsXMLLintAvailable = [[NSFileManager defaultManager] fileExistsAtPath:kXMLLintPath]; + gHasCheckedAvailability = YES; + } + if (gIsXMLLintAvailable + && 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]; + return dataStr; +} + +// 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) 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 = (unsigned char *)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]; + if (mungedStr) { + + // 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 munged part 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; + NSData *origPartData = [data subdataWithRange:NSMakeRange(offset, partSize)]; + NSString *origPartStr = [[NSString alloc] initWithData:origPartData + encoding:NSUTF8StringEncoding]; + 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; + NSString *logDirectory = [[self class] logDirectoryForCurrentRun]; + if (!logDirectory) return; + NSString *processName = [[self class] loggingProcessName]; + + // TODO: add Javascript to display response data formatted in hex + + // 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 app run. + // + // 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 gResponseCounter = 0; + int responseCounter = ++gResponseCounter; + + NSURLResponse *response = [self response]; + NSDictionary *responseHeaders = [self responseHeaders]; + 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; + + // file name for an image data file + NSString *responseDataFileName = nil; + + int64_t responseDataLength = self.downloadedLength; + if (responseDataLength > 0) { + NSData *downloadedData = self.downloadedData; + if (downloadedData == nil + && responseDataLength > 0 + && responseDataLength < 20000 + && self.destinationFileURL) { + // There's a download file that's not too big, so get the data to display from the downloaded + // file. + NSURL *destinationURL = self.destinationFileURL; + downloadedData = [NSData dataWithContentsOfURL:destinationURL]; + } + NSString *responseType = [responseHeaders valueForKey:@"Content-Type"]; + responseDataStr = [self formattedStringFromData:downloadedData + contentType:responseType + JSON:&responseJSON]; + NSString *responseDataExtn = nil; + NSData *dataToWrite = nil; + 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) { + // generate a response file base name like + NSString *responseBaseName = [NSString stringWithFormat:@"fetch_%d_response", responseCounter]; + 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 = [[self class] htmlFileName]; + 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 + NSFileManager *fileMgr = [NSFileManager defaultManager]; + BOOL didFileExist = [fileMgr fileExistsAtPath:htmlPath]; + + NSMutableString* outputHTML = [NSMutableString string]; + + // we need a header to say we'll have UTF-8 text + if (!didFileExist) { + [outputHTML appendFormat:@"%@ HTTP fetch log %@", + processName, [[self class] loggingDateStamp]]; + } + // now write the visible html elements + NSString *copyableFileName = [NSString stringWithFormat:@"fetch_%d.txt", responseCounter]; + + NSDate *now = [NSDate date]; + // write the date & time, the comment, and the link to the plain-text (copyable) log + [outputHTML appendFormat:@"%@      ", now]; + + NSString *comment = [self comment]; + if (comment.length > 0) { + [outputHTML appendFormat:@"%@      ", comment]; + } + [outputHTML appendFormat:@"request/response log
", copyableFileName]; + NSTimeInterval elapsed = -self.initialBeginFetchDate.timeIntervalSinceNow; + [outputHTML appendFormat:@"elapsed: %5.3fsec
", elapsed]; + + // write the request URL + NSURLRequest *request = self.mutableRequest; + NSString *requestMethod = request.HTTPMethod; + NSURL *requestURL = request.URL; + + // Save the request URL for next time in case this redirects. + NSString *redirectedFromURLString = [self.redirectedFromURL absoluteString]; + self.redirectedFromURL = [requestURL copy]; + if (redirectedFromURLString) { + [outputHTML appendFormat:@"redirected from %@
", + redirectedFromURLString]; + } + [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) { + BOOL isInsecure = [[requestURL scheme] isEqual:@"http"]; + if (isInsecure) { + // 26A0 = ⚠ + headerDetails = + @"   authorized, non-SSL "; + } else { + headerDetails = @"   authorized"; + } + } + 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 + NSData *bodyData = nil; + NSData *loggedStreamData = self.loggedStreamData; + if (loggedStreamData) { + bodyData = loggedStreamData; + } else { + bodyData = self.bodyData; + if (bodyData == nil) { + bodyData = self.mutableRequest.HTTPBody; + } + } + uint64_t bodyDataLength = bodyData.length; + + if (bodyData.length == 0) { + // If the data is in a body upload file URL, read that in if it's not huge. + NSURL *bodyFileURL = self.bodyFileURL; + if (bodyFileURL) { + NSNumber *fileSizeNum = nil; + NSError *fileSizeError = nil; + if ([bodyFileURL getResourceValue:&fileSizeNum + forKey:NSURLFileSizeKey + error:&fileSizeError]) { + bodyDataLength = [fileSizeNum unsignedLongLongValue]; + if (bodyDataLength > 0 && bodyDataLength < 50000) { + bodyData = [NSData dataWithContentsOfURL:bodyFileURL + options:NSDataReadingUncached + error:&fileSizeError]; + } + } + } + } + NSString *bodyDataStr = nil; + NSString *postType = [requestHeaders valueForKey:@"Content-Type"]; + + if (bodyDataLength > 0) { + [outputHTML appendFormat:@"   data: %llu bytes, %@
\n", + bodyDataLength, postType ? postType : @"(no type)"]; + NSString *logRequestBody = self.logRequestBody; + if (logRequestBody) { + bodyDataStr = [logRequestBody copy]; + self.logRequestBody = nil; + } else { + bodyDataStr = [self stringFromStreamData:bodyData + contentType:postType]; + if (bodyDataStr) { + // remove OAuth 2 client secret and refresh token + bodyDataStr = [[self class] snipSubstringOfString:bodyDataStr + betweenStartString:@"client_secret=" + endString:@"&"]; + bodyDataStr = [[self class] snipSubstringOfString:bodyDataStr + betweenStartString:@"refresh_token=" + endString:@"&"]; + // remove ClientLogin password + bodyDataStr = [[self class] snipSubstringOfString:bodyDataStr + 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) { + // 2691 = ⚑ + NSString *const jsonErrFmt = + @"   JSON error: %@ %@  ⚑"; + statusString = [statusString stringByAppendingFormat:jsonErrFmt, + jsonCode ? jsonCode : @"", + jsonMessage ? jsonMessage : @""]; + } + } + } + } else { + // purple for anything other than 200 or 201 + NSString *flag = status >= 400 ? @" ⚑" : @""; // 2691 = ⚑ + NSString *explanation = [NSHTTPURLResponse localizedStringForStatusCode:status]; + NSString *const statusFormat = @"%ld %@ %@"; + statusString = [NSString stringWithFormat:statusFormat, (long)status, explanation, 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) { + if (isResponseImage) { + // Make a small inline image that links to the full image file + [outputHTML appendFormat:@"   data: %lld bytes, %@
", + responseDataLength, responseMIMEType]; + NSString *const fmt = + @"image\n"; + [outputHTML appendFormat:fmt, responseDataFileName, responseDataFileName]; + } else { + // The response data was XML; link to the xml file + NSString *const fmt = + @"   data: %lld bytes, %@   %@\n"; + [outputHTML appendFormat:fmt, responseDataLength, responseMIMEType, + responseDataFileName, [responseDataFileName pathExtension]]; + } + } else { + // The response data was not an image; just show the length and MIME type + [outputHTML appendFormat:@"   data: %lld bytes, %@\n", + responseDataLength, responseMIMEType ? responseMIMEType : @"(no response type)"]; + } + // 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:@"%@ elapsed: %5.3fsec\n", now, elapsed]; + if (redirectedFromURLString) { + [copyable appendFormat:@"Redirected from %@\n", redirectedFromURLString]; + } + [copyable appendFormat:@"Request: %@ %@\n", requestMethod, requestURL]; + if (requestHeaders.count > 0) { + [copyable appendFormat:@"Request headers:\n%@\n", + [[self class] headersStringForDictionary:requestHeaders]]; + } + if (bodyDataLength > 0) { + [copyable appendFormat:@"Request body: (%llu bytes)\n", bodyDataLength]; + if (bodyDataStr) { + [copyable appendFormat:@"%@\n", bodyDataStr]; + } + [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: (%lld bytes)\n", responseDataLength]; + if (responseDataLength > 0) { + NSString *logResponseBody = self.logResponseBody; + if (logResponseBody) { + // The user has provided the response body text. + responseDataStr = [logResponseBody copy]; + self.logResponseBody = nil; + } + if (responseDataStr != nil) { + [copyable appendFormat:@"%@\n", responseDataStr]; + } else { + // Even though it's redundant, we'll put in text to indicate that all the bytes are binary. + if (self.destinationFileURL) { + [copyable appendFormat:@"<<%lld bytes>> to file %@\n", + responseDataLength, self.destinationFileURL.path]; + } else { + [copyable appendFormat:@"<<%lld bytes>>\n", 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 *parentDir = [[self class] loggingDirectory]; + 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 *const symlinkNameSuffix = [[self class] symlinkNameSuffix]; + NSString *symlinkName = [processName stringByAppendingString:symlinkNameSuffix]; + NSString *symlinkPath = [parentDir stringByAppendingPathComponent:symlinkName]; + + [fileMgr removeItemAtPath:symlinkPath error:NULL]; + [fileMgr createSymbolicLinkAtPath:symlinkPath + withDestinationPath:htmlPath + error:NULL]; +#if TARGET_OS_IPHONE + static BOOL gReportedLoggingPath = NO; + if (!gReportedLoggingPath) { + gReportedLoggingPath = YES; + NSLog(@"GTMSessionFetcher logging to \"%@\"", parentDir); + } +#endif + } +} + +- (NSInputStream *)loggedInputStreamForInputStream:(NSInputStream *)inputStream { + if (!inputStream) return nil; + if (![GTMSessionFetcher isLoggingEnabled]) return inputStream; + + [self clearLoggedStreamData]; // Clear any previous data. + Class monitorClass = NSClassFromString(@"GTMReadMonitorInputStream"); + if (!monitorClass) { + NSString const *str = @"<>"; + NSData *stringData = [str dataUsingEncoding:NSUTF8StringEncoding]; + [self appendLoggedStreamData:stringData]; + return inputStream; + } + inputStream = [monitorClass inputStreamWithStream:inputStream]; + + GTMReadMonitorInputStream *readMonitorInputStream = (GTMReadMonitorInputStream *)inputStream; + [readMonitorInputStream setReadDelegate:self]; + SEL readSel = @selector(inputStream:readIntoBuffer:length:); + [readMonitorInputStream setReadSelector:readSel]; + + return inputStream; +} + +- (GTMSessionFetcherBodyStreamProvider)loggedStreamProviderForStreamProvider: + (GTMSessionFetcherBodyStreamProvider)streamProvider { + if (!streamProvider) return nil; + if (![GTMSessionFetcher isLoggingEnabled]) return streamProvider; + + [self clearLoggedStreamData]; // Clear any previous data. + Class monitorClass = NSClassFromString(@"GTMReadMonitorInputStream"); + if (!monitorClass) { + NSString const *str = @"<>"; + NSData *stringData = [str dataUsingEncoding:NSUTF8StringEncoding]; + [self appendLoggedStreamData:stringData]; + return streamProvider; + } + GTMSessionFetcherBodyStreamProvider loggedStreamProvider = + ^(GTMSessionFetcherBodyStreamProviderResponse response) { + streamProvider(^(NSInputStream *bodyStream) { + bodyStream = [self loggedInputStreamForInputStream:bodyStream]; + response(bodyStream); + }); + }; + return loggedStreamProvider; +} + +@end + +@implementation GTMSessionFetcher (GTMSessionFetcherLoggingUtilities) + +- (void)inputStream:(GTMReadMonitorInputStream *)stream + readIntoBuffer:(void *)buffer + length:(int64_t)length { + // append the captured data + NSData *data = [NSData dataWithBytesNoCopy:buffer + length:(NSUInteger)length + freeWhenDone:NO]; + [self appendLoggedStreamData:data]; +} + +#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) 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; +} + +@end + +#endif // !STRIP_GTM_FETCH_LOGGING diff --git a/XCDYouTubeKit Demo/Pods/GTMSessionFetcher/Source/GTMSessionFetcherService.h b/XCDYouTubeKit Demo/Pods/GTMSessionFetcher/Source/GTMSessionFetcherService.h new file mode 100644 index 000000000..9fdd67310 --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GTMSessionFetcher/Source/GTMSessionFetcherService.h @@ -0,0 +1,183 @@ +/* Copyright 2014 Google Inc. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// For best performance and convenient usage, fetchers should be generated by a common +// GTMSessionFetcherService instance, like +// +// _fetcherService = [[GTMSessionFetcherService alloc] init]; +// GTMSessionFetcher* myFirstFetcher = [_fetcherService fetcherWithRequest:request1]; +// GTMSessionFetcher* mySecondFetcher = [_fetcherService fetcherWithRequest:request2]; + +#import "GTMSessionFetcher.h" + +GTM_ASSUME_NONNULL_BEGIN + +// Notifications. + +// This notification indicates a reusable session has become invalid. It is intended mainly for the +// service's unit tests. +// +// The notification object is the fetcher service. +// The invalid session is provided via the userInfo kGTMSessionFetcherServiceSessionKey key. +extern NSString *const kGTMSessionFetcherServiceSessionBecameInvalidNotification; +extern NSString *const kGTMSessionFetcherServiceSessionKey; + +@interface GTMSessionFetcherService : NSObject + +// Queues of delayed and running fetchers. Each dictionary contains arrays +// of GTMSessionFetcher *fetchers, keyed by NSString *host +@property(atomic, strong, readonly, GTM_NULLABLE) GTM_NSDictionaryOf(NSString *, NSArray *) *delayedFetchersByHost; +@property(atomic, strong, readonly, GTM_NULLABLE) GTM_NSDictionaryOf(NSString *, NSArray *) *runningFetchersByHost; + +// A max value of 0 means no fetchers should be delayed. +// The default limit is 10 simultaneous fetchers targeting each host. +// This does not apply to fetchers whose useBackgroundSession property is YES. Since services are +// not resurrected on an app relaunch, delayed fetchers would effectively be abandoned. +@property(atomic, assign) NSUInteger maxRunningFetchersPerHost; + +// Properties to be applied to each fetcher; see GTMSessionFetcher.h for descriptions +@property(atomic, strong, GTM_NULLABLE) NSURLSessionConfiguration *configuration; +@property(atomic, copy, GTM_NULLABLE) GTMSessionFetcherConfigurationBlock configurationBlock; +@property(atomic, strong, GTM_NULLABLE) NSHTTPCookieStorage *cookieStorage; +@property(atomic, strong, GTM_NULL_RESETTABLE) dispatch_queue_t callbackQueue; +@property(atomic, strong, GTM_NULLABLE) NSURLCredential *credential; +@property(atomic, strong) NSURLCredential *proxyCredential; +@property(atomic, copy, GTM_NULLABLE) GTM_NSArrayOf(NSString *) *allowedInsecureSchemes; +@property(atomic, assign) BOOL allowLocalhostRequest; +@property(atomic, assign) BOOL allowInvalidServerCertificates; +@property(atomic, assign, getter=isRetryEnabled) BOOL retryEnabled; +@property(atomic, copy, GTM_NULLABLE) GTMSessionFetcherRetryBlock retryBlock; +@property(atomic, assign) NSTimeInterval maxRetryInterval; +@property(atomic, assign) NSTimeInterval minRetryInterval; +@property(atomic, copy, GTM_NULLABLE) GTM_NSDictionaryOf(NSString *, id) *properties; + +#if GTM_BACKGROUND_TASK_FETCHING +@property(atomic, assign) BOOL skipBackgroundTask; +#endif + +// A default useragent of GTMFetcherStandardUserAgentString(nil) will be given to each fetcher +// created by this service unless the request already has a user-agent header set. +// This default will be added starting with builds with the SDKs for OS X 10.11 and iOS 9. +// +// To use the configuration's default user agent, set this property to nil. +@property(atomic, copy, GTM_NULLABLE) NSString *userAgent; + +// The authorizer to attach to the created fetchers. If a specific fetcher should +// not authorize its requests, the fetcher's authorizer property may be set to nil +// before the fetch begins. +@property(atomic, strong, GTM_NULLABLE) id authorizer; + +// Delegate queue used by the session when calling back to the fetcher. The default +// is the main queue. Changing this does not affect the queue used to call back to the +// application; that is specified by the callbackQueue property above. +@property(atomic, strong, GTM_NULL_RESETTABLE) NSOperationQueue *sessionDelegateQueue; + +// When enabled, indicates the same session should be used by subsequent fetchers. +// +// This is enabled by default. +@property(atomic, assign) BOOL reuseSession; + +// Sets the delay until an unused session is invalidated. +// The default interval is 60 seconds. +// +// If the interval is set to 0, then any reused session is not invalidated except by +// explicitly invoking -resetSession. Be aware that setting the interval to 0 thus +// causes the session's delegate to be retained until the session is explicitly reset. +@property(atomic, assign) NSTimeInterval unusedSessionTimeout; + +// If shouldReuseSession is enabled, this will force creation of a new session when future +// fetchers begin. +- (void)resetSession; + +// Create a fetcher +// +// These methods will return a fetcher. If successfully created, the connection +// will hold a strong reference to it for the life of the connection as well. +// So the caller doesn't have to hold onto the fetcher explicitly unless they +// want to be able to monitor or cancel it. +- (GTMSessionFetcher *)fetcherWithRequest:(NSURLRequest *)request; +- (GTMSessionFetcher *)fetcherWithURL:(NSURL *)requestURL; +- (GTMSessionFetcher *)fetcherWithURLString:(NSString *)requestURLString; +- (id)fetcherWithRequest:(NSURLRequest *)request + fetcherClass:(Class)fetcherClass; + +- (BOOL)isDelayingFetcher:(GTMSessionFetcher *)fetcher; + +- (NSUInteger)numberOfFetchers; // running + delayed fetchers +- (NSUInteger)numberOfRunningFetchers; +- (NSUInteger)numberOfDelayedFetchers; + +// Return a list of all running or delayed fetchers. This includes fetchers created +// by the service which have been started and have not yet stopped. +// +// Returns an array of fetcher objects, or nil if none. +- (GTM_NULLABLE GTM_NSArrayOf(GTMSessionFetcher *) *)issuedFetchers; + +// Search for running or delayed fetchers with the specified URL. +// +// Returns an array of fetcher objects found, or nil if none found. +- (GTM_NULLABLE GTM_NSArrayOf(GTMSessionFetcher *) *)issuedFetchersWithRequestURL:(NSURL *)requestURL; + +- (void)stopAllFetchers; + +// Methods for use by the fetcher class only. +- (GTM_NULLABLE NSURLSession *)session; +- (GTM_NULLABLE NSURLSession *)sessionForFetcherCreation; +- (GTM_NULLABLE id)sessionDelegate; +- (GTM_NULLABLE NSDate *)stoppedAllFetchersDate; + +// The testBlock can inspect its fetcher parameter's mutableRequest property to +// determine which fetcher is being faked. +@property(copy, GTM_NULLABLE) GTMSessionFetcherTestBlock testBlock; + +@end + +@interface GTMSessionFetcherService (TestingSupport) + +// Convenience method to create a fetcher service for testing. +// +// Fetchers generated by this mock fetcher service will not perform any +// network operation, but will invoke callbacks and provide the supplied data +// or error to the completion handler. +// +// You can make more customized mocks by setting the test block property of the service +// or fetcher; the test block can inspect the fetcher's request or other properties. +// +// See the description of the testBlock property below. ++ (instancetype)mockFetcherServiceWithFakedData:(GTM_NULLABLE NSData *)fakedDataOrNil + fakedError:(GTM_NULLABLE NSError *)fakedErrorOrNil; + +// Spin the run loop and discard events (or, if not on the main thread, just sleep the thread) +// 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. +// +// Returns NO if timed out. +- (BOOL)waitForCompletionOfAllFetchersWithTimeout:(NSTimeInterval)timeoutInSeconds; + +@end + +@interface GTMSessionFetcherService (BackwardsCompatibilityOnly) + +// Clients using GTMSessionFetcher should set the cookie storage explicitly themselves. +// This method is just for compatibility with the old fetcher. +@property(atomic, assign) NSInteger cookieStorageMethod; + +@end + +GTM_ASSUME_NONNULL_END diff --git a/XCDYouTubeKit Demo/Pods/GTMSessionFetcher/Source/GTMSessionFetcherService.m b/XCDYouTubeKit Demo/Pods/GTMSessionFetcher/Source/GTMSessionFetcherService.m new file mode 100644 index 000000000..a0f024ff9 --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GTMSessionFetcher/Source/GTMSessionFetcherService.m @@ -0,0 +1,1303 @@ +/* Copyright 2014 Google Inc. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + +#import "GTMSessionFetcherService.h" + +NSString *const kGTMSessionFetcherServiceSessionBecameInvalidNotification + = @"kGTMSessionFetcherServiceSessionBecameInvalidNotification"; +NSString *const kGTMSessionFetcherServiceSessionKey + = @"kGTMSessionFetcherServiceSessionKey"; + +#if !GTMSESSION_BUILD_COMBINED_SOURCES +@interface GTMSessionFetcher (ServiceMethods) +- (BOOL)beginFetchMayDelay:(BOOL)mayDelay + mayAuthorize:(BOOL)mayAuthorize; +@end +#endif // !GTMSESSION_BUILD_COMBINED_SOURCES + +@interface GTMSessionFetcherService () + +@property(atomic, strong, readwrite) NSDictionary *delayedFetchersByHost; +@property(atomic, strong, readwrite) NSDictionary *runningFetchersByHost; + +@end + +// Since NSURLSession doesn't support a separate delegate per task (!), instances of this +// class serve as a session delegate trampoline. +// +// This class maps a session's tasks to fetchers, and resends delegate messages to the task's +// fetcher. +@interface GTMSessionFetcherSessionDelegateDispatcher : NSObject + +// The session for the tasks in this dispatcher's task-to-fetcher map. +@property(atomic) NSURLSession *session; + +// This semaphore can block access to the session property while another fetcher is creating +// a session. +@property(atomic, readonly) dispatch_semaphore_t sessionCreationSemaphore; + +// The timer interval for invalidating a session that has no active tasks. +@property(atomic) NSTimeInterval discardInterval; + + +- (instancetype)initWithParentService:(GTMSessionFetcherService *)parentService + sessionDiscardInterval:(NSTimeInterval)discardInterval; + +- (void)setFetcher:(GTMSessionFetcher *)fetcher + forTask:(NSURLSessionTask *)task; +- (void)removeFetcher:(GTMSessionFetcher *)fetcher; + +// Before using a session, tells the delegate dispatcher to stop the discard timer. +- (void)startSessionUsage; + +// When abandoning a delegate dispatcher, we want to avoid the session retaining +// the delegate after tasks complete. +- (void)abandon; + +@end + + +@implementation GTMSessionFetcherService { + NSMutableDictionary *_delayedFetchersByHost; + NSMutableDictionary *_runningFetchersByHost; + NSUInteger _maxRunningFetchersPerHost; + + // When this ivar is nil, the service will not reuse sessions. + GTMSessionFetcherSessionDelegateDispatcher *_delegateDispatcher; + + dispatch_queue_t _callbackQueue; + NSOperationQueue *_delegateQueue; + NSHTTPCookieStorage *_cookieStorage; + NSString *_userAgent; + NSTimeInterval _timeout; + + NSURLCredential *_credential; // Username & password. + NSURLCredential *_proxyCredential; // Credential supplied to proxy servers. + + NSInteger _cookieStorageMethod; + + id _authorizer; + + // For waitForCompletionOfAllFetchersWithTimeout: we need to wait on stopped fetchers since + // they've not yet finished invoking their queued callbacks. This array is nil except when + // waiting on fetchers. + NSMutableArray *_stoppedFetchersToWaitFor; + + // For fetchers that enqueued their callbacks before stopAllFetchers was called on the service, + // set a barrier so the callbacks know to bail out. + NSDate *_stoppedAllFetchersDate; +} + +@synthesize maxRunningFetchersPerHost = _maxRunningFetchersPerHost, + configuration = _configuration, + configurationBlock = _configurationBlock, + cookieStorage = _cookieStorage, + userAgent = _userAgent, + credential = _credential, + proxyCredential = _proxyCredential, + allowedInsecureSchemes = _allowedInsecureSchemes, + allowLocalhostRequest = _allowLocalhostRequest, + allowInvalidServerCertificates = _allowInvalidServerCertificates, + retryEnabled = _retryEnabled, + retryBlock = _retryBlock, + maxRetryInterval = _maxRetryInterval, + minRetryInterval = _minRetryInterval, + properties = _properties, + unusedSessionTimeout = _unusedSessionTimeout, + testBlock = _testBlock; + +#if GTM_BACKGROUND_TASK_FETCHING +@synthesize skipBackgroundTask = _skipBackgroundTask; +#endif + +- (instancetype)init { + self = [super init]; + if (self) { + _delayedFetchersByHost = [[NSMutableDictionary alloc] init]; + _runningFetchersByHost = [[NSMutableDictionary alloc] init]; + _maxRunningFetchersPerHost = 10; + _cookieStorageMethod = -1; + _unusedSessionTimeout = 60.0; + _delegateDispatcher = + [[GTMSessionFetcherSessionDelegateDispatcher alloc] initWithParentService:self + sessionDiscardInterval:_unusedSessionTimeout]; + _callbackQueue = dispatch_get_main_queue(); + _delegateQueue = [NSOperationQueue mainQueue]; + + // Starting with the SDKs for OS X 10.11/iOS 9, the service has a default useragent. + // Apps can remove this and get the default system "CFNetwork" useragent by setting the + // fetcher service's userAgent property to nil. +#if (!TARGET_OS_IPHONE && defined(MAC_OS_X_VERSION_10_11) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_11) \ + || (TARGET_OS_IPHONE && defined(__IPHONE_9_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_9_0) + _userAgent = GTMFetcherStandardUserAgentString(nil); +#endif + } + return self; +} + +- (void)dealloc { + [self detachAuthorizer]; + [_delegateDispatcher abandon]; +} + +#pragma mark Generate a new fetcher + +- (id)fetcherWithRequest:(NSURLRequest *)request + fetcherClass:(Class)fetcherClass { + GTMSessionFetcher *fetcher = [[fetcherClass alloc] initWithRequest:request + configuration:self.configuration]; + fetcher.callbackQueue = self.callbackQueue; + fetcher.sessionDelegateQueue = self.sessionDelegateQueue; + fetcher.credential = self.credential; + fetcher.proxyCredential = self.proxyCredential; + fetcher.authorizer = self.authorizer; + fetcher.cookieStorage = self.cookieStorage; + fetcher.allowedInsecureSchemes = self.allowedInsecureSchemes; + fetcher.allowLocalhostRequest = self.allowLocalhostRequest; + fetcher.allowInvalidServerCertificates = self.allowInvalidServerCertificates; + fetcher.configurationBlock = self.configurationBlock; + fetcher.retryEnabled = self.retryEnabled; + fetcher.retryBlock = self.retryBlock; + fetcher.maxRetryInterval = self.maxRetryInterval; + fetcher.minRetryInterval = self.minRetryInterval; + fetcher.properties = self.properties; + fetcher.service = self; + if (self.cookieStorageMethod >= 0) { + [fetcher setCookieStorageMethod:self.cookieStorageMethod]; + } + +#if GTM_BACKGROUND_TASK_FETCHING + fetcher.skipBackgroundTask = self.skipBackgroundTask; +#endif + + NSString *userAgent = self.userAgent; + if (userAgent.length > 0 + && [request valueForHTTPHeaderField:@"User-Agent"] == nil) { + [fetcher.mutableRequest setValue:userAgent + forHTTPHeaderField:@"User-Agent"]; + } + fetcher.testBlock = self.testBlock; + + return fetcher; +} + +- (GTMSessionFetcher *)fetcherWithRequest:(NSURLRequest *)request { + return [self fetcherWithRequest:request + fetcherClass:[GTMSessionFetcher class]]; +} + +- (GTMSessionFetcher *)fetcherWithURL:(NSURL *)requestURL { + return [self fetcherWithRequest:[NSURLRequest requestWithURL:requestURL]]; +} + +- (GTMSessionFetcher *)fetcherWithURLString:(NSString *)requestURLString { + NSURL *url = [NSURL URLWithString:requestURLString]; + return [self fetcherWithURL:url]; +} + +// Returns a session for the fetcher's host, or nil. +- (NSURLSession *)session { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + NSURLSession *session = _delegateDispatcher.session; + return session; + } +} + +// Returns a session for the fetcher's host, or nil. For shared sessions, this +// waits on a semaphore, blocking other fetchers while the caller creates the +// session if needed. +- (NSURLSession *)sessionForFetcherCreation { + // Avoid waiting in the @synchronized section since that can deadlock. + dispatch_semaphore_t semaphore; + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + [_delegateDispatcher startSessionUsage]; + + semaphore = _delegateDispatcher.sessionCreationSemaphore; + GTMSESSION_ASSERT_DEBUG(semaphore != nil || _delegateDispatcher == nil, @"Expected semaphore"); + } + if (semaphore) { + // Wait if another fetcher is currently creating a session. + dispatch_semaphore_wait(semaphore, DISPATCH_TIME_FOREVER); + } else { + // This fetcher is creating a non-shared session, so skip the semaphore usage. + return self.session; + } + + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + NSURLSession *session = _delegateDispatcher.session; + if (session) { + GTMSESSION_ASSERT_DEBUG(semaphore == _delegateDispatcher.sessionCreationSemaphore, + @"delegate dispatcher semaphore changed"); + // The calling fetcher will receive a preexisting session, so + // we can allow other fetchers to create a session. + dispatch_semaphore_signal(semaphore); + } else { + // No existing session was obtained, so the calling fetcher will create the session; + // it *must* invoke fetcherDidCreateSession: to signal the dispatcher's semaphore after + // the session has been created (or fails to be created) to avoid a hang. + } + return session; + } +} + +- (id)sessionDelegate { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + return _delegateDispatcher; + } +} + +#pragma mark Queue Management + +- (void)addRunningFetcher:(GTMSessionFetcher *)fetcher + forHost:(NSString *)host { + // Add to the array of running fetchers for this host, creating the array if needed. + NSMutableArray *runningForHost = [_runningFetchersByHost objectForKey:host]; + if (runningForHost == nil) { + runningForHost = [NSMutableArray arrayWithObject:fetcher]; + [_runningFetchersByHost setObject:runningForHost forKey:host]; + } else { + [runningForHost addObject:fetcher]; + } +} + +- (void)addDelayedFetcher:(GTMSessionFetcher *)fetcher + forHost:(NSString *)host { + // Add to the array of delayed fetchers for this host, creating the array if needed. + NSMutableArray *delayedForHost = [_delayedFetchersByHost objectForKey:host]; + if (delayedForHost == nil) { + delayedForHost = [NSMutableArray arrayWithObject:fetcher]; + [_delayedFetchersByHost setObject:delayedForHost forKey:host]; + } else { + [delayedForHost addObject:fetcher]; + } +} + +- (BOOL)isDelayingFetcher:(GTMSessionFetcher *)fetcher { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + NSString *host = fetcher.mutableRequest.URL.host; + if (host == nil) { + return NO; + } + NSArray *delayedForHost = [_delayedFetchersByHost objectForKey:host]; + NSUInteger idx = [delayedForHost indexOfObjectIdenticalTo:fetcher]; + BOOL isDelayed = (delayedForHost != nil) && (idx != NSNotFound); + return isDelayed; + } +} + +- (BOOL)fetcherShouldBeginFetching:(GTMSessionFetcher *)fetcher { + // Entry point from the fetcher + NSURL *requestURL = fetcher.mutableRequest.URL; + NSString *host = requestURL.host; + + // Addresses "file:///path" case where localhost is the implicit host. + if (host.length == 0 && [requestURL isFileURL]) { + host = @"localhost"; + } + + if (host.length == 0) { + // Data URIs legitimately have no host, reject other hostless URLs. + GTMSESSION_ASSERT_DEBUG([[requestURL scheme] isEqual:@"data"], @"%@ lacks host", fetcher); + return YES; + } + + BOOL shouldBeginResult; + + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + NSMutableArray *runningForHost = [_runningFetchersByHost objectForKey:host]; + if (runningForHost != nil + && [runningForHost indexOfObjectIdenticalTo:fetcher] != NSNotFound) { + GTMSESSION_ASSERT_DEBUG(NO, @"%@ was already running", fetcher); + return YES; + } + + BOOL shouldRunNow = (fetcher.usingBackgroundSession + || _maxRunningFetchersPerHost == 0 + || _maxRunningFetchersPerHost > + [[self class] numberOfNonBackgroundSessionFetchers:runningForHost]); + if (shouldRunNow) { + [self addRunningFetcher:fetcher forHost:host]; + shouldBeginResult = YES; + } else { + [self addDelayedFetcher:fetcher forHost:host]; + shouldBeginResult = NO; + } + } // @synchronized(self) + + // 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; + + return shouldBeginResult; +} + +- (void)startFetcher:(GTMSessionFetcher *)fetcher { + [fetcher beginFetchMayDelay:NO + mayAuthorize:YES]; +} + +// Internal utility. Returns a fetcher's delegate if it's a dispatcher, or nil if the fetcher +// is its own delegate and has no dispatcher. +- (GTMSessionFetcherSessionDelegateDispatcher *)delegateDispatcherForFetcher:(GTMSessionFetcher *)fetcher { + GTMSessionCheckNotSynchronized(self); + + NSURLSession *fetcherSession = fetcher.session; + if (fetcherSession) { + id fetcherDelegate = fetcherSession.delegate; + BOOL hasDispatcher = (fetcherDelegate != nil && fetcherDelegate != fetcher); + if (hasDispatcher) { + GTMSESSION_ASSERT_DEBUG([fetcherDelegate isKindOfClass:[GTMSessionFetcherSessionDelegateDispatcher class]], + @"Fetcher delegate class: %@", [fetcherDelegate class]); + return (GTMSessionFetcherSessionDelegateDispatcher *)fetcherDelegate; + } + } + return nil; +} + +- (void)fetcherDidCreateSession:(GTMSessionFetcher *)fetcher { + if (fetcher.canShareSession) { + NSURLSession *fetcherSession = fetcher.session; + GTMSESSION_ASSERT_DEBUG(fetcherSession != nil, @"Fetcher missing its session: %@", fetcher); + + GTMSessionFetcherSessionDelegateDispatcher *delegateDispatcher = + [self delegateDispatcherForFetcher:fetcher]; + if (delegateDispatcher) { + GTMSESSION_ASSERT_DEBUG(delegateDispatcher.session == nil, + @"Fetcher made an extra session: %@", fetcher); + + // Save this fetcher's session. + delegateDispatcher.session = fetcherSession; + + // Allow other fetchers to request this session now. + dispatch_semaphore_signal(delegateDispatcher.sessionCreationSemaphore); + } + } +} + +- (void)fetcherDidBeginFetching:(GTMSessionFetcher *)fetcher { + // If this fetcher has a separate delegate with a shared session, then + // this fetcher should be added to the delegate's map of tasks to fetchers. + GTMSessionFetcherSessionDelegateDispatcher *delegateDispatcher = + [self delegateDispatcherForFetcher:fetcher]; + if (delegateDispatcher) { + GTMSESSION_ASSERT_DEBUG(fetcher.canShareSession, + @"Inappropriate shared session: %@", fetcher); + + // There should already be a session, from this or a previous fetcher. + // + // Sanity check that the fetcher's session is the delegate's shared session. + NSURLSession *sharedSession = delegateDispatcher.session; + NSURLSession *fetcherSession = fetcher.session; + GTMSESSION_ASSERT_DEBUG(sharedSession != nil, @"Missing delegate session: %@", fetcher); + GTMSESSION_ASSERT_DEBUG(fetcherSession == sharedSession, + @"Inconsistent session: %@ %@ (shared: %@)", + fetcher, fetcherSession, sharedSession); + + if (sharedSession != nil && fetcherSession == sharedSession) { + NSURLSessionTask *task = fetcher.sessionTask; + GTMSESSION_ASSERT_DEBUG(task != nil, @"Missing session task: %@", fetcher); + + if (task) { + [delegateDispatcher setFetcher:fetcher + forTask:task]; + } + } + } +} + +- (void)stopFetcher:(GTMSessionFetcher *)fetcher { + [fetcher stopFetching]; +} + +- (void)fetcherDidStop:(GTMSessionFetcher *)fetcher { + // Entry point from the fetcher + NSString *host = fetcher.serviceHost; + if (!host) { + // fetcher has been stopped previously + return; + } + + // This removeFetcher: invocation is a fallback; typically, fetchers are removed from the task + // map when the task completes. + GTMSessionFetcherSessionDelegateDispatcher *delegateDispatcher = + [self delegateDispatcherForFetcher:fetcher]; + [delegateDispatcher removeFetcher:fetcher]; + + NSMutableArray *fetchersToStart; + + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + // If a test is waiting for all fetchers to stop, it needs to wait for this one + // to invoke its callbacks on the callback queue. + [_stoppedFetchersToWaitFor addObject:fetcher]; + + NSMutableArray *runningForHost = [_runningFetchersByHost objectForKey:host]; + [runningForHost removeObject:fetcher]; + + NSMutableArray *delayedForHost = [_delayedFetchersByHost objectForKey:host]; + [delayedForHost removeObject:fetcher]; + + while (delayedForHost.count > 0 + && [[self class] numberOfNonBackgroundSessionFetchers:runningForHost] + < _maxRunningFetchersPerHost) { + // Start another delayed fetcher running, scanning for the minimum + // priority value, defaulting to FIFO for equal priorities + GTMSessionFetcher *nextFetcher = nil; + for (GTMSessionFetcher *delayedFetcher in delayedForHost) { + if (nextFetcher == nil + || delayedFetcher.servicePriority < nextFetcher.servicePriority) { + nextFetcher = delayedFetcher; + } + } + + if (nextFetcher) { + [self addRunningFetcher:nextFetcher forHost:host]; + runningForHost = [_runningFetchersByHost objectForKey:host]; + + [delayedForHost removeObjectIdenticalTo:nextFetcher]; + + if (!fetchersToStart) { + fetchersToStart = [NSMutableArray array]; + } + [fetchersToStart addObject:nextFetcher]; + } + } + + if (runningForHost.count == 0) { + // None left; remove the empty array + [_runningFetchersByHost removeObjectForKey:host]; + } + + if (delayedForHost.count == 0) { + [_delayedFetchersByHost removeObjectForKey:host]; + } + } // @synchronized(self) + + // Start fetchers outside of the synchronized block to avoid a deadlock. + for (GTMSessionFetcher *nextFetcher in fetchersToStart) { + [self startFetcher:nextFetcher]; + } + + // The fetcher is no longer in the running or the delayed array, + // so remove its host and thread properties + fetcher.serviceHost = nil; +} + +- (NSUInteger)numberOfFetchers { + NSUInteger running = [self numberOfRunningFetchers]; + NSUInteger delayed = [self numberOfDelayedFetchers]; + return running + delayed; +} + +- (NSUInteger)numberOfRunningFetchers { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + NSUInteger sum = 0; + for (NSString *host in _runningFetchersByHost) { + NSArray *fetchers = [_runningFetchersByHost objectForKey:host]; + sum += fetchers.count; + } + return sum; + } +} + +- (NSUInteger)numberOfDelayedFetchers { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + NSUInteger sum = 0; + for (NSString *host in _delayedFetchersByHost) { + NSArray *fetchers = [_delayedFetchersByHost objectForKey:host]; + sum += fetchers.count; + } + return sum; + } +} + +- (NSArray *)issuedFetchers { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + NSMutableArray *allFetchers = [NSMutableArray array]; + void (^accumulateFetchers)(id, id, BOOL *) = ^(NSString *host, + NSArray *fetchersForHost, + BOOL *stop) { + [allFetchers addObjectsFromArray:fetchersForHost]; + }; + [_runningFetchersByHost enumerateKeysAndObjectsUsingBlock:accumulateFetchers]; + [_delayedFetchersByHost enumerateKeysAndObjectsUsingBlock:accumulateFetchers]; + + GTMSESSION_ASSERT_DEBUG(allFetchers.count == [NSSet setWithArray:allFetchers].count, + @"Fetcher appears multiple times\n running: %@\n delayed: %@", + _runningFetchersByHost, _delayedFetchersByHost); + + return allFetchers.count > 0 ? allFetchers : nil; + } +} + +- (NSArray *)issuedFetchersWithRequestURL:(NSURL *)requestURL { + NSString *host = requestURL.host; + if (host.length == 0) return nil; + + NSURL *targetURL = [requestURL absoluteURL]; + + NSArray *allFetchers = [self issuedFetchers]; + NSIndexSet *indexes = [allFetchers indexesOfObjectsPassingTest:^BOOL(GTMSessionFetcher *fetcher, + NSUInteger idx, + BOOL *stop) { + NSURL *fetcherURL = [fetcher.mutableRequest.URL absoluteURL]; + return [fetcherURL isEqual:targetURL]; + }]; + + NSArray *result = nil; + if (indexes.count > 0) { + result = [allFetchers objectsAtIndexes:indexes]; + } + return result; +} + +- (void)stopAllFetchers { + NSArray *delayedFetchersByHost; + NSArray *runningFetchersByHost; + + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + // Set the time barrier so fetchers know not to call back even if + // the stop calls below occur after the fetchers naturally + // stopped and so were removed from _runningFetchersByHost, + // but while the callbacks were already enqueued before stopAllFetchers + // was invoked. + _stoppedAllFetchersDate = [[NSDate alloc] init]; + + // Remove fetchers from the delayed list to avoid fetcherDidStop: from + // starting more fetchers running as a side effect of stopping one + delayedFetchersByHost = _delayedFetchersByHost.allValues; + [_delayedFetchersByHost removeAllObjects]; + + runningFetchersByHost = _runningFetchersByHost.allValues; + [_runningFetchersByHost removeAllObjects]; + } + + for (NSArray *delayedForHost in delayedFetchersByHost) { + for (GTMSessionFetcher *fetcher in delayedForHost) { + [self stopFetcher:fetcher]; + } + } + + for (NSArray *runningForHost in runningFetchersByHost) { + for (GTMSessionFetcher *fetcher in runningForHost) { + [self stopFetcher:fetcher]; + } + } +} + +- (NSDate *)stoppedAllFetchersDate { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + return _stoppedAllFetchersDate; + } +} + +#pragma mark Accessors + +- (BOOL)reuseSession { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + return _delegateDispatcher != nil; + } +} + +- (void)setReuseSession:(BOOL)shouldReuse { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + BOOL wasReusing = (_delegateDispatcher != nil); + if (shouldReuse != wasReusing) { + [self abandonDispatcher]; + if (shouldReuse) { + _delegateDispatcher = + [[GTMSessionFetcherSessionDelegateDispatcher alloc] initWithParentService:self + sessionDiscardInterval:_unusedSessionTimeout]; + } else { + _delegateDispatcher = nil; + } + } + } +} + +- (void)resetSession { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + // The old dispatchers may be retained as delegates of any ongoing sessions by those sessions. + if (_delegateDispatcher) { + [self abandonDispatcher]; + _delegateDispatcher = + [[GTMSessionFetcherSessionDelegateDispatcher alloc] initWithParentService:self + sessionDiscardInterval:_unusedSessionTimeout]; + } + } +} + +- (NSTimeInterval)unusedSessionTimeout { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + return _unusedSessionTimeout; + } +} + +- (void)setUnusedSessionTimeout:(NSTimeInterval)timeout { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + _unusedSessionTimeout = timeout; + _delegateDispatcher.discardInterval = timeout; + } +} + +// This method should be called inside of @synchronized(self) +- (void)abandonDispatcher { + [_delegateDispatcher abandon]; +} + +- (NSDictionary *)runningFetchersByHost { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + return [_runningFetchersByHost copy]; + } +} + +- (void)setRunningFetchersByHost:(NSDictionary *)dict { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + _runningFetchersByHost = [dict mutableCopy]; + } +} + +- (NSDictionary *)delayedFetchersByHost { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + return [_delayedFetchersByHost copy]; + } +} + +- (void)setDelayedFetchersByHost:(NSDictionary *)dict { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + _delayedFetchersByHost = [dict mutableCopy]; + } +} + +- (id)authorizer { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + return _authorizer; + } +} + +- (void)setAuthorizer:(id)obj { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + if (obj != _authorizer) { + [self detachAuthorizer]; + } + + _authorizer = obj; + } + + // Use the fetcher service for the authorization fetches if the auth + // object supports fetcher services + if ([obj respondsToSelector:@selector(setFetcherService:)]) { +#if GTM_USE_SESSION_FETCHER + [obj setFetcherService:self]; +#else + [obj setFetcherService:(id)self]; +#endif + } +} + +// This should be called inside a @synchronized(self) block except during dealloc. +- (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)]) { + id authFetcherService = [_authorizer fetcherService]; + if (authFetcherService == self) { + [_authorizer setFetcherService:nil]; + } + } +} + +- (dispatch_queue_t GTM_NONNULL_TYPE)callbackQueue { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + return _callbackQueue; + } // @synchronized(self) +} + +- (void)setCallbackQueue:(dispatch_queue_t GTM_NULLABLE_TYPE)queue { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + _callbackQueue = queue ?: dispatch_get_main_queue(); + } // @synchronized(self) +} + +- (NSOperationQueue * GTM_NONNULL_TYPE)sessionDelegateQueue { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + return _delegateQueue; + } // @synchronized(self) +} + +- (void)setSessionDelegateQueue:(NSOperationQueue * GTM_NULLABLE_TYPE)queue { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + _delegateQueue = queue ?: [NSOperationQueue mainQueue]; + } // @synchronized(self) +} + +- (NSOperationQueue *)delegateQueue { + // Provided for compatibility with the old fetcher service. The gtm-oauth2 code respects + // any custom delegate queue for calling the app. + return nil; +} + ++ (NSUInteger)numberOfNonBackgroundSessionFetchers:(NSArray *)fetchers { + NSUInteger sum = 0; + for (GTMSessionFetcher *fetcher in fetchers) { + if (!fetcher.usingBackgroundSession) { + ++sum; + } + } + return sum; +} + +@end + +@implementation GTMSessionFetcherService (TestingSupport) + ++ (instancetype)mockFetcherServiceWithFakedData:(NSData *)fakedDataOrNil + fakedError:(NSError *)fakedErrorOrNil { +#if !GTM_DISABLE_FETCHER_TEST_BLOCK + NSURL *url = [NSURL URLWithString:@"http://example.invalid"]; + NSHTTPURLResponse *fakedResponse = + [[NSHTTPURLResponse alloc] initWithURL:url + statusCode:(fakedErrorOrNil ? 500 : 200) + HTTPVersion:@"HTTP/1.1" + headerFields:nil]; + GTMSessionFetcherService *service = [[self alloc] init]; + service.allowedInsecureSchemes = @[ @"http" ]; + service.testBlock = ^(GTMSessionFetcher *fetcherToTest, + GTMSessionFetcherTestResponse testResponse) { + testResponse(fakedResponse, fakedDataOrNil, fakedErrorOrNil); + }; + return service; +#else + GTMSESSION_ASSERT_DEBUG(0, @"Test blocks disabled"); + return nil; +#endif // GTM_DISABLE_FETCHER_TEST_BLOCK +} + +#pragma mark Synchronous Wait for Unit Testing + +- (BOOL)waitForCompletionOfAllFetchersWithTimeout:(NSTimeInterval)timeoutInSeconds { + NSDate *giveUpDate = [NSDate dateWithTimeIntervalSinceNow:timeoutInSeconds]; + _stoppedFetchersToWaitFor = [NSMutableArray array]; + + BOOL shouldSpinRunLoop = [NSThread isMainThread]; + const NSTimeInterval kSpinInterval = 0.001; + BOOL didTimeOut = NO; + while (([self numberOfFetchers] > 0 || _stoppedFetchersToWaitFor.count > 0)) { + didTimeOut = [giveUpDate timeIntervalSinceNow] < 0; + if (didTimeOut) break; + + GTMSessionFetcher *stoppedFetcher = _stoppedFetchersToWaitFor.firstObject; + if (stoppedFetcher) { + [_stoppedFetchersToWaitFor removeObject:stoppedFetcher]; + [stoppedFetcher waitForCompletionWithTimeout:10.0 * kSpinInterval]; + } + + if (shouldSpinRunLoop) { + NSDate *stopDate = [NSDate dateWithTimeIntervalSinceNow:kSpinInterval]; + [[NSRunLoop currentRunLoop] runUntilDate:stopDate]; + } else { + [NSThread sleepForTimeInterval:kSpinInterval]; + } + } + _stoppedFetchersToWaitFor = nil; + + return !didTimeOut; +} + +@end + +@implementation GTMSessionFetcherService (BackwardsCompatibilityOnly) + +- (NSInteger)cookieStorageMethod { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + return _cookieStorageMethod; + } +} + +- (void)setCookieStorageMethod:(NSInteger)cookieStorageMethod { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + _cookieStorageMethod = cookieStorageMethod; + } +} + +@end + +@implementation GTMSessionFetcherSessionDelegateDispatcher { + __weak GTMSessionFetcherService *_parentService; + NSURLSession *_session; + dispatch_semaphore_t _sessionCreationSemaphore; + + // The task map maps NSURLSessionTasks to GTMSessionFetchers + NSMutableDictionary *_taskToFetcherMap; + // The discard timer will invalidate sessions after the session's last task completes. + NSTimer *_discardTimer; + NSTimeInterval _discardInterval; +} + +@synthesize discardInterval = _discardInterval, + session = _session, + sessionCreationSemaphore = _sessionCreationSemaphore; + +- (instancetype)init { + [self doesNotRecognizeSelector:_cmd]; + return nil; +} + +- (instancetype)initWithParentService:(GTMSessionFetcherService *)parentService + sessionDiscardInterval:(NSTimeInterval)discardInterval { + self = [super init]; + if (self) { + _discardInterval = discardInterval; + _parentService = parentService; + _sessionCreationSemaphore = dispatch_semaphore_create(1); + } + return self; +} + +- (NSString *)description { + return [NSString stringWithFormat:@"%@ %p %@ %@", + [self class], self, + _session ?: @"", + _taskToFetcherMap.count > 0 ? _taskToFetcherMap : @""]; +} + +// This method should be called inside of a @synchronized(self) block. +- (void)startDiscardTimer { + [_discardTimer invalidate]; + _discardTimer = nil; + if (_discardInterval > 0) { + _discardTimer = [NSTimer timerWithTimeInterval:_discardInterval + target:self + selector:@selector(discardTimerFired:) + userInfo:nil + repeats:NO]; + [_discardTimer setTolerance:(_discardInterval / 10)]; + [[NSRunLoop mainRunLoop] addTimer:_discardTimer forMode:NSRunLoopCommonModes]; + } +} + +// This method should be called inside of a @synchronized(self) block. +- (void)destroyDiscardTimer { + [_discardTimer invalidate]; + _discardTimer = nil; +} + +- (void)discardTimerFired:(NSTimer *)timer { + GTMSessionFetcherService *service; + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + NSUInteger numberOfTasks = _taskToFetcherMap.count; + if (numberOfTasks == 0) { + service = _parentService; + } + } + // Ask the service to abandon us. It will create a new delegate dispatcher + // which will have a distinct session. + // + // Since finishing this session takes a while, it's better for the service to have a new + // delegate dispatcher while the tasks on this session's delegate dispatcher finish up. + // + // We want to call the service from outside of a @synchronized section. + [service resetSession]; +} + +- (void)abandon { + dispatch_semaphore_wait(_sessionCreationSemaphore, DISPATCH_TIME_FOREVER); + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + [self destroySessionAndTimer]; + } + dispatch_semaphore_signal(_sessionCreationSemaphore); +} + +- (void)startSessionUsage { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + [self destroyDiscardTimer]; + } +} + +// This method should be called inside of a @synchronized(self) block. +- (void)destroySessionAndTimer { + [self destroyDiscardTimer]; + + // Break any retain cycle from the session holding the delegate. + [_session finishTasksAndInvalidate]; + + // Immediately clear the session so no new task may be issued with it. + // + // The _taskToFetcherMap needs to stay valid until the outstanding tasks finish. + _session = nil; +} + +- (void)setFetcher:(GTMSessionFetcher *)fetcher forTask:(NSURLSessionTask *)task { + GTMSESSION_ASSERT_DEBUG(fetcher != nil, @"missing fetcher"); + + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + if (_taskToFetcherMap == nil) { + _taskToFetcherMap = [[NSMutableDictionary alloc] init]; + } + + if (fetcher) { + [_taskToFetcherMap setObject:fetcher forKey:task]; + [self destroyDiscardTimer]; + } + } +} + +- (void)removeFetcher:(GTMSessionFetcher *)fetcher { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + // Typically, a fetcher should be removed when its task invokes + // URLSession:task:didCompleteWithError:. + // + // When fetching with a testBlock, though, the task completed delegate + // method may not be invoked, requiring cleanup here. + NSArray *tasks = [_taskToFetcherMap allKeysForObject:fetcher]; + GTMSESSION_ASSERT_DEBUG(tasks.count <= 1, @"fetcher task not unmapped: %@", tasks); + [_taskToFetcherMap removeObjectsForKeys:tasks]; + + if (_taskToFetcherMap.count == 0) { + [self startDiscardTimer]; + } + } +} + +// This helper method provides synchronized access to the task map for the delegate +// methods below. +- (id)fetcherForTask:(NSURLSessionTask *)task { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + return [_taskToFetcherMap objectForKey:task]; + } +} + +- (void)removeTaskFromMap:(NSURLSessionTask *)task { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + [_taskToFetcherMap removeObjectForKey:task]; + } +} + +- (void)setSession:(NSURLSession *)session { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + _session = session; + } +} + +- (NSURLSession *)session { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + return _session; + } +} + +- (NSTimeInterval)discardInterval { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + return _discardInterval; + } +} + +- (void)setDiscardInterval:(NSTimeInterval)interval { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + _discardInterval = interval; + } +} + +// NSURLSessionDelegate protocol methods. + +// - (void)URLSessionDidFinishEventsForBackgroundURLSession:(NSURLSession *)session; +// +// TODO(seh): How do we route this to an appropriate fetcher? + + +- (void)URLSession:(NSURLSession *)session didBecomeInvalidWithError:(NSError *)error { + GTM_LOG_SESSION_DELEGATE(@"%@ %p URLSession:%@ didBecomeInvalidWithError:%@", + [self class], self, session, error); + NSDictionary *localTaskToFetcherMap; + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + _session = nil; + + localTaskToFetcherMap = [_taskToFetcherMap copy]; + } + + // Any "suspended" tasks may not have received callbacks from NSURLSession when the session + // completes; we'll call them now. + [localTaskToFetcherMap enumerateKeysAndObjectsUsingBlock:^(NSURLSessionTask *task, + GTMSessionFetcher *fetcher, + BOOL *stop) { + if (fetcher.session == session) { + // Our delegate method URLSession:task:didCompleteWithError: will rely on + // _taskToFetcherMap so that should still contain this fetcher. + NSError *canceledError = [NSError errorWithDomain:NSURLErrorDomain + code:NSURLErrorCancelled + userInfo:nil]; + [self URLSession:session task:task didCompleteWithError:canceledError]; + } else { + GTMSESSION_ASSERT_DEBUG(0, @"Unexpected session in fetcher: %@ has %@ (expected %@)", + fetcher, fetcher.session, session); + } + }]; + + // Our tests rely on this notification to know the session discard timer fired. + NSDictionary *userInfo = @{ kGTMSessionFetcherServiceSessionKey : session }; + NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; + [nc postNotificationName:kGTMSessionFetcherServiceSessionBecameInvalidNotification + object:_parentService + userInfo:userInfo]; +} + + +#pragma mark - NSURLSessionTaskDelegate + +// NSURLSessionTaskDelegate protocol methods. +// +// We won't test here if the fetcher responds to these since we only want this +// class to implement the same delegate methods the fetcher does (so NSURLSession's +// tests for respondsToSelector: will have the same result whether the session +// delegate is the fetcher or this dispatcher.) + +- (void)URLSession:(NSURLSession *)session + task:(NSURLSessionTask *)task +willPerformHTTPRedirection:(NSHTTPURLResponse *)response + newRequest:(NSURLRequest *)request + completionHandler:(void (^)(NSURLRequest *))completionHandler { + id fetcher = [self fetcherForTask:task]; + [fetcher URLSession:session + task:task +willPerformHTTPRedirection:response + newRequest:request + completionHandler:completionHandler]; +} + +- (void)URLSession:(NSURLSession *)session + task:(NSURLSessionTask *)task +didReceiveChallenge:(NSURLAuthenticationChallenge *)challenge + completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition, NSURLCredential *))handler { + id fetcher = [self fetcherForTask:task]; + [fetcher URLSession:session + task:task + didReceiveChallenge:challenge + completionHandler:handler]; +} + +- (void)URLSession:(NSURLSession *)session + task:(NSURLSessionTask *)task + needNewBodyStream:(void (^)(NSInputStream *bodyStream))handler { + id fetcher = [self fetcherForTask:task]; + [fetcher URLSession:session + task:task + needNewBodyStream:handler]; +} + +- (void)URLSession:(NSURLSession *)session + task:(NSURLSessionTask *)task + didSendBodyData:(int64_t)bytesSent + totalBytesSent:(int64_t)totalBytesSent +totalBytesExpectedToSend:(int64_t)totalBytesExpectedToSend { + id fetcher = [self fetcherForTask:task]; + [fetcher URLSession:session + task:task + didSendBodyData:bytesSent + totalBytesSent:totalBytesSent +totalBytesExpectedToSend:totalBytesExpectedToSend]; +} + +- (void)URLSession:(NSURLSession *)session + task:(NSURLSessionTask *)task +didCompleteWithError:(NSError *)error { + id fetcher = [self fetcherForTask:task]; + + // This is the usual way tasks are removed from the task map. + [self removeTaskFromMap:task]; + + [fetcher URLSession:session + task:task + didCompleteWithError:error]; +} + +// NSURLSessionDataDelegate protocol methods. + +- (void)URLSession:(NSURLSession *)session + dataTask:(NSURLSessionDataTask *)dataTask +didReceiveResponse:(NSURLResponse *)response + completionHandler:(void (^)(NSURLSessionResponseDisposition))handler { + id fetcher = [self fetcherForTask:dataTask]; + [fetcher URLSession:session + dataTask:dataTask + didReceiveResponse:response + completionHandler:handler]; +} + +- (void)URLSession:(NSURLSession *)session + dataTask:(NSURLSessionDataTask *)dataTask +didBecomeDownloadTask:(NSURLSessionDownloadTask *)downloadTask { + id fetcher = [self fetcherForTask:dataTask]; + GTMSESSION_ASSERT_DEBUG(fetcher != nil, @"Missing fetcher for %@", dataTask); + [self removeTaskFromMap:dataTask]; + if (fetcher) { + GTMSESSION_ASSERT_DEBUG([fetcher isKindOfClass:[GTMSessionFetcher class]], + @"Expecting GTMSessionFetcher"); + [self setFetcher:(GTMSessionFetcher *)fetcher forTask:downloadTask]; + } + + [fetcher URLSession:session + dataTask:dataTask +didBecomeDownloadTask:downloadTask]; +} + +- (void)URLSession:(NSURLSession *)session + dataTask:(NSURLSessionDataTask *)dataTask + didReceiveData:(NSData *)data { + id fetcher = [self fetcherForTask:dataTask]; + [fetcher URLSession:session + dataTask:dataTask + didReceiveData:data]; +} + +- (void)URLSession:(NSURLSession *)session + dataTask:(NSURLSessionDataTask *)dataTask + willCacheResponse:(NSCachedURLResponse *)proposedResponse + completionHandler:(void (^)(NSCachedURLResponse *))handler { + id fetcher = [self fetcherForTask:dataTask]; + [fetcher URLSession:session + dataTask:dataTask + willCacheResponse:proposedResponse + completionHandler:handler]; +} + +// NSURLSessionDownloadDelegate protocol methods. + +- (void)URLSession:(NSURLSession *)session + downloadTask:(NSURLSessionDownloadTask *)downloadTask +didFinishDownloadingToURL:(NSURL *)location { + id fetcher = [self fetcherForTask:downloadTask]; + [fetcher URLSession:session + downloadTask:downloadTask +didFinishDownloadingToURL:location]; +} + +- (void)URLSession:(NSURLSession *)session + downloadTask:(NSURLSessionDownloadTask *)downloadTask + didWriteData:(int64_t)bytesWritten + totalBytesWritten:(int64_t)totalWritten +totalBytesExpectedToWrite:(int64_t)totalExpected { + id fetcher = [self fetcherForTask:downloadTask]; + [fetcher URLSession:session + downloadTask:downloadTask + didWriteData:bytesWritten + totalBytesWritten:totalWritten +totalBytesExpectedToWrite:totalExpected]; +} + +- (void)URLSession:(NSURLSession *)session + downloadTask:(NSURLSessionDownloadTask *)downloadTask + didResumeAtOffset:(int64_t)fileOffset +expectedTotalBytes:(int64_t)expectedTotalBytes { + id fetcher = [self fetcherForTask:downloadTask]; + [fetcher URLSession:session + downloadTask:downloadTask + didResumeAtOffset:fileOffset + expectedTotalBytes:expectedTotalBytes]; +} + +@end diff --git a/XCDYouTubeKit Demo/Pods/GTMSessionFetcher/Source/GTMSessionUploadFetcher.h b/XCDYouTubeKit Demo/Pods/GTMSessionFetcher/Source/GTMSessionUploadFetcher.h new file mode 100644 index 000000000..d1bf5d52b --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GTMSessionFetcher/Source/GTMSessionUploadFetcher.h @@ -0,0 +1,131 @@ +/* Copyright 2014 Google Inc. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// GTMSessionUploadFetcher implements Google's resumable upload protocol. + +// +// This subclass of GTMSessionFetcher simulates the series of fetches +// needed for chunked upload as a single fetch operation. +// +// Protocol document: TBD +// +// 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 or -chunkFetcher methods, and +// -responseHeaders and -statusCode reflect results from the most recent chunk +// fetcher.) +// +// Chunk fetchers are discarded as soon as they have completed. +// + +// Note: Unlike the fetcher superclass, the methods of GTMSessionUploadFetcher should +// only be used from the main thread until further work is done to make this subclass +// thread-safe. + +#import "GTMSessionFetcher.h" +#import "GTMSessionFetcherService.h" + +GTM_ASSUME_NONNULL_BEGIN + +// Unless an application knows it needs a smaller chunk size, it should use the standard +// chunk size, which sends the entire file as a single chunk to minimize upload overhead. +extern int64_t const kGTMSessionUploadFetcherStandardChunkSize; + +// When uploading requires data buffer allocations (such as uploading from an NSData or +// an NSFileHandle) this is the maximum buffer size that will be created by the fetcher. +extern int64_t const kGTMSessionUploadFetcherMaximumDemandBufferSize; + +// Notification that the upload location URL was provided by the server. +extern NSString *const kGTMSessionFetcherUploadLocationObtainedNotification; + +// Block to provide data during uploads. +// +// Response data may be allocated with dataWithBytesNoCopy:length:freeWhenDone: for efficiency, +// and released after the response block returns. +// +// Pass nil as the data (and optionally an NSError) for a failure. +typedef void (^GTMSessionUploadFetcherDataProviderResponse)(NSData * GTM_NULLABLE_TYPE data, + NSError * GTM_NULLABLE_TYPE error); +typedef void (^GTMSessionUploadFetcherDataProvider)(int64_t offset, int64_t length, + GTMSessionUploadFetcherDataProviderResponse response); + +@interface GTMSessionUploadFetcher : GTMSessionFetcher + +// Create an upload fetcher specifying either the request or the resume location URL, +// then set an upload data source using one of these: +// +// setUploadFileURL: +// setUploadDataLength:provider: +// setUploadFileHandle: +// setUploadData: + ++ (instancetype)uploadFetcherWithRequest:(NSURLRequest *)request + uploadMIMEType:(NSString *)uploadMIMEType + chunkSize:(int64_t)chunkSize + fetcherService:(GTM_NULLABLE GTMSessionFetcherService *)fetcherServiceOrNil; + ++ (instancetype)uploadFetcherWithLocation:(NSURL * GTM_NULLABLE_TYPE)uploadLocationURL + uploadMIMEType:(NSString *)uploadMIMEType + chunkSize:(int64_t)chunkSize + fetcherService:(GTM_NULLABLE GTMSessionFetcherService *)fetcherServiceOrNil; + +- (void)setUploadDataLength:(int64_t)fullLength + provider:(GTM_NULLABLE GTMSessionUploadFetcherDataProvider)block; + ++ (NSArray *)uploadFetchersForBackgroundSessions; ++ (instancetype)uploadFetcherForSessionIdentifier:(NSString *)sessionIdentifier; + +- (void)pauseFetching; +- (void)resumeFetching; +- (BOOL)isPaused; + +@property(strong, GTM_NULLABLE) NSURL *uploadLocationURL; +@property(strong, GTM_NULLABLE) NSData *uploadData; +@property(strong, GTM_NULLABLE) NSURL *uploadFileURL; +@property(strong, GTM_NULLABLE) NSFileHandle *uploadFileHandle; +@property(copy, readonly, GTM_NULLABLE) GTMSessionUploadFetcherDataProvider uploadDataProvider; +@property(copy) NSString *uploadMIMEType; +@property(assign) int64_t chunkSize; +@property(assign) int64_t currentOffset; + +// The fetcher for the current data chunk, if any +@property(strong, GTM_NULLABLE) GTMSessionFetcher *chunkFetcher; + +// The active fetcher is the current chunk fetcher, or the upload fetcher itself +// if no chunk fetcher has yet been created. +@property(readonly) GTMSessionFetcher *activeFetcher; + +// The last request made by an active fetcher. Useful for testing. +@property(readonly, GTM_NULLABLE) NSURLRequest *lastChunkRequest; + +// The response headers from the most recently-completed fetch. +@property(strong, GTM_NULLABLE) NSDictionary *responseHeaders; + +// The status code from the most recently-completed fetch. +@property(assign) NSInteger statusCode; + +// Exposed for testing only. +@property(readonly, GTM_NULLABLE) dispatch_queue_t delegateCallbackQueue; +@property(readonly, GTM_NULLABLE) GTMSessionFetcherCompletionHandler delegateCompletionHandler; + +@end + +@interface GTMSessionFetcher (GTMSessionUploadFetcherMethods) + +@property(readonly, GTM_NULLABLE) GTMSessionUploadFetcher *parentUploadFetcher; + +@end + +GTM_ASSUME_NONNULL_END diff --git a/XCDYouTubeKit Demo/Pods/GTMSessionFetcher/Source/GTMSessionUploadFetcher.m b/XCDYouTubeKit Demo/Pods/GTMSessionFetcher/Source/GTMSessionUploadFetcher.m new file mode 100644 index 000000000..c0b72f12f --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GTMSessionFetcher/Source/GTMSessionUploadFetcher.m @@ -0,0 +1,1773 @@ +/* Copyright 2014 Google Inc. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + +#import "GTMSessionUploadFetcher.h" + +static NSString *const kGTMSessionIdentifierIsUploadChunkFetcherMetadataKey = @"_upChunk"; +static NSString *const kGTMSessionIdentifierUploadFileURLMetadataKey = @"_upFileURL"; +static NSString *const kGTMSessionIdentifierUploadFileLengthMetadataKey = @"_upFileLen"; +static NSString *const kGTMSessionIdentifierUploadLocationURLMetadataKey = @"_upLocURL"; +static NSString *const kGTMSessionIdentifierUploadMIMETypeMetadataKey = @"_uploadMIME"; +static NSString *const kGTMSessionIdentifierUploadChunkSizeMetadataKey = @"_upChSize"; +static NSString *const kGTMSessionIdentifierUploadCurrentOffsetMetadataKey = @"_upOffset"; + +static NSString *const kGTMSessionHeaderXGoogUploadChunkGranularity = @"X-Goog-Upload-Chunk-Granularity"; +static NSString *const kGTMSessionHeaderXGoogUploadCommand = @"X-Goog-Upload-Command"; +static NSString *const kGTMSessionHeaderXGoogUploadContentLength = @"X-Goog-Upload-Content-Length"; +static NSString *const kGTMSessionHeaderXGoogUploadContentType = @"X-Goog-Upload-Content-Type"; +static NSString *const kGTMSessionHeaderXGoogUploadOffset = @"X-Goog-Upload-Offset"; +static NSString *const kGTMSessionHeaderXGoogUploadProtocol = @"X-Goog-Upload-Protocol"; +static NSString *const kGTMSessionHeaderXGoogUploadSizeReceived = @"X-Goog-Upload-Size-Received"; +static NSString *const kGTMSessionHeaderXGoogUploadStatus = @"X-Goog-Upload-Status"; +static NSString *const kGTMSessionHeaderXGoogUploadURL = @"X-Goog-Upload-URL"; + +// Property of chunk fetchers identifying the parent upload fetcher. Non-retained NSValue. +static NSString *const kGTMSessionUploadFetcherChunkParentKey = @"_uploadFetcherChunkParent"; + +int64_t const kGTMSessionUploadFetcherStandardChunkSize = (int64_t)LLONG_MAX; + +#if TARGET_OS_IPHONE +int64_t const kGTMSessionUploadFetcherMaximumDemandBufferSize = 10 * 1024 * 1024; // 10 MB for iOS +#else +int64_t const kGTMSessionUploadFetcherMaximumDemandBufferSize = 100 * 1024 * 1024; // 100 MB for OS X +#endif + +typedef NS_ENUM(NSUInteger, GTMSessionUploadFetcherStatus) { + kStatusUnknown, + kStatusActive, + kStatusFinal, + kStatusCancelled, +}; + +NSString *const kGTMSessionFetcherUploadLocationObtainedNotification = + @"kGTMSessionFetcherUploadLocationObtainedNotification"; + +#if !GTMSESSION_BUILD_COMBINED_SOURCES +@interface GTMSessionFetcher (ProtectedMethods) + +// Access to non-public method on the parent fetcher class. +- (void)stopFetchReleasingCallbacks:(BOOL)shouldReleaseCallbacks; +- (void)createSessionIdentifierWithMetadata:(NSDictionary *)metadata; +- (GTMSessionFetcherCompletionHandler)completionHandlerWithTarget:(id)target + didFinishSelector:(SEL)finishedSelector; +- (void)invokeOnCallbackQueue:(dispatch_queue_t)callbackQueue + afterUserStopped:(BOOL)afterStopped + block:(void (^)(void))block; +- (NSTimer *)retryTimer; + +@property(readwrite, strong) NSData *downloadedData; +- (void)releaseCallbacks; + +- (NSMutableURLRequest * GTM_NULLABLE_TYPE)mutableRequestUnsynchronized; +- (NSInteger)statusCodeUnsynchronized; + +@end +#endif // !GTMSESSION_BUILD_COMBINED_SOURCES + +@interface GTMSessionUploadFetcher () + +// Changing readonly to readwrite. +@property(strong, readwrite) NSURLRequest *lastChunkRequest; + +// Internal properties. +@property(strong, atomic, GTM_NULLABLE) GTMSessionFetcher *fetcherInFlight; // Synchronized on self. + +@property(assign, atomic, getter=isSubdataGenerating) BOOL subdataGenerating; +@property(assign, atomic) BOOL shouldInitiateOffsetQuery; +@property(assign, atomic) int64_t uploadGranularity; + +@end + +@implementation GTMSessionUploadFetcher { + GTMSessionFetcher *_chunkFetcher; + + // We'll call through to the delegate's completion handler. + GTMSessionFetcherCompletionHandler _delegateCompletionHandler; + dispatch_queue_t _delegateCallbackQueue; + + // The initial fetch's body length and bytes actually sent are + // needed for calculating progress during subsequent chunk uploads + int64_t _initialBodyLength; + int64_t _initialBodySent; + + // The upload server address for the chunks of this upload session. + NSURL *_uploadLocationURL; + + // _uploadData, _uploadDataProvider, or _uploadFileHandle may be set, but only one. + NSData *_uploadData; + NSFileHandle *_uploadFileHandle; + GTMSessionUploadFetcherDataProvider _uploadDataProvider; + int64_t _uploadFileLength; + NSString *_uploadMIMEType; + int64_t _chunkSize; + int64_t _uploadGranularity; + BOOL _isPaused; + BOOL _isRestartedUpload; + BOOL _shouldInitiateOffsetQuery; + + // Tied to useBackgroundSession property, since this property is applicable to chunk fetchers. + BOOL _useBackgroundSessionOnChunkFetchers; + + // We keep the latest offset into the upload data just for progress reporting. + int64_t _currentOffset; + + NSDictionary *_recentChunkReponseHeaders; + NSInteger _recentChunkStatusCode; + + // For waiting, we need to know the fetcher in flight, if any, and if subdata generation + // is in progress. + GTMSessionFetcher *_fetcherInFlight; + BOOL _isSubdataGenerating; +} + ++ (void)load { + [self uploadFetchersForBackgroundSessions]; +} + ++ (instancetype)uploadFetcherWithRequest:(NSURLRequest *)request + uploadMIMEType:(NSString *)uploadMIMEType + chunkSize:(int64_t)chunkSize + fetcherService:(GTMSessionFetcherService *)fetcherService { + GTMSessionUploadFetcher *fetcher = [self uploadFetcherWithRequest:request + fetcherService:fetcherService]; + [fetcher setLocationURL:nil + uploadMIMEType:uploadMIMEType + chunkSize:chunkSize]; + return fetcher; +} + ++ (instancetype)uploadFetcherWithLocation:(NSURL * GTM_NULLABLE_TYPE)uploadLocationURL + uploadMIMEType:(NSString *)uploadMIMEType + chunkSize:(int64_t)chunkSize + fetcherService:(GTMSessionFetcherService *)fetcherService { + GTMSessionUploadFetcher *fetcher = [self uploadFetcherWithRequest:nil + fetcherService:fetcherService]; + [fetcher setLocationURL:uploadLocationURL + uploadMIMEType:uploadMIMEType + chunkSize:chunkSize]; + return fetcher; +} + ++ (instancetype)uploadFetcherForSessionIdentifierMetadata:(NSDictionary *)metadata { + GTMSESSION_ASSERT_DEBUG( + [metadata[kGTMSessionIdentifierIsUploadChunkFetcherMetadataKey] boolValue], + @"Session identifier metadata is not for an upload fetcher: %@", metadata); + + NSNumber *uploadFileLengthNum = metadata[kGTMSessionIdentifierUploadFileLengthMetadataKey]; + GTMSESSION_ASSERT_DEBUG(uploadFileLengthNum != nil, + @"Session metadata missing an UploadFileSize"); + if (uploadFileLengthNum == nil) return nil; + + int64_t uploadFileLength = [uploadFileLengthNum longLongValue]; + GTMSESSION_ASSERT_DEBUG(uploadFileLength >= 0, @"Session metadata UploadFileSize is unknown"); + + NSString *uploadFileURLString = metadata[kGTMSessionIdentifierUploadFileURLMetadataKey]; + GTMSESSION_ASSERT_DEBUG(uploadFileURLString, @"Session metadata missing an UploadFileURL"); + if (uploadFileURLString == nil) return nil; + + NSURL *uploadFileURL = [NSURL URLWithString:uploadFileURLString]; + // There used to be a call here to NSURL checkResourceIsReachableAndReturnError: to check for the + // existence of the file (also tried NSFileManager fileExistsAtPath:). We've determined + // empirically that the check can fail at startup even when the upload file does in fact exist. + // For now, we'll go ahead and restore the background upload fetcher. If the file doesn't exist, + // it will fail later. + + NSString *uploadLocationURLString = metadata[kGTMSessionIdentifierUploadLocationURLMetadataKey]; + NSURL *uploadLocationURL = + uploadLocationURLString ? [NSURL URLWithString:uploadLocationURLString] : nil; + + NSString *uploadMIMEType = + metadata[kGTMSessionIdentifierUploadMIMETypeMetadataKey]; + int64_t uploadChunkSize = + [metadata[kGTMSessionIdentifierUploadChunkSizeMetadataKey] longLongValue]; + if (uploadChunkSize <= 0) { + uploadChunkSize = kGTMSessionUploadFetcherStandardChunkSize; + } + int64_t currentOffset = + [metadata[kGTMSessionIdentifierUploadCurrentOffsetMetadataKey] longLongValue]; + GTMSESSION_ASSERT_DEBUG(currentOffset <= uploadFileLength, + @"CurrentOffset (%lld) exceeds UploadFileSize (%lld)", + currentOffset, uploadFileLength); + if (currentOffset > uploadFileLength) return nil; + + GTMSessionUploadFetcher *uploadFetcher = [self uploadFetcherWithLocation:uploadLocationURL + uploadMIMEType:uploadMIMEType + chunkSize:uploadChunkSize + fetcherService:nil]; + // Set the upload file length before setting the upload file URL tries to determine the length. + [uploadFetcher setUploadFileLength:uploadFileLength]; + + uploadFetcher.uploadFileURL = uploadFileURL; + uploadFetcher.sessionUserInfo = metadata; + uploadFetcher.useBackgroundSession = YES; + uploadFetcher.currentOffset = currentOffset; + uploadFetcher.allowedInsecureSchemes = @[ @"http" ]; // Allowed on restored upload fetcher. + return uploadFetcher; +} + ++ (instancetype)uploadFetcherWithRequest:(NSURLRequest *)request + fetcherService:(GTMSessionFetcherService *)fetcherService { + // Internal utility method for instantiating fetchers + GTMSessionUploadFetcher *fetcher; + if ([fetcherService isKindOfClass:[GTMSessionFetcherService class]]) { + fetcher = [fetcherService fetcherWithRequest:request + fetcherClass:self]; + } else { + fetcher = [self fetcherWithRequest:request]; + } + fetcher.useBackgroundSession = YES; + return fetcher; +} + ++ (NSPointerArray *)uploadFetcherPointerArrayForBackgroundSessions { + static NSPointerArray *gUploadFetcherPointerArrayForBackgroundSessions = nil; + + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + gUploadFetcherPointerArrayForBackgroundSessions = [NSPointerArray weakObjectsPointerArray]; + }); + return gUploadFetcherPointerArrayForBackgroundSessions; +} + ++ (instancetype)uploadFetcherForSessionIdentifier:(NSString *)sessionIdentifier { + GTMSESSION_ASSERT_DEBUG(sessionIdentifier != nil, @"Invalid session identifier"); + NSArray *uploadFetchersForBackgroundSessions = [self uploadFetchersForBackgroundSessions]; + for (GTMSessionUploadFetcher *uploadFetcher in uploadFetchersForBackgroundSessions) { + if ([uploadFetcher.chunkFetcher.sessionIdentifier isEqual:sessionIdentifier]) { + return uploadFetcher; + } + } + return nil; +} + ++ (NSArray *)uploadFetchersForBackgroundSessions { + // Collect the background session upload fetchers that are still in memory. + NSPointerArray *uploadFetcherPointerArray = [self uploadFetcherPointerArrayForBackgroundSessions]; + [uploadFetcherPointerArray compact]; + NSMutableSet *restoredSessionIdentifiers = [[NSMutableSet alloc] init]; + NSMutableArray *uploadFetchers = [[NSMutableArray alloc] init]; + for (GTMSessionUploadFetcher *uploadFetcher in uploadFetcherPointerArray) { + NSString *sessionIdentifier = uploadFetcher.chunkFetcher.sessionIdentifier; + if (sessionIdentifier) { + [restoredSessionIdentifiers addObject:sessionIdentifier]; + [uploadFetchers addObject:uploadFetcher]; + } + } + + // The system may have other ongoing background upload sessions. Restore upload fetchers for those + // too. + NSArray *fetchers = [GTMSessionFetcher fetchersForBackgroundSessions]; + for (GTMSessionFetcher *fetcher in fetchers) { + NSString *sessionIdentifier = fetcher.sessionIdentifier; + if (!sessionIdentifier || [restoredSessionIdentifiers containsObject:sessionIdentifier]) { + continue; + } + NSDictionary *sessionIdentifierMetadata = [fetcher sessionIdentifierMetadata]; + if (sessionIdentifierMetadata == nil) { + continue; + } + if (![sessionIdentifierMetadata[kGTMSessionIdentifierIsUploadChunkFetcherMetadataKey] boolValue]) { + continue; + } + GTMSessionUploadFetcher *uploadFetcher = + [self uploadFetcherForSessionIdentifierMetadata:sessionIdentifierMetadata]; + if (uploadFetcher == nil) { + // Something went wrong with this upload fetcher, so kill the restored chunk fetcher. + [fetcher stopFetching]; + continue; + } + [uploadFetchers addObject:uploadFetcher]; + uploadFetcher->_chunkFetcher = fetcher; + uploadFetcher->_fetcherInFlight = fetcher; + [uploadFetcher attachSendProgressBlockToChunkFetcher:fetcher]; + fetcher.completionHandler = + [fetcher completionHandlerWithTarget:uploadFetcher + didFinishSelector:@selector(chunkFetcher:finishedWithData:error:)]; + + GTMSESSION_LOG_DEBUG(@"%@ restoring upload fetcher %@ for chunk fetcher %@", + [self class], uploadFetcher, fetcher); + } + return uploadFetchers; +} + +- (void)setUploadData:(NSData *)data { + BOOL changed = NO; + + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + if (_uploadData != data) { + _uploadData = data; + changed = YES; + } + } + if (changed) { + [self setupRequestHeaders]; + } +} + +- (NSData *)uploadData { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + return _uploadData; + } +} + +- (void)setUploadFileHandle:(NSFileHandle *)fh { + BOOL changed = NO; + + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + if (_uploadFileHandle != fh) { + _uploadFileHandle = fh; + changed = YES; + } + } + if (changed) { + [self setupRequestHeaders]; + } +} + +- (NSFileHandle *)uploadFileHandle { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + return _uploadFileHandle; + } +} + +- (void)setUploadFileURL:(NSURL *)uploadURL { + BOOL changed = NO; + + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + if (_uploadFileURL != uploadURL) { + _uploadFileURL = uploadURL; + changed = YES; + } + } + if (changed) { + [self setupRequestHeaders]; + } +} + +- (NSURL *)uploadFileURL { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + return _uploadFileURL; + } +} + +- (void)setUploadFileLength:(int64_t)fullLength { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + _uploadFileLength = fullLength; + } +} + +- (void)setUploadDataLength:(int64_t)fullLength + provider:(GTMSessionUploadFetcherDataProvider)block { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + _uploadDataProvider = [block copy]; + _uploadFileLength = fullLength; + } + [self setupRequestHeaders]; +} + +- (GTMSessionUploadFetcherDataProvider)uploadDataProvider { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + return _uploadDataProvider; + } +} + + +- (void)setUploadMIMEType:(NSString *)uploadMIMEType { + GTMSESSION_ASSERT_DEBUG(0, @"TODO: disallow setUploadMIMEType by making declaration readonly"); + // (and uploadMIMEType, chunksize, currentOffset) + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + _uploadMIMEType = uploadMIMEType; + } +} + +- (NSString *)uploadMIMEType { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + return _uploadMIMEType; + } +} + +- (void)setupRequestHeaders { + GTMSessionCheckNotSynchronized(self); + +#if DEBUG + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + int hasData = (_uploadData != nil) ? 1 : 0; + int hasFileHandle = (_uploadFileHandle != nil) ? 1 : 0; + int hasFileURL = (_uploadFileURL != nil) ? 1 : 0; + int hasUploadDataProvider = (_uploadDataProvider != nil) ? 1 : 0; + int numberOfSources = hasData + hasFileHandle + hasFileURL + hasUploadDataProvider; + #pragma unused(numberOfSources) + GTMSESSION_ASSERT_DEBUG(numberOfSources == 1, + @"Need just one upload source (%d)", numberOfSources); + } // @synchronized(self) +#endif + + // Add our custom headers to the initial request indicating the data + // type and total size to be delivered later in the chunk requests. + NSMutableURLRequest *mutableRequest = [self mutableRequestUnsynchronized]; + + GTMSESSION_ASSERT_DEBUG((mutableRequest == nil) != (_uploadLocationURL == nil), + @"Request and location are mutually exclusive"); + if (!mutableRequest) return; + + NSNumber *lengthNum = @([self fullUploadLength]); + [mutableRequest setValue:@"resumable" + forHTTPHeaderField:kGTMSessionHeaderXGoogUploadProtocol]; + [mutableRequest setValue:@"start" + forHTTPHeaderField:kGTMSessionHeaderXGoogUploadCommand]; + [mutableRequest setValue:_uploadMIMEType + forHTTPHeaderField:kGTMSessionHeaderXGoogUploadContentType]; + [mutableRequest setValue:lengthNum.stringValue + forHTTPHeaderField:kGTMSessionHeaderXGoogUploadContentLength]; + + NSString *method = mutableRequest.HTTPMethod; + if (method == nil || [method caseInsensitiveCompare:@"GET"] == NSOrderedSame) { + [mutableRequest setHTTPMethod:@"POST"]; + } + + // Ensure the user agent header identifies this to the upload server as a + // GTMSessionUploadFetcher client. The /1 can be incremented in the unlikely circumstance + // we need to make a bug fix in the client that the server can recognize. + NSString *const kUserAgentStub = @"(GTMSUF/1)"; + NSString *userAgent = [mutableRequest valueForHTTPHeaderField:@"User-Agent"]; + if (userAgent == nil + || [userAgent rangeOfString:kUserAgentStub].location == NSNotFound) { + if (userAgent.length == 0) { + userAgent = GTMFetcherStandardUserAgentString(nil); + } + userAgent = [userAgent stringByAppendingFormat:@" %@", kUserAgentStub]; + [mutableRequest setValue:userAgent forHTTPHeaderField:@"User-Agent"]; + } +} + +- (void)setLocationURL:(NSURL * GTM_NULLABLE_TYPE)location + uploadMIMEType:(NSString *)uploadMIMEType + chunkSize:(int64_t)chunkSize { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + GTMSESSION_ASSERT_DEBUG(chunkSize > 0, @"chunk size is zero"); + + // When resuming an upload, set the known upload target URL. + _uploadLocationURL = location; + + _uploadMIMEType = uploadMIMEType; + _chunkSize = chunkSize; + + // Indicate that we've not yet determined the file handle's length + _uploadFileLength = -1; + + // Indicate that we've not yet determined the upload fetcher status + _recentChunkStatusCode = -1; + + // If this is restarting an upload begun by another fetcher, + // the location is specified but the request is nil + _isRestartedUpload = (location != nil); + } // @synchronized(self) +} + +- (int64_t)fullUploadLength { + int64_t result; + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + if (_uploadData) { + result = (int64_t)_uploadData.length; + } else { + if (_uploadFileLength == -1) { + if (_uploadFileHandle) { + // First time through, seek to end to determine file length + _uploadFileLength = (int64_t)[_uploadFileHandle seekToEndOfFile]; + } else if (_uploadDataProvider) { + // _uploadFileLength is set when the _uploadDataProvider is set. + GTMSESSION_ASSERT_DEBUG(_uploadFileLength >= 0, @"No uploadDataProvider length set"); + } else { + NSNumber *filesizeNum; + NSError *valueError; + if ([_uploadFileURL getResourceValue:&filesizeNum + forKey:NSURLFileSizeKey + error:&valueError]) { + _uploadFileLength = filesizeNum.longLongValue; + } else { + GTMSESSION_ASSERT_DEBUG(NO, @"Cannot get file size: %@\n %@", + valueError, _uploadFileURL.path); + _uploadFileLength = 0; + } + } + } + result = _uploadFileLength; + } + } // @synchronized(self) + return result; +} + +// Make a subdata of the upload data. +- (void)generateChunkSubdataWithOffset:(int64_t)offset + length:(int64_t)length + response:(GTMSessionUploadFetcherDataProviderResponse)response { + GTMSessionUploadFetcherDataProvider uploadDataProvider = self.uploadDataProvider; + if (uploadDataProvider) { + uploadDataProvider(offset, length, response); + return; + } + + NSData *uploadData = self.uploadData; + if (uploadData) { + // NSData provided. + NSData *resultData; + if (offset == 0 && length == (int64_t)uploadData.length) { + resultData = uploadData; + } else { + int64_t dataLength = (int64_t)uploadData.length; + // Ensure our range is valid. b/18007814 + if (offset + length > dataLength) { + NSString *errorMessage = [NSString stringWithFormat: + @"Range invalid for upload data. offset: %lld\tlength: %lld\tdataLength: %lld", + offset, length, dataLength]; + GTMSESSION_ASSERT_DEBUG(NO, @"%@", errorMessage); + response(nil, [self uploadChunkUnavailableErrorWithDescription:errorMessage]); + return; + } + NSRange range = NSMakeRange((NSUInteger)offset, (NSUInteger)length); + resultData = [uploadData subdataWithRange:range]; + } + response(resultData, nil); + return; + } + NSURL *uploadFileURL = self.uploadFileURL; + if (uploadFileURL) { + dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ + [self generateChunkSubdataFromFileURL:uploadFileURL + offset:offset + length:length + response:response]; + }); + return; + } + GTMSESSION_ASSERT_DEBUG(_uploadFileHandle, @"Unexpectedly missing upload data package"); + NSFileHandle *uploadFileHandle = self.uploadFileHandle; + dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ + [self generateChunkSubdataFromFileHandle:uploadFileHandle + offset:offset + length:length + response:response]; + }); +} + +- (void)generateChunkSubdataFromFileHandle:(NSFileHandle *)fileHandle + offset:(int64_t)offset + length:(int64_t)length + response:(GTMSessionUploadFetcherDataProviderResponse)response { + NSData *resultData; + NSError *error; + @try { + [fileHandle seekToFileOffset:(unsigned long long)offset]; + resultData = [fileHandle readDataOfLength:(NSUInteger)length]; + } + @catch (NSException *exception) { + GTMSESSION_ASSERT_DEBUG(NO, @"uploadFileHandle failed to read, %@", exception); + error = [self uploadChunkUnavailableErrorWithDescription:exception.description]; + } + // The response always re-dispatches to the main thread, so we skip doing that here. + response(resultData, error); +} + +- (void)generateChunkSubdataFromFileURL:(NSURL *)fileURL + offset:(int64_t)offset + length:(int64_t)length + response:(GTMSessionUploadFetcherDataProviderResponse)response { + GTMSessionCheckNotSynchronized(self); + + NSData *resultData; + NSError *error; + int64_t fullUploadLength = [self fullUploadLength]; + NSData *mappedData = + [NSData dataWithContentsOfURL:fileURL + options:NSDataReadingMappedAlways + NSDataReadingUncached + error:&error]; + if (!mappedData) { + // We could not create an NSData by memory-mapping the file. +#if TARGET_IPHONE_SIMULATOR + // NSTemporaryDirectory() can differ in the simulator between app restarts, + // yet the contents for the new path remains unchanged, so try the latest temp path. + if ([error.domain isEqual:NSCocoaErrorDomain] && (error.code == NSFileReadNoSuchFileError)) { + NSString *filename = [fileURL lastPathComponent]; + NSString *filePath = [NSTemporaryDirectory() stringByAppendingPathComponent:filename]; + NSURL *newFileURL = [NSURL fileURLWithPath:filePath]; + if (![newFileURL isEqual:fileURL]) { + [self generateChunkSubdataFromFileURL:newFileURL + offset:offset + length:length + response:response]; + return; + } + } +#endif + + // If the file is just too large to create an NSData for, or if for some other reason we can't + // map it, create an NSFileHandle instead to read a subset into an NSData. +#if DEBUG + NSNumber *fileSizeNum; + BOOL hasFileSize = [fileURL getResourceValue:&fileSizeNum forKey:NSURLFileSizeKey error:NULL]; + GTMSESSION_LOG_DEBUG(@"Note: uploadFileURL is falling back to creating upload chunks by reading" + @" an NSFileHandle since uploadFileURL failed to map the upload file," + @" file size %@, %@", + hasFileSize ? fileSizeNum : @"unknown", error); +#endif + + NSFileHandle *fileHandle = [NSFileHandle fileHandleForReadingFromURL:fileURL + error:&error]; + if (fileHandle != nil) { + [self generateChunkSubdataFromFileHandle:fileHandle + offset:offset + length:length + response:response]; + return; + } + GTMSESSION_ASSERT_DEBUG(NO, @"uploadFileURL failed to read, %@", error); + // Fall through with the error. + } else { + // Successfully created an NSData by memory-mapping the file. + if (offset > 0 || length < fullUploadLength) { + NSRange range = NSMakeRange((NSUInteger)offset, (NSUInteger)length); + resultData = [mappedData subdataWithRange:range]; + } else { + resultData = mappedData; + } + } + // The response always re-dispatches to the main thread, so we skip re-dispatching here. + response(resultData, error); +} + +- (NSError *)uploadChunkUnavailableErrorWithDescription:(NSString *)description { + // The description in the userInfo is intended as a clue to programmers, not + // for client code to examine or rely on. + NSDictionary *userInfo = @{ @"description" : description }; + return [NSError errorWithDomain:kGTMSessionFetcherErrorDomain + code:GTMSessionFetcherErrorUploadChunkUnavailable + userInfo:userInfo]; +} + +- (NSError *)prematureFailureErrorWithUserInfo:(NSDictionary *)userInfo { + // An error for if we get an unexpected status from the upload server or + // otherwise cannot continue. This is an issue beyond the upload protocol; + // there's no way the client can do anything useful except give up. + NSError *error = [NSError errorWithDomain:kGTMSessionFetcherStatusDomain + code:501 // Not implemented + userInfo:userInfo]; + return error; +} + ++ (GTMSessionUploadFetcherStatus)uploadStatusFromResponseHeaders:(NSDictionary *)responseHeaders { + NSString *statusString = [responseHeaders objectForKey:kGTMSessionHeaderXGoogUploadStatus]; + if ([statusString isEqual:@"active"]) { + return kStatusActive; + } + if ([statusString isEqual:@"final"]) { + return kStatusFinal; + } + if ([statusString isEqual:@"cancelled"]) { + return kStatusCancelled; + } + return kStatusUnknown; +} + +#pragma mark Method overrides affecting the initial fetch only + +- (void)setCompletionHandler:(GTMSessionFetcherCompletionHandler)handler { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + _delegateCompletionHandler = handler; + } +} + +- (void)setDelegateCallbackQueue:(dispatch_queue_t GTM_NULLABLE_TYPE)queue { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + _delegateCallbackQueue = queue; + } +} + +- (BOOL)isRestartedUpload { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + return _isRestartedUpload; + } +} + +- (GTMSessionFetcher * GTM_NULLABLE_TYPE)chunkFetcher { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + return _chunkFetcher; + } +} + +- (void)setChunkFetcher:(GTMSessionFetcher * GTM_NULLABLE_TYPE)fetcher { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + _chunkFetcher = fetcher; + } +} + +- (void)setFetcherInFlight:(GTMSessionFetcher * GTM_NULLABLE_TYPE)fetcher { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + _fetcherInFlight = fetcher; + } +} + +- (GTMSessionFetcher * GTM_NULLABLE_TYPE)fetcherInFlight { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + return _fetcherInFlight; + } +} + +- (void)beginFetchWithCompletionHandler:(GTMSessionFetcherCompletionHandler)handler { + GTMSessionCheckNotSynchronized(self); + + [self setInitialBodyLength:[self bodyLength]]; + + // We'll hold onto the superclass's callback queue so we can invoke the handler + // even after the superclass has released the queue and its callback handler, as + // happens during auth failure. + [self setDelegateCallbackQueue:self.callbackQueue]; + self.completionHandler = handler; + + if ([self isRestartedUpload]) { + // When restarting an upload, we know the destination location for chunk fetches, + // but we need to query to find the initial offset. + if (![self isPaused]) { + [self sendQueryForUploadOffsetWithFetcherProperties:self.properties]; + } + return; + } + // We don't want to call into the client'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 + GTMSESSION_ASSERT_DEBUG(self.fetcherInFlight == nil, @"unexpected fetcher in flight: %@", + self.fetcherInFlight); + + self.fetcherInFlight = self; + [super beginFetchWithCompletionHandler:^(NSData *data, NSError *error) { + self.fetcherInFlight = nil; + // callback + + BOOL hasTestBlock = (self.testBlock != nil); + if (![self isRestartedUpload] && !hasTestBlock) { + if (error == nil) { + [self beginChunkFetches]; + } else { + if ([self retryTimer] == nil) { + [self invokeFinalCallbackWithData:nil + error:error + shouldInvalidateLocation:YES]; + } + } + } 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. + if (!hasTestBlock) { + [self invokeFinalCallbackWithData:data + error:error + shouldInvalidateLocation:YES]; + } else { + // There was a test block, so we won't do chunk fetches, but we simulate obtaining + // the data to be uploaded from the upload data provider block or the file handle, + // and then call back. + [self generateChunkSubdataWithOffset:0 + length:[self fullUploadLength] + response:^(NSData *generateData, NSError *generateError) { + [self invokeFinalCallbackWithData:data + error:error + shouldInvalidateLocation:YES]; + }]; + } + } + }]; +} + +- (void)beginChunkFetches { + GTMSessionCheckNotSynchronized(self); + +#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. + if (self.downloadedData.length > 0) { + NSData *downloadedData = self.downloadedData; + NSString *str = [[NSString alloc] initWithData:downloadedData + encoding:NSUTF8StringEncoding]; + #pragma unused(str) + GTMSESSION_ASSERT_DEBUG(NO, @"unexpected response data (uploading to the wrong URL?)\n%@", str); + } +#endif + + // We need to get the upload URL from the location header to continue. + NSDictionary *responseHeaders = [self responseHeaders]; + + [self retrieveUploadChunkGranularityFromResponseHeaders:responseHeaders]; + + GTMSessionUploadFetcherStatus uploadStatus = + [[self class] uploadStatusFromResponseHeaders:responseHeaders]; + GTMSESSION_ASSERT_DEBUG(uploadStatus != kStatusUnknown, + @"beginChunkFetches has unexpected upload status for headers %@", responseHeaders); + + BOOL isPrematureStop = (uploadStatus == kStatusFinal) || (uploadStatus == kStatusCancelled); + + NSString *uploadLocationURLStr = [responseHeaders objectForKey:kGTMSessionHeaderXGoogUploadURL]; + BOOL hasUploadLocation = (uploadLocationURLStr.length > 0); + + if (isPrematureStop || !hasUploadLocation) { + GTMSESSION_ASSERT_DEBUG(NO, @"Premature failure: upload-status:\"%@\" location:%@", + [responseHeaders objectForKey:kGTMSessionHeaderXGoogUploadStatus], uploadLocationURLStr); + // We cannot continue since we do not know the location to use + // as our upload destination. + NSDictionary *userInfo = nil; + NSData *downloadedData = self.downloadedData; + if (downloadedData.length > 0) { + userInfo = @{ kGTMSessionFetcherStatusDataKey : downloadedData }; + } + NSError *failureError = [self prematureFailureErrorWithUserInfo:userInfo]; + [self invokeFinalCallbackWithData:nil + error:failureError + shouldInvalidateLocation:YES]; + return; + } + + self.uploadLocationURL = [NSURL URLWithString:uploadLocationURLStr]; + + NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; + [nc postNotificationName:kGTMSessionFetcherUploadLocationObtainedNotification + object:self]; + + // we've now sent all of the initial post body data, so we need to include + // its size in future progress indicator callbacks + [self setInitialBodySent:[self initialBodyLength]]; + + // just in case the user paused us during the initial fetch... + if (![self isPaused]) { + [self uploadNextChunkWithOffset:0]; + } +} + +- (void)URLSession:(NSURLSession *)session + task:(NSURLSessionTask *)task + didSendBodyData:(int64_t)bytesSent + totalBytesSent:(int64_t)totalBytesSent + totalBytesExpectedToSend:(int64_t)totalBytesExpectedToSend { + // Overrides the superclass. + [self invokeDelegateWithDidSendBytes:bytesSent + totalBytesSent:totalBytesSent + totalBytesExpectedToSend:totalBytesExpectedToSend + [self fullUploadLength]]; +} + +- (BOOL)shouldReleaseCallbacksUponCompletion { + // Overrides the superclass. + + // 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)invokeFinalCallbackWithData:(NSData *)data + error:(NSError *)error + shouldInvalidateLocation:(BOOL)shouldInvalidateLocation { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + if (shouldInvalidateLocation) { + _uploadLocationURL = nil; + } + + dispatch_queue_t queue = _delegateCallbackQueue; + GTMSessionFetcherCompletionHandler handler = _delegateCompletionHandler; + if (queue && handler) { + [self invokeOnCallbackQueue:queue + afterUserStopped:NO + block:^{ + handler(data, error); + }]; + } + } // @synchronized(self) + + [self releaseUploadAndBaseCallbacks]; +} + +- (void)releaseUploadAndBaseCallbacks { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + _delegateCallbackQueue = nil; + _delegateCompletionHandler = nil; + _uploadDataProvider = nil; + } + + // Release the base class's callbacks, too, if needed. + [self releaseCallbacks]; +} + +- (void)stopFetchReleasingCallbacks:(BOOL)shouldReleaseCallbacks { + GTMSessionCheckNotSynchronized(self); + + // Clear _fetcherInFlight when stopped. Moved from stopFetching, since that's a public method, + // where this method does the work. Fixes issue clearing value when retryBlock included. + GTMSessionFetcher *fetcherInFlight = self.fetcherInFlight; + if (fetcherInFlight == self) { + self.fetcherInFlight = nil; + } + + [super stopFetchReleasingCallbacks:shouldReleaseCallbacks]; + + if (shouldReleaseCallbacks) { + [self releaseUploadAndBaseCallbacks]; + } +} + +#pragma mark Chunk fetching methods + +- (void)uploadNextChunkWithOffset:(int64_t)offset { + // use the properties in each chunk fetcher + NSDictionary *props = [self properties]; + + [self uploadNextChunkWithOffset:offset + fetcherProperties:props]; +} + +- (void)sendQueryForUploadOffsetWithFetcherProperties:(NSDictionary *)props { + GTMSessionFetcher *queryFetcher = [self uploadFetcherWithProperties:props + isQueryFetch:YES]; + queryFetcher.bodyData = [NSData data]; + + NSString *originalComment = self.comment; + [queryFetcher setCommentWithFormat:@"%@ (query offset)", + originalComment ? originalComment : @"upload"]; + + NSMutableURLRequest *queryRequest = queryFetcher.mutableRequest; + [queryRequest setValue:@"query" forHTTPHeaderField:kGTMSessionHeaderXGoogUploadCommand]; + + self.fetcherInFlight = queryFetcher; + [queryFetcher beginFetchWithDelegate:self + didFinishSelector:@selector(queryFetcher:finishedWithData:error:)]; +} + +- (void)queryFetcher:(GTMSessionFetcher *)queryFetcher + finishedWithData:(NSData *)data + error:(NSError *)error { + self.fetcherInFlight = nil; + + NSDictionary *responseHeaders = [queryFetcher responseHeaders]; + NSString *sizeReceivedHeader; + + GTMSessionUploadFetcherStatus uploadStatus = + [[self class] uploadStatusFromResponseHeaders:responseHeaders]; + GTMSESSION_ASSERT_DEBUG(uploadStatus != kStatusUnknown || error != nil, + @"query fetcher completion has unexpected upload status for headers %@", responseHeaders); + + if (error == nil) { + sizeReceivedHeader = [responseHeaders objectForKey:kGTMSessionHeaderXGoogUploadSizeReceived]; + + if (uploadStatus == kStatusCancelled || + (uploadStatus == kStatusActive && sizeReceivedHeader == nil)) { + NSDictionary *userInfo = nil; + if (data.length > 0) { + userInfo = @{ kGTMSessionFetcherStatusDataKey : data }; + } + error = [self prematureFailureErrorWithUserInfo:userInfo]; + } + } + + if (error == nil) { + int64_t offset = [sizeReceivedHeader longLongValue]; + int64_t fullUploadLength = [self fullUploadLength]; + if (offset >= fullUploadLength || uploadStatus == kStatusFinal) { + // Handle we're done + [self chunkFetcher:queryFetcher finishedWithData:data error:nil]; + } else { + [self retrieveUploadChunkGranularityFromResponseHeaders:responseHeaders]; + [self uploadNextChunkWithOffset:offset]; + } + } else { + // Handle query error + [self chunkFetcher:queryFetcher finishedWithData:data error:error]; + } +} + +- (void)sendCancelUploadWithFetcherProperties:(NSDictionary *)props { + GTMSessionFetcher *cancelFetcher = [self uploadFetcherWithProperties:props + isQueryFetch:YES]; + cancelFetcher.bodyData = [NSData data]; + + NSString *originalComment = self.comment; + [cancelFetcher setCommentWithFormat:@"%@ (cancel)", + originalComment ? originalComment : @"upload"]; + + NSMutableURLRequest *cancelRequest = cancelFetcher.mutableRequest; + [cancelRequest setValue:@"cancel" forHTTPHeaderField:kGTMSessionHeaderXGoogUploadCommand]; + + self.fetcherInFlight = cancelFetcher; + [cancelFetcher beginFetchWithCompletionHandler:^(NSData *data, NSError *error) { + self.fetcherInFlight = nil; + if (error) { + GTMSESSION_LOG_DEBUG(@"cancelFetcher %@", error); + } + }]; +} + +- (void)uploadNextChunkWithOffset:(int64_t)offset + fetcherProperties:(NSDictionary *)props { + GTMSessionCheckNotSynchronized(self); + + // Example chunk headers: + // X-Goog-Upload-Command: upload, finalize + // X-Goog-Upload-Offset: 0 + // Content-Length: 2000000 + // Content-Type: image/jpeg + // + // {bytes 0-1999999} + + // The chunk upload URL requires no authentication header. + GTMSessionFetcher *chunkFetcher = [self uploadFetcherWithProperties:props + isQueryFetch:NO]; + [self attachSendProgressBlockToChunkFetcher:chunkFetcher]; + NSMutableURLRequest *chunkRequest = chunkFetcher.mutableRequest; + + BOOL isUploadingFileURL = (self.uploadFileURL != nil); + + // Upload another chunk, meeting server-required granularity. + int64_t chunkSize = self.chunkSize; + + int64_t fullUploadLength = [self fullUploadLength]; + + BOOL isUploadingFullFile = (offset == 0 && chunkSize >= fullUploadLength); + if (!isUploadingFileURL || !isUploadingFullFile) { + // We're not uploading the entire file and given the file URL. Since we'll be + // allocating a subdata block for a chunk, we need to bound it to something that + // won't blow the process's memory. + if (chunkSize > kGTMSessionUploadFetcherMaximumDemandBufferSize) { + chunkSize = kGTMSessionUploadFetcherMaximumDemandBufferSize; + } + } + + int64_t granularity = self.uploadGranularity; + if (granularity > 0) { + if (chunkSize < granularity) { + chunkSize = granularity; + } else { + chunkSize = chunkSize - (chunkSize % granularity); + } + } + + GTMSESSION_ASSERT_DEBUG(offset < fullUploadLength || fullUploadLength == 0, + @"offset %lld exceeds data length %lld", offset, fullUploadLength); + + if (granularity > 0) { + offset = offset - (offset % granularity); + } + + // 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 + NSString *command; + int64_t thisChunkSize = chunkSize; + + BOOL isChunkTooBig = (thisChunkSize >= (fullUploadLength - offset)); + BOOL isChunkAlmostBigEnough = (fullUploadLength - offset - 2500 < thisChunkSize); + BOOL isFinalChunk = isChunkTooBig || isChunkAlmostBigEnough; + if (isFinalChunk) { + thisChunkSize = fullUploadLength - offset; + if (thisChunkSize > 0) { + command = @"upload, finalize"; + } else { + command = @"finalize"; + } + } else { + command = @"upload"; + } + NSString *lengthStr = @(thisChunkSize).stringValue; + NSString *offsetStr = @(offset).stringValue; + + [chunkRequest setValue:command forHTTPHeaderField:kGTMSessionHeaderXGoogUploadCommand]; + [chunkRequest setValue:lengthStr forHTTPHeaderField:@"Content-Length"]; + [chunkRequest setValue:offsetStr forHTTPHeaderField:kGTMSessionHeaderXGoogUploadOffset]; + + // Append the range of bytes in this chunk to the fetcher comment. + NSString *baseComment = self.comment; + [chunkFetcher setCommentWithFormat:@"%@ (%lld-%lld)", + baseComment ? baseComment : @"upload", offset, MAX(0, offset + thisChunkSize - 1)]; + + // The chunk size may have changed, so determine again if we're uploading the full file. + isUploadingFullFile = (offset == 0 && thisChunkSize >= fullUploadLength); + if (isUploadingFullFile && isUploadingFileURL) { + // The data is the full upload file URL. + chunkFetcher.bodyFileURL = self.uploadFileURL; + [self beginChunkFetcher:chunkFetcher + offset:offset]; + } else { + // Make an NSData for the subset for this upload chunk. + self.subdataGenerating = YES; + [self generateChunkSubdataWithOffset:offset + length:thisChunkSize + response:^(NSData *chunkData, NSError *chunkError) { + // The subdata methods may leave us on a background thread. + dispatch_async(dispatch_get_main_queue(), ^{ + self.subdataGenerating = NO; + if (chunkData == nil) { + NSError *responseError = chunkError; + if (!responseError) { + responseError = [self uploadChunkUnavailableErrorWithDescription:@"chunkData is nil"]; + } + [self invokeFinalCallbackWithData:nil + error:responseError + shouldInvalidateLocation:YES]; + return; + } + + BOOL didWriteFile = NO; + if (isUploadingFileURL) { + // Make a temporary file with the data subset. + NSString *tempName = + [NSString stringWithFormat:@"GTMUpload_temp_%@", [[NSUUID UUID] UUIDString]]; + NSString *tempPath = [NSTemporaryDirectory() stringByAppendingPathComponent:tempName]; + NSError *writeError; + didWriteFile = [chunkData writeToFile:tempPath + options:NSDataWritingAtomic + error:&writeError]; + if (didWriteFile) { + chunkFetcher.bodyFileURL = [NSURL fileURLWithPath:tempPath]; + } else { + GTMSESSION_LOG_DEBUG(@"writeToFile failed: %@\n%@", writeError, tempPath); + } + } + if (!didWriteFile) { + chunkFetcher.bodyData = [chunkData copy]; + } + [self beginChunkFetcher:chunkFetcher + offset:offset]; + }); + }]; + } +} + +- (void)beginChunkFetcher:(GTMSessionFetcher *)chunkFetcher + offset:(int64_t)offset { + + // Track the current offset for progress reporting + self.currentOffset = offset; + + // Hang on to the fetcher in case we need to cancel it. We set these before beginning the + // chunk fetch so the observers notified of chunk fetches can inspect the upload fetcher to + // match to the chunk. + self.chunkFetcher = chunkFetcher; + self.fetcherInFlight = chunkFetcher; + + [chunkFetcher beginFetchWithDelegate:self + didFinishSelector:@selector(chunkFetcher:finishedWithData:error:)]; +} + +- (void)attachSendProgressBlockToChunkFetcher:(GTMSessionFetcher *)chunkFetcher { + chunkFetcher.sendProgressBlock = ^(int64_t bytesSent, int64_t totalBytesSent, + int64_t totalBytesExpectedToSend) { + // The total bytes expected include the initial body and the full chunked + // data, independent of how big this fetcher's chunk is. + int64_t initialBodySent = [self bodyLength]; // TODO(grobbins) use [self initialBodySent] + int64_t totalSent = initialBodySent + self.currentOffset + totalBytesSent; + int64_t totalExpected = initialBodySent + [self fullUploadLength]; + + [self invokeDelegateWithDidSendBytes:bytesSent + totalBytesSent:totalSent + totalBytesExpectedToSend:totalExpected]; + }; +} + +- (NSDictionary *)uploadSessionIdentifierMetadata { + NSMutableDictionary *metadata = [NSMutableDictionary dictionary]; + metadata[kGTMSessionIdentifierIsUploadChunkFetcherMetadataKey] = @YES; + GTMSESSION_ASSERT_DEBUG(self.uploadFileURL, + @"Invalid upload fetcher to create session identifier for metadata"); + metadata[kGTMSessionIdentifierUploadFileURLMetadataKey] = [self.uploadFileURL absoluteString]; + metadata[kGTMSessionIdentifierUploadFileLengthMetadataKey] = @([self fullUploadLength]); + + if (self.uploadLocationURL) { + metadata[kGTMSessionIdentifierUploadLocationURLMetadataKey] = + [self.uploadLocationURL absoluteString]; + } + if (self.uploadMIMEType) { + metadata[kGTMSessionIdentifierUploadMIMETypeMetadataKey] = self.uploadMIMEType; + } + metadata[kGTMSessionIdentifierUploadChunkSizeMetadataKey] = @(self.chunkSize); + metadata[kGTMSessionIdentifierUploadCurrentOffsetMetadataKey] = @(self.currentOffset); + return metadata; +} + +- (GTMSessionFetcher *)uploadFetcherWithProperties:(NSDictionary *)properties + isQueryFetch:(BOOL)isQueryFetch { + GTMSessionCheckNotSynchronized(self); + + // Common code to make a request for a query command or for a chunk upload. + NSURL *uploadLocationURL = self.uploadLocationURL; + NSMutableURLRequest *chunkRequest = [NSMutableURLRequest requestWithURL:uploadLocationURL]; + [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"]; + } + // To avoid timeouts when debugging, copy the timeout of the initial fetcher. + NSTimeInterval origTimeout = [origRequest timeoutInterval]; + [chunkRequest setTimeoutInterval:origTimeout]; + + // + // Make a new chunk fetcher. + // + GTMSessionFetcher *chunkFetcher = [GTMSessionFetcher fetcherWithRequest:chunkRequest]; + chunkFetcher.callbackQueue = self.callbackQueue; + chunkFetcher.sessionUserInfo = self.sessionUserInfo; + chunkFetcher.configurationBlock = self.configurationBlock; + chunkFetcher.allowedInsecureSchemes = self.allowedInsecureSchemes; + chunkFetcher.allowLocalhostRequest = self.allowLocalhostRequest; + chunkFetcher.allowInvalidServerCertificates = self.allowInvalidServerCertificates; + chunkFetcher.useUploadTask = !isQueryFetch; + + if (self.uploadFileURL && !isQueryFetch && self.useBackgroundSession) { + [chunkFetcher createSessionIdentifierWithMetadata:[self uploadSessionIdentifierMetadata]]; + } + + // Give the chunk fetcher the same properties as the previous chunk fetcher + chunkFetcher.properties = [properties mutableCopy]; + [chunkFetcher setProperty:[NSValue valueWithNonretainedObject:self] + forKey:kGTMSessionUploadFetcherChunkParentKey]; + + // copy other fetcher settings to the new fetcher + chunkFetcher.retryEnabled = self.retryEnabled; + chunkFetcher.maxRetryInterval = self.maxRetryInterval; + + if ([self isRetryEnabled]) { + // We interpose our own retry method both so we can change the request to ask the server to + // tell us where to resume the chunk. + chunkFetcher.retryBlock = ^(BOOL suggestedWillRetry, NSError *chunkError, + GTMSessionFetcherRetryResponse response){ + void (^finish)(BOOL) = ^(BOOL shouldRetry){ + // We'll retry by sending an offset query. + if (shouldRetry) { + self.shouldInitiateOffsetQuery = YES; + + // We don't know what our actual offset is anymore, but the server will tell us. + self.currentOffset = 0; + } + // We don't actually want to retry this specific fetcher. + response(NO); + }; + + GTMSessionFetcherRetryBlock retryBlock = self.retryBlock; + if (retryBlock) { + // Ask the client, then call the finish block above. + retryBlock(suggestedWillRetry, chunkError, finish); + } else { + finish(suggestedWillRetry); + } + }; + } + + // The chunk request becomes the fetcher's last request. + self.lastChunkRequest = chunkFetcher.mutableRequest; + return chunkFetcher; +} + +- (void)chunkFetcher:(GTMSessionFetcher *)chunkFetcher + finishedWithData:(NSData *)data + error:(NSError *)error { + BOOL hasDestroyedOldChunkFetcher = NO; + self.fetcherInFlight = nil; + + NSDictionary *responseHeaders = [chunkFetcher responseHeaders]; + GTMSessionUploadFetcherStatus uploadStatus = + [[self class] uploadStatusFromResponseHeaders:responseHeaders]; + GTMSESSION_ASSERT_DEBUG(uploadStatus != kStatusUnknown + || error != nil + || self.wasCreatedFromBackgroundSession, + @"chunk fetcher completion has kStatusUnknown upload status for headers %@ fetcher %@", + responseHeaders, self); + BOOL isUploadStatusStopped = (uploadStatus == kStatusFinal || uploadStatus == kStatusCancelled); + + int64_t previousContentLength = + [[chunkFetcher.mutableRequest valueForHTTPHeaderField:@"Content-Length"] longLongValue]; + // The Content-Length header may not be present if the chunk fetcher was recreated from + // a background session. + BOOL hasKnownChunkSize = (previousContentLength > 0); + BOOL needsQuery = (!hasKnownChunkSize && !isUploadStatusStopped); + + if (error || needsQuery) { + NSInteger status = error.code; + + // Status 4xx indicates a bad offset in the Google upload protocol. However, do not retry status + // 404 per spec, nor if the upload size appears to have been zero (since the server will just + // keep asking us to retry.) + if (self.shouldInitiateOffsetQuery || + needsQuery || + ([error.domain isEqual:kGTMSessionFetcherStatusDomain] && + status >= 400 && status <= 499 && + status != 404 && + uploadStatus == kStatusActive && + previousContentLength > 0)) { + self.shouldInitiateOffsetQuery = NO; + [self destroyChunkFetcher]; + hasDestroyedOldChunkFetcher = YES; + [self sendQueryForUploadOffsetWithFetcherProperties:chunkFetcher.properties]; + } else { + // Some unexpected status has occurred; handle it as we would a regular + // object fetcher failure. + [self invokeFinalCallbackWithData:data + error:error + shouldInvalidateLocation:NO]; + } + } else { + // The chunk has uploaded successfully. + int64_t newOffset = self.currentOffset + previousContentLength; +#if DEBUG + // Verify that if we think all of the uploading data has been sent, the server responded with + // the "final" upload status. + BOOL hasUploadAllData = (newOffset == [self fullUploadLength]); + BOOL isFinalStatus = (uploadStatus == kStatusFinal); + #pragma unused(hasUploadAllData,isFinalStatus) + GTMSESSION_ASSERT_DEBUG(hasUploadAllData == isFinalStatus || !hasKnownChunkSize, + @"uploadStatus:%@ newOffset:%zd (%lld + %zd) fullUploadLength:%lld" + @" chunkFetcher:%@ requestHeaders:%@ responseHeaders:%@", + [responseHeaders objectForKey:kGTMSessionHeaderXGoogUploadStatus], + newOffset, self.currentOffset, previousContentLength, + [self fullUploadLength], + chunkFetcher, chunkFetcher.mutableRequest.allHTTPHeaderFields, + responseHeaders); +#endif + if (isUploadStatusStopped) { + // This was the last chunk. + if (error == nil && uploadStatus == kStatusCancelled) { + // Report cancelled status as an error. + NSDictionary *userInfo = nil; + if (data.length > 0) { + userInfo = @{ kGTMSessionFetcherStatusDataKey : data }; + } + data = nil; + error = [self prematureFailureErrorWithUserInfo:userInfo]; + } else { + // The upload is in final status. + // + // Take the chunk fetcher's data as the superclass data. + self.downloadedData = data; + self.statusCode = chunkFetcher.statusCode; + } + + // we're done + [self invokeFinalCallbackWithData:data + error:error + shouldInvalidateLocation:YES]; + } else { + // Start the next chunk. + self.currentOffset = newOffset; + + // We want to destroy this chunk fetcher before creating the next one, but + // we want to pass on its properties + NSDictionary *props = [chunkFetcher properties]; + + // We no longer need to be able to cancel this chunkFetcher. Destroy it + // before we create a new chunk fetcher. + [self destroyChunkFetcher]; + hasDestroyedOldChunkFetcher = YES; + + [self uploadNextChunkWithOffset:newOffset + fetcherProperties:props]; + } + } + if (!hasDestroyedOldChunkFetcher) { + [self destroyChunkFetcher]; + } +} + +- (void)destroyChunkFetcher { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + if (_fetcherInFlight == _chunkFetcher) { + _fetcherInFlight = nil; + } + + [_chunkFetcher stopFetching]; + + NSURL *chunkFileURL = _chunkFetcher.bodyFileURL; + BOOL wasTemporaryUploadFile = ![chunkFileURL isEqual:_uploadFileURL]; + if (wasTemporaryUploadFile) { + NSError *error; + [[NSFileManager defaultManager] removeItemAtURL:chunkFileURL + error:&error]; + if (error) { + GTMSESSION_LOG_DEBUG(@"removingItemAtURL failed: %@\n%@", error, chunkFileURL); + } + } + + _recentChunkReponseHeaders = _chunkFetcher.responseHeaders; + + // To avoid retain cycles, remove all properties except the parent identifier. + _chunkFetcher.properties = + @{ kGTMSessionUploadFetcherChunkParentKey : [NSValue valueWithNonretainedObject:self] }; + + _chunkFetcher.retryBlock = nil; + _chunkFetcher.sendProgressBlock = nil; + _chunkFetcher = nil; + } // @synchronized(self) +} + +// This method calculates the proper values to pass to the client's send progress block. +// +// The actual total bytes sent include the initial body sent, plus the +// offset into the batched data prior to the current chunk fetcher + +- (void)invokeDelegateWithDidSendBytes:(int64_t)bytesSent + totalBytesSent:(int64_t)totalBytesSent + totalBytesExpectedToSend:(int64_t)totalBytesExpected { + GTMSessionCheckNotSynchronized(self); + + // Ensure the chunk fetcher survives the callback in case the user pauses the upload process. + __block GTMSessionFetcher *holdFetcher = self.chunkFetcher; + + [self invokeOnCallbackQueue:self.delegateCallbackQueue + afterUserStopped:NO + block:^{ + GTMSessionFetcherSendProgressBlock sendProgressBlock = self.sendProgressBlock; + if (sendProgressBlock) { + sendProgressBlock(bytesSent, totalBytesSent, totalBytesExpected); + } + holdFetcher = nil; + }]; +} + +- (void)retrieveUploadChunkGranularityFromResponseHeaders:(NSDictionary *)responseHeaders { + GTMSessionCheckNotSynchronized(self); + + // Standard granularity for Google uploads is 256K. + NSString *chunkGranularityHeader = + [responseHeaders objectForKey:@"X-Goog-Upload-Chunk-Granularity"]; + self.uploadGranularity = chunkGranularityHeader.longLongValue; +} + +#pragma mark - + +- (BOOL)isPaused { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + return _isPaused; + } // @synchronized(self) +} + +- (void)pauseFetching { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + _isPaused = YES; + } // @synchronized(self) + + // Pausing just means stopping the current chunk from uploading; + // when we resume, we will send a query request to the server to + // figure out what bytes to resume sending. + // + // We won't try to cancel the initial data upload, but rather will check + // for being paused in beginChunkFetches. + [self destroyChunkFetcher]; +} + +- (void)resumeFetching { + BOOL wasPaused; + + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + wasPaused = _isPaused; + _isPaused = NO; + } // @synchronized(self) + + if (wasPaused) { + [self sendQueryForUploadOffsetWithFetcherProperties:self.properties]; + } +} + +- (void)stopFetching { + // Overrides the superclass + [self destroyChunkFetcher]; + + // If we think the server is waiting for more data, then tell it there won't be more. + if (self.uploadLocationURL) { + [self sendCancelUploadWithFetcherProperties:[self properties]]; + self.uploadLocationURL = nil; + } + + [super stopFetching]; +} + +#pragma mark - + +// Public properties. +@synthesize uploadData = _uploadData, + uploadFileURL = _uploadFileURL, + uploadFileHandle = _uploadFileHandle, + uploadMIMEType = _uploadMIMEType, + uploadLocationURL = _uploadLocationURL, + chunkSize = _chunkSize, + currentOffset = _currentOffset, + delegateCallbackQueue = _delegateCallbackQueue, + delegateCompletionHandler = _delegateCompletionHandler, + chunkFetcher = _chunkFetcher, + lastChunkRequest = _lastChunkRequest, + subdataGenerating = _subdataGenerating, + shouldInitiateOffsetQuery = _shouldInitiateOffsetQuery, + uploadGranularity = _uploadGranularity; + +// Internal properties. +@dynamic fetcherInFlight; +@dynamic activeFetcher; +@dynamic responseHeaders; +@dynamic statusCode; + ++ (void)removePointer:(void *)pointer fromPointerArray:(NSPointerArray *)pointerArray { + for (NSUInteger index = 0; index < pointerArray.count; ++index) { + void *pointerAtIndex = [pointerArray pointerAtIndex:index]; + if (pointerAtIndex == pointer) { + [pointerArray removePointerAtIndex:index]; + return; + } + } +} + +- (BOOL)useBackgroundSession { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + return _useBackgroundSessionOnChunkFetchers; + } // @synchronized(self +} + +- (void)setUseBackgroundSession:(BOOL)useBackgroundSession { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + if (_useBackgroundSessionOnChunkFetchers != useBackgroundSession) { + _useBackgroundSessionOnChunkFetchers = useBackgroundSession; + NSPointerArray *uploadFetcherPointerArrayForBackgroundSessions = + [[self class] uploadFetcherPointerArrayForBackgroundSessions]; + if (_useBackgroundSessionOnChunkFetchers) { + [uploadFetcherPointerArrayForBackgroundSessions addPointer:(__bridge void *)self]; + } else { + [[self class] removePointer:(__bridge void *)self + fromPointerArray:uploadFetcherPointerArrayForBackgroundSessions]; + } + } + } // @synchronized(self +} + +- (BOOL)canFetchWithBackgroundSession { + // The initial upload fetcher is always a foreground session; the + // useBackgroundSession property will apply only to chunk fetchers, + // not to queries. + return NO; +} + +- (NSDictionary *)responseHeaders { + GTMSessionCheckNotSynchronized(self); + // Overrides the superclass + + // If asked for the fetcher's response, use the most recent chunk fetcher's response, + // since the original request's response lacks useful information like the actual + // Content-Type. + NSDictionary *dict = self.chunkFetcher.responseHeaders; + if (dict) { + return dict; + } + + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + if (_recentChunkReponseHeaders) { + return _recentChunkReponseHeaders; + } + } // @synchronized(self + + // No chunk fetcher yet completed, so return whatever we have from the initial fetch. + return [super responseHeaders]; +} + +- (NSInteger)statusCodeUnsynchronized { + GTMSessionCheckSynchronized(self); + + if (_recentChunkStatusCode != -1) { + // Overrides the superclass to indicate status appropriate to the initial + // or latest chunk fetch + return _recentChunkStatusCode; + } else { + return [super statusCodeUnsynchronized]; + } +} + + +- (void)setStatusCode:(NSInteger)val { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + _recentChunkStatusCode = val; + } +} + +- (int64_t)initialBodyLength { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + return _initialBodyLength; + } +} + +- (void)setInitialBodyLength:(int64_t)length { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + _initialBodyLength = length; + } +} + +- (int64_t)initialBodySent { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + return _initialBodySent; + } +} + +- (void)setInitialBodySent:(int64_t)length { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + _initialBodySent = length; + } +} + +- (NSURL *)uploadLocationURL { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + return _uploadLocationURL; + } +} + +- (void)setUploadLocationURL:(NSURL *)locationURL { + @synchronized(self) { + GTMSessionMonitorSynchronized(self); + + _uploadLocationURL = locationURL; + } +} + +- (GTMSessionFetcher *)activeFetcher { + GTMSessionFetcher *result = self.fetcherInFlight; + if (result) return result; + + return self; +} + +- (BOOL)waitForCompletionWithTimeout:(NSTimeInterval)timeoutInSeconds { + NSDate *timeoutDate = [NSDate dateWithTimeIntervalSinceNow:timeoutInSeconds]; + + while (self.fetcherInFlight || self.subdataGenerating) { + if ([timeoutDate timeIntervalSinceNow] < 0) return NO; + + if (self.subdataGenerating) { + // Allow time for subdata generation. + NSDate *stopDate = [NSDate dateWithTimeIntervalSinceNow:0.001]; + [[NSRunLoop currentRunLoop] runUntilDate:stopDate]; + } else { + // Wait for any chunk or query fetchers that still have pending callbacks or + // notifications. + BOOL timedOut; + + if (self.fetcherInFlight == self) { + timedOut = ![super waitForCompletionWithTimeout:timeoutInSeconds]; + } else { + timedOut = ![self.fetcherInFlight waitForCompletionWithTimeout:timeoutInSeconds]; + } + if (timedOut) return NO; + } + } + return YES; +} + +@end + +@implementation GTMSessionFetcher (GTMSessionUploadFetcherMethods) + +- (GTMSessionUploadFetcher *)parentUploadFetcher { + NSValue *property = [self propertyForKey:kGTMSessionUploadFetcherChunkParentKey]; + if (!property) return nil; + + GTMSessionUploadFetcher *uploadFetcher = property.nonretainedObjectValue; + + GTMSESSION_ASSERT_DEBUG([uploadFetcher isKindOfClass:[GTMSessionUploadFetcher class]], + @"Unexpected parent upload fetcher class: %@", [uploadFetcher class]); + return uploadFetcher; +} + +@end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Objects/GTLRuntimeCommon.m b/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Objects/GTLRuntimeCommon.m deleted file mode 100644 index 5efaa74a3..000000000 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Objects/GTLRuntimeCommon.m +++ /dev/null @@ -1,1187 +0,0 @@ -/* Copyright (c) 2011 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 -#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; - if (obj) { - 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 = [[NSMutableDictionary alloc] init]; - } - - 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 !defined(__LP64__) || !__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 *selName = sel_getName(sel); - const char *baseName = selName; - 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 *propAttrs = property_getAttributes(*prop); - const char *dynamicMarker = strstr(propAttrs, ",D"); - if (!dynamicMarker || - (dynamicMarker[2] != 0 && dynamicMarker[2] != ',' )) { - // It isn't dynamic, skip it. - continue; - } - - if (!isSetter) { - // See if this property has an explicit getter=. (the attributes always start with a T, - // so we can check for the leading ','. - const char *getterMarker = strstr(propAttrs, ",G"); - if (getterMarker) { - const char *getterStart = getterMarker + 2; - const char *getterEnd = getterStart; - while ((*getterEnd != 0) && (*getterEnd != ',')) { - ++getterEnd; - } - size_t getterLen = (size_t)(getterEnd - getterStart); - if ((strncmp(selName, getterStart, getterLen) == 0) - && (selName[getterLen] == 0)) { - // return the actual property - foundProp = *prop; - // if requested, return the class containing the property - if (outFoundClass) *outFoundClass = currClass; - break; - } - } // if (getterMarker) - } // if (!isSetter) - - // Search for an exact-name match (a getter), but case-insensitive on the - // first character (in case baseName comes from a setter) - const char *propName = property_getName(*prop); - size_t propNameLen = strlen(propName); - if (baseNameLen == propNameLen - && strncasecmp(baseName, propName, 1) == 0 - && (baseNameLen <= 1 - || strncmp(baseName + 1, propName + 1, baseNameLen - 1) == 0)) { - // return the actual property - foundProp = *prop; - - // if requested, return the class containing the property - if (outFoundClass) *outFoundClass = currClass; - break; - } - } // for (prop in properties) - 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 - // TB,D -- BOOL comes as bool on 64bit iOS - // Tc,D -- BOOL comes as char otherwise - // T@"NSString",D - // T@"GTLLink",D - // T@"NSArray",D - - - static GTLDynamicImpInfo kImplInfo[] = { -#if !defined(__LP64__) || !__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 - }, -// This conditional matches the one in iPhoneOS.platform version of -// that controls the definition of BOOL. -#if !defined(OBJC_HIDE_64) && TARGET_OS_IPHONE && (defined(__LP64__) && __LP64__) - { // BOOL as bool - "TB", - "v@:B", (IMP)DynamicBooleanSetter, - "B@:", (IMP)DynamicBooleanGetter, - nil, nil, - NO - }, -#else - { // BOOL as char - "Tc", - "v@:c", (IMP)DynamicBooleanSetter, - "c@:", (IMP)DynamicBooleanGetter, - nil, nil, - NO - }, -#endif - { // 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/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLQueryYouTube.m b/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLQueryYouTube.m deleted file mode 100644 index 990a7639a..000000000 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLQueryYouTube.m +++ /dev/null @@ -1,618 +0,0 @@ -/* Copyright (c) 2014 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 Data API (youtube/v3) -// Description: -// Programmatic access to YouTube features. -// Documentation: -// https://developers.google.com/youtube/v3 -// Classes: -// GTLQueryYouTube (45 custom class methods, 54 custom properties) - -#import "GTLQueryYouTube.h" - -#import "GTLYouTubeActivity.h" -#import "GTLYouTubeActivityListResponse.h" -#import "GTLYouTubeChannel.h" -#import "GTLYouTubeChannelBannerResource.h" -#import "GTLYouTubeChannelListResponse.h" -#import "GTLYouTubeChannelSection.h" -#import "GTLYouTubeChannelSectionListResponse.h" -#import "GTLYouTubeGuideCategoryListResponse.h" -#import "GTLYouTubeI18nLanguageListResponse.h" -#import "GTLYouTubeI18nRegionListResponse.h" -#import "GTLYouTubeInvideoBranding.h" -#import "GTLYouTubeLiveBroadcast.h" -#import "GTLYouTubeLiveBroadcastListResponse.h" -#import "GTLYouTubeLiveStream.h" -#import "GTLYouTubeLiveStreamListResponse.h" -#import "GTLYouTubePlaylist.h" -#import "GTLYouTubePlaylistItem.h" -#import "GTLYouTubePlaylistItemListResponse.h" -#import "GTLYouTubePlaylistListResponse.h" -#import "GTLYouTubeSearchListResponse.h" -#import "GTLYouTubeSubscription.h" -#import "GTLYouTubeSubscriptionListResponse.h" -#import "GTLYouTubeThumbnailSetResponse.h" -#import "GTLYouTubeVideo.h" -#import "GTLYouTubeVideoCategoryListResponse.h" -#import "GTLYouTubeVideoGetRatingResponse.h" -#import "GTLYouTubeVideoListResponse.h" - -@implementation GTLQueryYouTube - -@dynamic autoLevels, broadcastStatus, categoryId, channelId, channelType, chart, - displaySlate, eventType, fields, forChannelId, forContentOwner, - forMine, forUsername, hl, home, identifier, locale, location, - locationRadius, managedByMe, maxResults, mine, myRating, mySubscribers, - notifySubscribers, offsetTimeMs, onBehalfOfContentOwner, - onBehalfOfContentOwnerChannel, order, pageToken, part, playlistId, - publishedAfter, publishedBefore, q, rating, regionCode, - relatedToVideoId, safeSearch, stabilize, streamId, topicId, type, - videoCaption, videoCategoryId, videoDefinition, videoDimension, - videoDuration, videoEmbeddable, videoId, videoLicense, videoSyndicated, - videoType, walltime; - -+ (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 "channelBanners" methods -// These create a GTLQueryYouTube object. - -+ (id)queryForChannelBannersInsertWithObject:(GTLYouTubeChannelBannerResource *)object - uploadParameters:(GTLUploadParameters *)uploadParametersOrNil { - if (object == nil) { - GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); - return nil; - } - NSString *methodName = @"youtube.channelBanners.insert"; - GTLQueryYouTube *query = [self queryWithMethodName:methodName]; - query.bodyObject = object; - query.uploadParameters = uploadParametersOrNil; - query.expectedObjectClass = [GTLYouTubeChannelBannerResource class]; - return query; -} - -#pragma mark - -#pragma mark "channelSections" methods -// These create a GTLQueryYouTube object. - -+ (id)queryForChannelSectionsDeleteWithIdentifier:(NSString *)identifier { - NSString *methodName = @"youtube.channelSections.delete"; - GTLQueryYouTube *query = [self queryWithMethodName:methodName]; - query.identifier = identifier; - return query; -} - -+ (id)queryForChannelSectionsInsertWithObject:(GTLYouTubeChannelSection *)object - part:(NSString *)part { - if (object == nil) { - GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); - return nil; - } - NSString *methodName = @"youtube.channelSections.insert"; - GTLQueryYouTube *query = [self queryWithMethodName:methodName]; - query.bodyObject = object; - query.part = part; - query.expectedObjectClass = [GTLYouTubeChannelSection class]; - return query; -} - -+ (id)queryForChannelSectionsListWithPart:(NSString *)part { - NSString *methodName = @"youtube.channelSections.list"; - GTLQueryYouTube *query = [self queryWithMethodName:methodName]; - query.part = part; - query.expectedObjectClass = [GTLYouTubeChannelSectionListResponse class]; - return query; -} - -+ (id)queryForChannelSectionsUpdateWithObject:(GTLYouTubeChannelSection *)object - part:(NSString *)part { - if (object == nil) { - GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); - return nil; - } - NSString *methodName = @"youtube.channelSections.update"; - GTLQueryYouTube *query = [self queryWithMethodName:methodName]; - query.bodyObject = object; - query.part = part; - query.expectedObjectClass = [GTLYouTubeChannelSection 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; -} - -+ (id)queryForChannelsUpdateWithObject:(GTLYouTubeChannel *)object - part:(NSString *)part { - if (object == nil) { - GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); - return nil; - } - NSString *methodName = @"youtube.channels.update"; - GTLQueryYouTube *query = [self queryWithMethodName:methodName]; - query.bodyObject = object; - query.part = part; - query.expectedObjectClass = [GTLYouTubeChannel 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 "i18nLanguages" methods -// These create a GTLQueryYouTube object. - -+ (id)queryForI18nLanguagesListWithPart:(NSString *)part { - NSString *methodName = @"youtube.i18nLanguages.list"; - GTLQueryYouTube *query = [self queryWithMethodName:methodName]; - query.part = part; - query.expectedObjectClass = [GTLYouTubeI18nLanguageListResponse class]; - return query; -} - -#pragma mark - -#pragma mark "i18nRegions" methods -// These create a GTLQueryYouTube object. - -+ (id)queryForI18nRegionsListWithPart:(NSString *)part { - NSString *methodName = @"youtube.i18nRegions.list"; - GTLQueryYouTube *query = [self queryWithMethodName:methodName]; - query.part = part; - query.expectedObjectClass = [GTLYouTubeI18nRegionListResponse class]; - return query; -} - -#pragma mark - -#pragma mark "liveBroadcasts" methods -// These create a GTLQueryYouTube object. - -+ (id)queryForLiveBroadcastsBindWithIdentifier:(NSString *)identifier - part:(NSString *)part { - NSString *methodName = @"youtube.liveBroadcasts.bind"; - GTLQueryYouTube *query = [self queryWithMethodName:methodName]; - query.identifier = identifier; - query.part = part; - query.expectedObjectClass = [GTLYouTubeLiveBroadcast class]; - return query; -} - -+ (id)queryForLiveBroadcastsControlWithIdentifier:(NSString *)identifier - part:(NSString *)part { - NSString *methodName = @"youtube.liveBroadcasts.control"; - GTLQueryYouTube *query = [self queryWithMethodName:methodName]; - query.identifier = identifier; - query.part = part; - query.expectedObjectClass = [GTLYouTubeLiveBroadcast class]; - return query; -} - -+ (id)queryForLiveBroadcastsDeleteWithIdentifier:(NSString *)identifier { - NSString *methodName = @"youtube.liveBroadcasts.delete"; - GTLQueryYouTube *query = [self queryWithMethodName:methodName]; - query.identifier = identifier; - return query; -} - -+ (id)queryForLiveBroadcastsInsertWithObject:(GTLYouTubeLiveBroadcast *)object - part:(NSString *)part { - if (object == nil) { - GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); - return nil; - } - NSString *methodName = @"youtube.liveBroadcasts.insert"; - GTLQueryYouTube *query = [self queryWithMethodName:methodName]; - query.bodyObject = object; - query.part = part; - query.expectedObjectClass = [GTLYouTubeLiveBroadcast class]; - return query; -} - -+ (id)queryForLiveBroadcastsListWithPart:(NSString *)part { - NSString *methodName = @"youtube.liveBroadcasts.list"; - GTLQueryYouTube *query = [self queryWithMethodName:methodName]; - query.part = part; - query.expectedObjectClass = [GTLYouTubeLiveBroadcastListResponse class]; - return query; -} - -+ (id)queryForLiveBroadcastsTransitionWithBroadcastStatus:(NSString *)broadcastStatus - identifier:(NSString *)identifier - part:(NSString *)part { - NSString *methodName = @"youtube.liveBroadcasts.transition"; - GTLQueryYouTube *query = [self queryWithMethodName:methodName]; - query.broadcastStatus = broadcastStatus; - query.identifier = identifier; - query.part = part; - query.expectedObjectClass = [GTLYouTubeLiveBroadcast class]; - return query; -} - -+ (id)queryForLiveBroadcastsUpdateWithObject:(GTLYouTubeLiveBroadcast *)object - part:(NSString *)part { - if (object == nil) { - GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); - return nil; - } - NSString *methodName = @"youtube.liveBroadcasts.update"; - GTLQueryYouTube *query = [self queryWithMethodName:methodName]; - query.bodyObject = object; - query.part = part; - query.expectedObjectClass = [GTLYouTubeLiveBroadcast class]; - return query; -} - -#pragma mark - -#pragma mark "liveStreams" methods -// These create a GTLQueryYouTube object. - -+ (id)queryForLiveStreamsDeleteWithIdentifier:(NSString *)identifier { - NSString *methodName = @"youtube.liveStreams.delete"; - GTLQueryYouTube *query = [self queryWithMethodName:methodName]; - query.identifier = identifier; - return query; -} - -+ (id)queryForLiveStreamsInsertWithObject:(GTLYouTubeLiveStream *)object - part:(NSString *)part { - if (object == nil) { - GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); - return nil; - } - NSString *methodName = @"youtube.liveStreams.insert"; - GTLQueryYouTube *query = [self queryWithMethodName:methodName]; - query.bodyObject = object; - query.part = part; - query.expectedObjectClass = [GTLYouTubeLiveStream class]; - return query; -} - -+ (id)queryForLiveStreamsListWithPart:(NSString *)part { - NSString *methodName = @"youtube.liveStreams.list"; - GTLQueryYouTube *query = [self queryWithMethodName:methodName]; - query.part = part; - query.expectedObjectClass = [GTLYouTubeLiveStreamListResponse class]; - return query; -} - -+ (id)queryForLiveStreamsUpdateWithObject:(GTLYouTubeLiveStream *)object - part:(NSString *)part { - if (object == nil) { - GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); - return nil; - } - NSString *methodName = @"youtube.liveStreams.update"; - GTLQueryYouTube *query = [self queryWithMethodName:methodName]; - query.bodyObject = object; - query.part = part; - query.expectedObjectClass = [GTLYouTubeLiveStream 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 "thumbnails" methods -// These create a GTLQueryYouTube object. - -+ (id)queryForThumbnailsSetWithVideoId:(NSString *)videoId - uploadParameters:(GTLUploadParameters *)uploadParametersOrNil { - NSString *methodName = @"youtube.thumbnails.set"; - GTLQueryYouTube *query = [self queryWithMethodName:methodName]; - query.videoId = videoId; - query.uploadParameters = uploadParametersOrNil; - query.expectedObjectClass = [GTLYouTubeThumbnailSetResponse 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)queryForVideosGetRatingWithIdentifier:(NSString *)identifier { - NSString *methodName = @"youtube.videos.getRating"; - GTLQueryYouTube *query = [self queryWithMethodName:methodName]; - query.identifier = identifier; - query.expectedObjectClass = [GTLYouTubeVideoGetRatingResponse class]; - 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)queryForVideosListWithPart:(NSString *)part { - NSString *methodName = @"youtube.videos.list"; - GTLQueryYouTube *query = [self queryWithMethodName:methodName]; - query.part = part; - query.expectedObjectClass = [GTLYouTubeVideoListResponse class]; - return query; -} - -+ (id)queryForVideosRateWithIdentifier:(NSString *)identifier - rating:(NSString *)rating { - NSString *methodName = @"youtube.videos.rate"; - GTLQueryYouTube *query = [self queryWithMethodName:methodName]; - query.identifier = identifier; - query.rating = rating; - 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; -} - -#pragma mark - -#pragma mark "watermarks" methods -// These create a GTLQueryYouTube object. - -+ (id)queryForWatermarksSetWithObject:(GTLYouTubeInvideoBranding *)object - channelId:(NSString *)channelId - uploadParameters:(GTLUploadParameters *)uploadParametersOrNil { - if (object == nil) { - GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); - return nil; - } - NSString *methodName = @"youtube.watermarks.set"; - GTLQueryYouTube *query = [self queryWithMethodName:methodName]; - query.bodyObject = object; - query.channelId = channelId; - query.uploadParameters = uploadParametersOrNil; - return query; -} - -+ (id)queryForWatermarksUnsetWithChannelId:(NSString *)channelId { - NSString *methodName = @"youtube.watermarks.unset"; - GTLQueryYouTube *query = [self queryWithMethodName:methodName]; - query.channelId = channelId; - return query; -} - -@end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLServiceYouTube.m b/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLServiceYouTube.m deleted file mode 100644 index be6f95b7d..000000000 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLServiceYouTube.m +++ /dev/null @@ -1,185 +0,0 @@ -/* Copyright (c) 2014 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 Data API (youtube/v3) -// Description: -// Programmatic access to YouTube features. -// Documentation: -// https://developers.google.com/youtube/v3 -// 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], - [GTLYouTubeAccessPolicy class], - [GTLYouTubeActivity class], - [GTLYouTubeActivityContentDetails class], - [GTLYouTubeActivityContentDetailsBulletin class], - [GTLYouTubeActivityContentDetailsChannelItem class], - [GTLYouTubeActivityContentDetailsComment class], - [GTLYouTubeActivityContentDetailsFavorite class], - [GTLYouTubeActivityContentDetailsLike class], - [GTLYouTubeActivityContentDetailsPlaylistItem class], - [GTLYouTubeActivityContentDetailsPromotedItem class], - [GTLYouTubeActivityContentDetailsRecommendation class], - [GTLYouTubeActivityContentDetailsSocial class], - [GTLYouTubeActivityContentDetailsSubscription class], - [GTLYouTubeActivityContentDetailsUpload class], - [GTLYouTubeActivityListResponse class], - [GTLYouTubeActivitySnippet class], - [GTLYouTubeCdnSettings class], - [GTLYouTubeChannel class], - [GTLYouTubeChannelAuditDetails class], - [GTLYouTubeChannelBannerResource class], - [GTLYouTubeChannelBrandingSettings class], - [GTLYouTubeChannelContentDetails class], - [GTLYouTubeChannelContentOwnerDetails class], - [GTLYouTubeChannelConversionPing class], - [GTLYouTubeChannelConversionPings class], - [GTLYouTubeChannelListResponse class], - [GTLYouTubeChannelLocalization class], - [GTLYouTubeChannelSection class], - [GTLYouTubeChannelSectionContentDetails class], - [GTLYouTubeChannelSectionListResponse class], - [GTLYouTubeChannelSectionSnippet class], - [GTLYouTubeChannelSettings class], - [GTLYouTubeChannelSnippet class], - [GTLYouTubeChannelStatistics class], - [GTLYouTubeChannelStatus class], - [GTLYouTubeChannelTopicDetails class], - [GTLYouTubeContentRating class], - [GTLYouTubeGeoPoint class], - [GTLYouTubeGuideCategory class], - [GTLYouTubeGuideCategoryListResponse class], - [GTLYouTubeGuideCategorySnippet class], - [GTLYouTubeI18nLanguage class], - [GTLYouTubeI18nLanguageListResponse class], - [GTLYouTubeI18nLanguageSnippet class], - [GTLYouTubeI18nRegion class], - [GTLYouTubeI18nRegionListResponse class], - [GTLYouTubeI18nRegionSnippet class], - [GTLYouTubeImageSettings class], - [GTLYouTubeIngestionInfo class], - [GTLYouTubeInvideoBranding class], - [GTLYouTubeInvideoPosition class], - [GTLYouTubeInvideoPromotion class], - [GTLYouTubeInvideoTiming class], - [GTLYouTubeLanguageTag class], - [GTLYouTubeLiveBroadcast class], - [GTLYouTubeLiveBroadcastContentDetails class], - [GTLYouTubeLiveBroadcastListResponse class], - [GTLYouTubeLiveBroadcastSnippet class], - [GTLYouTubeLiveBroadcastStatus class], - [GTLYouTubeLiveStream class], - [GTLYouTubeLiveStreamContentDetails class], - [GTLYouTubeLiveStreamListResponse class], - [GTLYouTubeLiveStreamSnippet class], - [GTLYouTubeLiveStreamStatus class], - [GTLYouTubeLocalizedProperty class], - [GTLYouTubeLocalizedString class], - [GTLYouTubeMonitorStreamInfo class], - [GTLYouTubePageInfo class], - [GTLYouTubePlaylist class], - [GTLYouTubePlaylistContentDetails class], - [GTLYouTubePlaylistItem class], - [GTLYouTubePlaylistItemContentDetails class], - [GTLYouTubePlaylistItemListResponse class], - [GTLYouTubePlaylistItemSnippet class], - [GTLYouTubePlaylistItemStatus class], - [GTLYouTubePlaylistListResponse class], - [GTLYouTubePlaylistPlayer class], - [GTLYouTubePlaylistSnippet class], - [GTLYouTubePlaylistStatus class], - [GTLYouTubePromotedItem class], - [GTLYouTubePromotedItemId class], - [GTLYouTubePropertyValue class], - [GTLYouTubeResourceId class], - [GTLYouTubeSearchListResponse class], - [GTLYouTubeSearchResult class], - [GTLYouTubeSearchResultSnippet class], - [GTLYouTubeSubscription class], - [GTLYouTubeSubscriptionContentDetails class], - [GTLYouTubeSubscriptionListResponse class], - [GTLYouTubeSubscriptionSnippet class], - [GTLYouTubeSubscriptionSubscriberSnippet class], - [GTLYouTubeThumbnail class], - [GTLYouTubeThumbnailDetails class], - [GTLYouTubeThumbnailSetResponse class], - [GTLYouTubeTokenPagination class], - [GTLYouTubeVideo class], - [GTLYouTubeVideoAgeGating class], - [GTLYouTubeVideoCategory class], - [GTLYouTubeVideoCategoryListResponse class], - [GTLYouTubeVideoCategorySnippet class], - [GTLYouTubeVideoContentDetails class], - [GTLYouTubeVideoContentDetailsRegionRestriction class], - [GTLYouTubeVideoConversionPing class], - [GTLYouTubeVideoConversionPings class], - [GTLYouTubeVideoFileDetails class], - [GTLYouTubeVideoFileDetailsAudioStream class], - [GTLYouTubeVideoFileDetailsVideoStream class], - [GTLYouTubeVideoGetRatingResponse class], - [GTLYouTubeVideoListResponse class], - [GTLYouTubeVideoLiveStreamingDetails class], - [GTLYouTubeVideoMonetizationDetails class], - [GTLYouTubeVideoPlayer class], - [GTLYouTubeVideoProcessingDetails class], - [GTLYouTubeVideoProcessingDetailsProcessingProgress class], - [GTLYouTubeVideoProjectDetails class], - [GTLYouTubeVideoRating class], - [GTLYouTubeVideoRecordingDetails class], - [GTLYouTubeVideoSnippet class], - [GTLYouTubeVideoStatistics class], - [GTLYouTubeVideoStatus class], - [GTLYouTubeVideoSuggestions class], - [GTLYouTubeVideoSuggestionsTagSuggestion class], - [GTLYouTubeVideoTopicDetails class], - [GTLYouTubeWatchSettings 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/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeContentRating.h b/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeContentRating.h deleted file mode 100644 index 7bc7fff31..000000000 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeContentRating.h +++ /dev/null @@ -1,249 +0,0 @@ -/* Copyright (c) 2014 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// -// GTLYouTubeContentRating.h -// - -// ---------------------------------------------------------------------------- -// NOTE: This file is generated from Google APIs Discovery Service. -// Service: -// YouTube Data API (youtube/v3) -// Description: -// Programmatic access to YouTube features. -// Documentation: -// https://developers.google.com/youtube/v3 -// Classes: -// GTLYouTubeContentRating (0 custom class methods, 64 custom properties) - -#if GTL_BUILT_AS_FRAMEWORK - #import "GTL/GTLObject.h" -#else - #import "GTLObject.h" -#endif - -// ---------------------------------------------------------------------------- -// -// GTLYouTubeContentRating -// - -// Ratings schemes. The country-specific ratings are mostly for movies and -// shows. NEXT_ID: 65 - -@interface GTLYouTubeContentRating : GTLObject - -// Rating system in Australia - Australian Classification Board -@property (copy) NSString *acbRating; - -// Rating system for Italy - Autorit� per le Garanzie nelle Comunicazioni -@property (copy) NSString *agcomRating; - -// Rating system for Chile - Asociaci�n Nacional de Televisi�n -@property (copy) NSString *anatelRating; - -// British Board of Film Classification -@property (copy) NSString *bbfcRating; - -// Rating system for Thailand - Board of Filmand Video Censors -@property (copy) NSString *bfvcRating; - -// Rating system for Austria - Bundesministeriums f�r Unterricht, Kunst und -// Kultur! -@property (copy) NSString *bmukkRating; - -// Rating system for French Canadian TV - Regie du cinema -@property (copy) NSString *catvfrRating; - -// Rating system for Canadian TV - Canadian TV Classification System -@property (copy) NSString *catvRating; - -// Rating system in India - Central Board of Film Certification -@property (copy) NSString *cbfcRating; - -// Rating system for Chile - Consejo de Calificaci�n Cinematogr�fica -@property (copy) NSString *cccRating; - -// Rating system for Portugal - Comiss�o de Classifica��o de Espect�culos -@property (copy) NSString *cceRating; - -// Rating system for Switzerland - Switzerland Rating System -@property (copy) NSString *chfilmRating; - -// Canadian Home Video Rating System -@property (copy) NSString *chvrsRating; - -// Rating system for Belgium - Belgium Rating System -@property (copy) NSString *cicfRating; - -// Rating system for Romania - CONSILIUL NATIONAL AL AUDIOVIZUALULUI - CNA -@property (copy) NSString *cnaRating; - -// Rating system for France - Conseil sup�rieur de l?audiovisuel -@property (copy) NSString *csaRating; - -// Rating system for Luxembourg - Commission de surveillance de la -// classification des films -@property (copy) NSString *cscfRating; - -// Rating system for Czech republic - Czech republic Rating System -@property (copy) NSString *czfilmRating; - -// Rating system in Brazil - Department of Justice, Rating, Titles and -// Qualification -@property (copy) NSString *djctqRating; - -@property (retain) NSArray *djctqRatingReasons; // of NSString - -// Rating system for Estonia - Estonia Rating System -@property (copy) NSString *eefilmRating; - -// Rating system for Egypt - Egypt Rating System -@property (copy) NSString *egfilmRating; - -// Rating system in Japan - Eiga Rinri Kanri Iinkai -@property (copy) NSString *eirinRating; - -// Rating system for Malaysia - Film Censorship Board of Malaysia -@property (copy) NSString *fcbmRating; - -// Rating system for Hong kong - Office for Film, Newspaper and Article -// Administration -@property (copy) NSString *fcoRating; - -// Rating system in France - French Minister of Culture -@property (copy) NSString *fmocRating; - -// Rating system for South africa - Film & Publication Board -@property (copy) NSString *fpbRating; - -// Rating system in Germany - Voluntary Self Regulation of the Movie Industry -@property (copy) NSString *fskRating; - -// Rating system for Greece - Greece Rating System -@property (copy) NSString *grfilmRating; - -// Rating system in Spain - Instituto de Cinematografia y de las Artes -// Audiovisuales -@property (copy) NSString *icaaRating; - -// Rating system in Ireland - Irish Film Classification Office -@property (copy) NSString *ifcoRating; - -// Rating system for Israel - Israel Rating System -@property (copy) NSString *ilfilmRating; - -// Rating system for Argentina - Instituto Nacional de Cine y Artes -// Audiovisuales -@property (copy) NSString *incaaRating; - -// Rating system for Kenya - Kenya Film Classification Board -@property (copy) NSString *kfcbRating; - -// Rating system for Netherlands - Nederlands Instituut voor de Classificatie -// van Audiovisuele Media -@property (copy) NSString *kijkwijzerRating; - -// Rating system in South Korea - Korea Media Rating Board -@property (copy) NSString *kmrbRating; - -// Rating system for Indonesia - Lembaga Sensor Film -@property (copy) NSString *lsfRating; - -// Rating system for Malta - Film Age-Classification Board -@property (copy) NSString *mccaaRating; - -// Rating system for Denmark - The Media Council for Children and Young People -@property (copy) NSString *mccypRating; - -// Rating system for Singapore - Media Development Authority -@property (copy) NSString *mdaRating; - -// Rating system for Norway - Medietilsynet -@property (copy) NSString *medietilsynetRating; - -// Rating system for Finland - Finnish Centre for Media Education and -// Audiovisual Media -@property (copy) NSString *mekuRating; - -// Rating system in Italy - Ministero dei Beni e delle Attivita Culturali e del -// Turismo -@property (copy) NSString *mibacRating; - -// Rating system for Colombia - MoC -@property (copy) NSString *mocRating; - -// Rating system for Taiwan - Ministry of Culture - Tawan -@property (copy) NSString *moctwRating; - -// Motion Picture Association of America rating for the content. -@property (copy) NSString *mpaaRating; - -// Rating system for Philippines - MOVIE AND TELEVISION REVIEW AND -// CLASSIFICATION BOARD -@property (copy) NSString *mtrcbRating; - -// Rating system for Poland - National Broadcasting Council -@property (copy) NSString *nbcplRating; - -// Rating system for Maldives - National Bureau of Classification -@property (copy) NSString *nbcRating; - -// Rating system for Bulgaria - National Film Centre -@property (copy) NSString *nfrcRating; - -// Rating system for Nigeria - National Film and Video Censors Board -@property (copy) NSString *nfvcbRating; - -// Rating system for Latvia - National Film Center of Latvia -@property (copy) NSString *nkclvRating; - -// Rating system in New Zealand - Office of Film and Literature Classification -@property (copy) NSString *oflcRating; - -// Rating system for Peru - Peru Rating System -@property (copy) NSString *pefilmRating; - -// Rating system for Hungary - Rating Committee of the National Office of Film -@property (copy) NSString *rcnofRating; - -// Rating system for Venezuela - SiBCI -@property (copy) NSString *resorteviolenciaRating; - -// Rating system in Mexico - General Directorate of Radio, Television and -// Cinematography -@property (copy) NSString *rtcRating; - -// Rating system for Ireland - Raidi� Teilif�s �ireann -@property (copy) NSString *rteRating; - -// Rating system in Russia -@property (copy) NSString *russiaRating; - -// Rating system for Slovakia - Slovakia Rating System -@property (copy) NSString *skfilmRating; - -// Rating system for Iceland - SMAIS -@property (copy) NSString *smaisRating; - -// Rating system for Sweden - Statens medier�d (National Media Council) -@property (copy) NSString *smsaRating; - -// TV Parental Guidelines rating of the content. -@property (copy) NSString *tvpgRating; - -// Internal YouTube rating. -@property (copy) NSString *ytRating; - -@end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeVideoConversionPing.h b/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeVideoConversionPing.h deleted file mode 100644 index 48aae1eff..000000000 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeVideoConversionPing.h +++ /dev/null @@ -1,56 +0,0 @@ -/* Copyright (c) 2013 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// -// GTLYouTubeVideoConversionPing.h -// - -// ---------------------------------------------------------------------------- -// NOTE: This file is generated from Google APIs Discovery Service. -// Service: -// YouTube Data API (youtube/v3) -// Description: -// Programmatic access to YouTube features. -// Documentation: -// https://developers.google.com/youtube/v3 -// Classes: -// GTLYouTubeVideoConversionPing (0 custom class methods, 2 custom properties) - -#if GTL_BUILT_AS_FRAMEWORK - #import "GTL/GTLObject.h" -#else - #import "GTLObject.h" -#endif - -// ---------------------------------------------------------------------------- -// -// GTLYouTubeVideoConversionPing -// - -@interface GTLYouTubeVideoConversionPing : GTLObject - -// Defines the context of the ping. -@property (copy) NSString *context; - -// The url (without the schema) that the app shall send the ping to. It's at -// caller's descretion to decide which schema to use (http vs https) Example of -// a returned url: //googleads.g.doubleclick.net/pagead/ -// viewthroughconversion/962985656/?data=path%3DtHe_path%3Btype%3D -// like%3Butuid%3DGISQtTNGYqaYl4sKxoVvKA%3Bytvid%3DUrIaJUvIQDg&labe=default The -// caller must append biscotti authentication (ms param in case of mobile, for -// example) to this ping. -@property (copy) NSString *conversionUrl; - -@end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Utilities/GTLJSONParser.m b/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Utilities/GTLJSONParser.m deleted file mode 100644 index bbbcc43ab..000000000 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Utilities/GTLJSONParser.m +++ /dev/null @@ -1,152 +0,0 @@ -/* Copyright (c) 2011 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// -// GTLJSONParser.m -// - -#import "GTLJSONParser.h" - -// We can assume NSJSONSerialization is present on Mac OS X 10.7 and iOS 5 -#if !defined(GTL_REQUIRES_NSJSONSERIALIZATION) -#if (!TARGET_OS_IPHONE && (MAC_OS_X_VERSION_MIN_REQUIRED >= 1070)) || \ - (TARGET_OS_IPHONE && (__IPHONE_OS_VERSION_MIN_REQUIRED >= 50000)) -#define GTL_REQUIRES_NSJSONSERIALIZATION 1 -#endif -#endif - -// If GTMNSJSONSerialization is available, it is used for parsing and -// formatting JSON -#if !GTL_REQUIRES_NSJSONSERIALIZATION -@interface GTMNSJSONSerialization : NSObject -+ (NSData *)dataWithJSONObject:(id)obj options:(NSUInteger)opt error:(NSError **)error; -+ (id)JSONObjectWithData:(NSData *)data options:(NSUInteger)opt error:(NSError **)error; -@end - -// As a fallback, SBJSON is used for parsing and formatting JSON -@interface GTLSBJSON -- (void)setHumanReadable:(BOOL)flag; -- (NSString*)stringWithObject:(id)value error:(NSError**)error; -- (id)objectWithString:(NSString*)jsonrep error:(NSError**)error; -@end -#endif // !GTL_REQUIRES_NSJSONSERIALIZATION - -@implementation GTLJSONParser - -#if DEBUG && !GTL_REQUIRES_NSJSONSERIALIZATION -// When compiling for iOS 4 compatibility, SBJSON must be available -+ (void)load { - Class writer = NSClassFromString(@"SBJsonWriter"); - Class parser = NSClassFromString(@"SBJsonParser"); - Class oldParser = NSClassFromString(@"SBJSON"); - GTL_ASSERT((oldParser != Nil) - || (writer != Nil && parser != Nil), - @"No parsing class found"); -} -#endif // DEBUG && !GTL_REQUIRES_NSJSONSERIALIZATION - -+ (NSString *)stringWithObject:(id)obj - humanReadable:(BOOL)humanReadable - error:(NSError **)error { - NSData *data = [self dataWithObject:obj - humanReadable:humanReadable - error:error]; - if (data) { - NSString *jsonStr = [[[NSString alloc] initWithData:data - encoding:NSUTF8StringEncoding] autorelease]; - return jsonStr; - } - return nil; -} - -+ (NSData *)dataWithObject:(id)obj - humanReadable:(BOOL)humanReadable - error:(NSError **)error { - if (obj == nil) return nil; - - const NSUInteger kOpts = humanReadable ? (1UL << 0) : 0; // NSJSONWritingPrettyPrinted - -#if GTL_REQUIRES_NSJSONSERIALIZATION - NSData *data = [NSJSONSerialization dataWithJSONObject:obj - options:kOpts - error:error]; - return data; -#else - Class serializer = NSClassFromString(@"NSJSONSerialization"); - if (serializer) { - NSData *data = [serializer dataWithJSONObject:obj - options:kOpts - error:error]; - return data; - } else { - Class jsonWriteClass = NSClassFromString(@"SBJsonWriter"); - if (!jsonWriteClass) { - jsonWriteClass = NSClassFromString(@"SBJSON"); - } - - if (error) *error = nil; - - GTLSBJSON *writer = [[[jsonWriteClass alloc] init] autorelease]; - [writer setHumanReadable:humanReadable]; - NSString *jsonStr = [writer stringWithObject:obj - error:error]; - NSData *data = [jsonStr dataUsingEncoding:NSUTF8StringEncoding]; - return data; - } -#endif -} - -+ (id)objectWithString:(NSString *)jsonStr - error:(NSError **)error { - NSData *data = [jsonStr dataUsingEncoding:NSUTF8StringEncoding]; - return [self objectWithData:data - error:error]; -} - -+ (id)objectWithData:(NSData *)jsonData - error:(NSError **)error { -#if GTL_REQUIRES_NSJSONSERIALIZATION - NSMutableDictionary *obj = [NSJSONSerialization JSONObjectWithData:jsonData - options:NSJSONReadingMutableContainers - error:error]; - return obj; -#else - Class serializer = NSClassFromString(@"NSJSONSerialization"); - if (serializer) { - const NSUInteger kOpts = (1UL << 0); // NSJSONReadingMutableContainers - NSMutableDictionary *obj = [serializer JSONObjectWithData:jsonData - options:kOpts - error:error]; - return obj; - } else { - Class jsonParseClass = NSClassFromString(@"SBJsonParser"); - if (!jsonParseClass) { - jsonParseClass = NSClassFromString(@"SBJSON"); - } - - if (error) *error = nil; - - GTLSBJSON *parser = [[[jsonParseClass alloc] init] autorelease]; - - NSString *jsonrep = [[[NSString alloc] initWithData:jsonData - encoding:NSUTF8StringEncoding] autorelease]; - id obj = [parser objectWithString:jsonrep - error:error]; - return obj; - } -#endif -} - -@end diff --git a/XCDYouTubeKit Demo/Pods/GoogleAPIClient/LICENSE b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/LICENSE new file mode 100644 index 000000000..d64569567 --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/XCDYouTubeKit Demo/Pods/GoogleAPIClient/README.md b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/README.md new file mode 100644 index 000000000..60203aa0f --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/README.md @@ -0,0 +1,77 @@ +# Google APIs Client Library for Objective-C # + +**Project site**
+**Discussion group** + +[![Build Status](https://travis-ci.org/google/google-api-objectivec-client.svg?branch=master)](https://travis-ci.org/google/google-api-objectivec-client) + +Written by Google, this library is a flexible and efficient Objective-C +framework for accessing JSON APIs. + +This is the recommended library for accessing JSON-based Google APIs for iOS and +Mac OS X applications. The library is compatible with applications built for +iOS 3 and later, and Mac OS X 10.5 and later. + +**To get started** with Google APIs and the Objective-C client library, read +the [wiki](https://github.com/google/google-api-objectivec-client/wiki) +and study the +[example applications](https://github.com/google/google-api-objectivec-client/tree/master/Examples). + +Generated interfaces for Google APIs are in the +[services folder](https://github.com/google/google-api-objectivec-client/tree/master/Source/Services). +Library changes are documented in the +[release notes](https://github.com/google/google-api-objectivec-client/blob/master/ReleaseNotes.md). + +Google APIs with generated interfaces include +- [AdExchange Buyer](https://developers.google.com/ad-exchange/buyer-rest/) +- [AdExchange Seller](https://developers.google.com/ad-exchange/seller-rest/) +- [AdSense](https://developers.google.com/adsense/) +- [AdSense Host](https://developers.google.com/adsense/host/) +- [Analytics](https://developers.google.com/analytics/) +- [Blogger](https://developers.google.com/blogger/) +- [Books](https://developers.google.com/books/) +- [Calendar](https://developers.google.com/google-apps/calendar/) +- [Civic Info](https://developers.google.com/civic-information/) +- [Cloud Save (AppState)](https://developers.google.com/games/services/common/concepts/cloudsave) +- [Cloud Storage](https://developers.google.com/storage/) +- [Compute Engine](https://developers.google.com/compute/) +- [DoubleClick Bid Manager](https://developers.google.com/bid-manager/) +- [Drive](https://developers.google.com/drive/) +- [Fitness](https://developers.google.com/fit/) +- [Gmail](https://developers.google.com/gmail/) +- [Maps Engine](https://developers.google.com/maps-engine/) +- [Mirror](https://developers.google.com/glass/about/) for Google Glass +- [Groups Settings](https://developers.google.com/google-apps/groups-settings/) +- Latitude ([deprecated](https://support.google.com/gmm/answer/3001634?p=maps_android_latitude&rd=1)) +- [Plus](https://developers.google.com/+/api/) +- [Plus Domains](https://developers.google.com/+/domains/) +- Shopping ([deprecated](http://googleblog.blogspot.jp/2013/03/a-second-spring-of-cleaning.html)) +- [Spectrum Database](https://developers.google.com/spectrum/) +- [QPX Express](https://developers.google.com/qpx-express/) +- [Tasks](https://developers.google.com/google-apps/tasks/) +- [URL Shortener](https://developers.google.com/url-shortener/) +- [Webmaster Tools](https://developers.google.com/webmaster-tools/) +- [YouTube](https://developers.google.com/youtube/v3/) + +The library may also be used +[without generated interfaces](https://github.com/google/google-api-objectivec-client/wiki#using-apis-without-generated-classes) +with JSON REST and JSON-RPC APIs. + +**If you have a problem** or want a new feature to be included in the library, +please join the +[discussion group](http://groups.google.com/group/google-api-objectivec-client). +Be sure to include +[http logs](https://github.com/google/google-api-objectivec-client/wiki#logging-http-server-traffic) +for requests and responses when posting questions. Bugs may also be submitted +on the [issues list](https://github.com/google/google-api-objectivec-client/issues). + +**Externally-included projects**: The library includes code from the separate +projects [GTM HTTP Fetcher](https://github.com/google/gtm-http-fetcher), +[GTM OAuth 2](https://github.com/google/gtm-oauth2), and +[json-framework](http://code.google.com/p/json-framework/). + +**Google Data APIs**: The library for older, XML-based APIs is +[still available](https://github.com/google/gdata-objectivec-client). + +Other useful classes for Mac and iOS developers are available in the +[Google Toolbox for Mac](https://github.com/google/google-toolbox-for-mac). diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/GTLDefines.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/GTLDefines.h similarity index 70% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/GTLDefines.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/GTLDefines.h index b12eb9eb6..f3623bf56 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/GTLDefines.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/GTLDefines.h @@ -65,34 +65,22 @@ #endif // -// GTL_ASSERT is like NSAssert, but takes a variable number of arguments: -// -// GTL_ASSERT(condition, @"Problem in argument %@", argStr); -// +// GTL_ASSERT defaults to bridging to NSAssert. This macro exists just in case +// it needs to be remapped. // 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) + // NSCAssert to avoid capturing self if used in a block. + #define GTL_ASSERT(condition, ...) NSCAssert(condition, __VA_ARGS__) #endif // GTL_ASSERT #ifndef GTL_DEBUG_ASSERT - #if DEBUG + #if DEBUG && !defined(NS_BLOCK_ASSERTIONS) #define GTL_DEBUG_ASSERT(condition, ...) GTL_ASSERT(condition, __VA_ARGS__) + #elif DEBUG + // In DEBUG builds with assertions blocked, log to avoid unused variable warnings. + #define GTL_DEBUG_ASSERT(condition, ...) if (!(condition)) { NSLog(__VA_ARGS__); } #else #define GTL_DEBUG_ASSERT(condition, ...) do { } while (0) #endif @@ -131,14 +119,32 @@ #define __has_attribute(x) 0 #endif -#if 1 - // We will start using nonnull declarations once the static analyzer seems - // to support it without false positives. - #define GTL_NONNULL(x) -#else +#ifndef GTL_NONNULL #if __has_attribute(nonnull) #define GTL_NONNULL(x) __attribute__((nonnull x)) #else #define GTL_NONNULL(x) #endif #endif + +#ifndef GTL_DECLARE_GENERICS + #if __has_feature(objc_generics) \ + && ((!TARGET_OS_IPHONE && defined(MAC_OS_X_VERSION_10_11) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_11) \ + || (TARGET_OS_IPHONE && defined(__IPHONE_9_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_9_0)) + #define GTL_DECLARE_GENERICS 1 + #else + #define GTL_DECLARE_GENERICS 0 + #endif +#endif + +#ifndef GTL_NSArrayOf + #if GTL_DECLARE_GENERICS + #define GTL_NSArrayOf(value) NSArray + #define GTL_NSDictionaryOf(key, value) NSDictionary + #define GTL_NSMutableDictionaryOf(key, value) NSMutableDictionary + #else + #define GTL_NSArrayOf(value) NSArray + #define GTL_NSDictionaryOf(key, value) NSDictionary + #define GTL_NSMutableDictionaryOf(key, value) NSMutableDictionary + #endif // GTL_DECLARE_GENERICS +#endif // GTL_NSArrayOf diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Objects/GTLBatchQuery.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Objects/GTLBatchQuery.h similarity index 73% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Objects/GTLBatchQuery.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Objects/GTLBatchQuery.h index d4fb1d382..af3410cff 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Objects/GTLBatchQuery.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Objects/GTLBatchQuery.h @@ -29,10 +29,11 @@ BOOL skipAuthorization_; NSDictionary *additionalHTTPHeaders_; NSDictionary *urlQueryParameters_; + GTLQueryTestBlock testBlock_; } // Queries included in this batch. Each query should have a unique requestID. -@property (retain) NSArray *queries; +@property (retain) GTL_NSArrayOf(GTLQuery *) *queries; // Clients may set this to YES to disallow authorization. Defaults to NO. @property (assign) BOOL shouldSkipAuthorization; @@ -41,14 +42,20 @@ // // These headers override the same keys from the service object's // additionalHTTPHeaders. -@property (copy) NSDictionary *additionalHTTPHeaders; +@property (copy) GTL_NSDictionaryOf(NSString *, NSString *) *additionalHTTPHeaders; // Any URL query parameters to add to the query (useful for debugging with some // services). -@property (copy) NSDictionary *urlQueryParameters; +@property (copy) GTL_NSDictionaryOf(NSString *, NSString *) *urlQueryParameters; -+ (id)batchQuery; -+ (id)batchQueryWithQueries:(NSArray *)array; +// Apps may provide a test block on the query or service to avoid network activity +// during testing. +// +// See the description of GTLQueryTestBlock for additional details. +@property (copy) GTLQueryTestBlock testBlock; + ++ (instancetype)batchQuery; ++ (instancetype)batchQueryWithQueries:(GTL_NSArrayOf(GTLQuery *) *)array; - (void)addQuery:(GTLQuery *)query GTL_NONNULL((1)); diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Objects/GTLBatchQuery.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Objects/GTLBatchQuery.m similarity index 93% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Objects/GTLBatchQuery.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Objects/GTLBatchQuery.m index c584368c5..3202b6b13 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Objects/GTLBatchQuery.m +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Objects/GTLBatchQuery.m @@ -23,14 +23,15 @@ @implementation GTLBatchQuery @synthesize shouldSkipAuthorization = skipAuthorization_, additionalHTTPHeaders = additionalHTTPHeaders_, - urlQueryParameters = urlQueryParameters_; + urlQueryParameters = urlQueryParameters_, + testBlock = testBlock_; -+ (id)batchQuery { ++ (instancetype)batchQuery { GTLBatchQuery *obj = [[[self alloc] init] autorelease]; return obj; } -+ (id)batchQueryWithQueries:(NSArray *)queries { ++ (instancetype)batchQueryWithQueries:(NSArray *)queries { GTLBatchQuery *obj = [self batchQuery]; obj.queries = queries; return obj; @@ -44,6 +45,7 @@ - (id)copyWithZone:(NSZone *)zone { newBatch.queries = copiesOfQueries; newBatch.shouldSkipAuthorization = self.shouldSkipAuthorization; newBatch.additionalHTTPHeaders = self.additionalHTTPHeaders; + newBatch.testBlock = self.testBlock; return newBatch; } @@ -52,6 +54,7 @@ - (void)dealloc { [additionalHTTPHeaders_ release]; [urlQueryParameters_ release]; [requestIDMap_ release]; + [testBlock_ release]; [super dealloc]; } diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Objects/GTLBatchResult.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Objects/GTLBatchResult.h similarity index 100% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Objects/GTLBatchResult.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Objects/GTLBatchResult.h diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Objects/GTLBatchResult.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Objects/GTLBatchResult.m similarity index 100% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Objects/GTLBatchResult.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Objects/GTLBatchResult.m diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Objects/GTLDateTime.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Objects/GTLDateTime.h similarity index 97% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Objects/GTLDateTime.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Objects/GTLDateTime.h index f6b1ffb3c..707566ac8 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Objects/GTLDateTime.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Objects/GTLDateTime.h @@ -29,6 +29,9 @@ NSInteger offsetSeconds_; // may be NSUndefinedDateComponent BOOL isUniversalTime_; // preserves "Z" NSTimeZone *timeZone_; // specific time zone by name, if known + + NSDate *cachedDate_; + NSString *cachedRFC3339String_; } + (GTLDateTime *)dateTimeWithRFC3339String:(NSString *)str; diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Objects/GTLDateTime.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Objects/GTLDateTime.m similarity index 92% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Objects/GTLDateTime.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Objects/GTLDateTime.m index e15684bdc..a6493923d 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Objects/GTLDateTime.m +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Objects/GTLDateTime.m @@ -48,12 +48,6 @@ - (void)setFromRFC3339String:(NSString *)str; @end -static NSCharacterSet *gDashSet = nil; -static NSCharacterSet *gTSet = nil; -static NSCharacterSet *gColonSet = nil; -static NSCharacterSet *gPlusMinusZSet = nil; -static NSMutableDictionary *gCalendarsForTimeZones = nil; - @implementation GTLDateTime // A note about milliseconds_: @@ -78,19 +72,6 @@ @implementation GTLDateTime offsetSeconds = offsetSeconds_, universalTime = isUniversalTime_; -+ (void)initialize { - // Note that initialize is guaranteed by the runtime to be called in a - // thread-safe manner. - if (gDashSet == nil) { - gDashSet = [[NSCharacterSet characterSetWithCharactersInString:@"-"] retain]; - gTSet = [[NSCharacterSet characterSetWithCharactersInString:@"Tt "] retain]; - gColonSet = [[NSCharacterSet characterSetWithCharactersInString:@":"] retain]; - gPlusMinusZSet = [[NSCharacterSet characterSetWithCharactersInString:@"+-zZ"] retain]; - - gCalendarsForTimeZones = [[NSMutableDictionary alloc] init]; - } -} - + (GTLDateTime *)dateTimeWithRFC3339String:(NSString *)str { if (str == nil) return nil; @@ -129,16 +110,24 @@ + (GTLDateTime *)dateTimeWithDateComponents:(NSDateComponents *)components { #else // NSDateComponents added timeZone: in Mac OS X 10.7. NSTimeZone *tz = nil; - if ([components respondsToSelector:@selector(timeZone)]) { + +#if defined(MAC_OS_X_VERSION_10_7) && MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7 + BOOL hasTimeZone = YES; +#else + BOOL hasTimeZone = [components respondsToSelector:@selector(timeZone)]; +#endif + if (hasTimeZone) { tz = [components timeZone]; } -#endif +#endif // GTL_IPHONE return [self dateTimeWithDate:date timeZone:tz]; } - (void)dealloc { [dateComponents_ release]; [timeZone_ release]; + [cachedDate_ release]; + [cachedRFC3339String_ release]; [super dealloc]; } @@ -201,7 +190,6 @@ - (BOOL)doesDateComponents:(NSDateComponents *)dc1 #endif // !GTL_CAN_TRUST_DATE_COMPONENTS_ISEQUAL - (BOOL)isEqual:(GTLDateTime *)other { - if (self == other) return YES; if (![other isKindOfClass:[GTLDateTime class]]) return NO; @@ -211,16 +199,20 @@ - (BOOL)isEqual:(GTLDateTime *)other { BOOL areDateComponentsEqual = [self doesDateComponents:self.dateComponents equalDateComponents:other.dateComponents]; #endif + if (!areDateComponentsEqual) return NO; 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; + return areTimeZonesEqual + && self.offsetSeconds == other.offsetSeconds + && self.universalTime == other.universalTime + && self.milliseconds == other.milliseconds; +} + +- (NSUInteger)hash { + return [[self date] hash]; } - (NSString *)description { @@ -233,7 +225,7 @@ - (NSTimeZone *)timeZone { return timeZone_; } - if (self.isUniversalTime) { + if (self.universalTime) { NSTimeZone *ztz = [NSTimeZone timeZoneWithName:@"Universal"]; return ztz; } @@ -260,6 +252,13 @@ - (void)setTimeZone:(NSTimeZone *)timeZone { } - (NSCalendar *)calendarForTimeZone:(NSTimeZone *)tz { + static NSMutableDictionary *gCalendarsForTimeZones; + + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + gCalendarsForTimeZones = [[NSMutableDictionary alloc] init]; + }); + NSCalendar *cal = nil; @synchronized(gCalendarsForTimeZones) { id tzKey = (tz ? tz : [NSNull null]); @@ -286,6 +285,10 @@ - (NSCalendar *)calendar { } - (NSDate *)date { + @synchronized(self) { + if (cachedDate_) return cachedDate_; + } + NSDateComponents *dateComponents = self.dateComponents; NSTimeInterval extraMillisecondsAsSeconds = 0.0; NSCalendar *cal; @@ -304,7 +307,7 @@ - (NSDate *)date { [noonDateComponents setMinute:0]; [noonDateComponents setSecond:0]; dateComponents = noonDateComponents; - + NSTimeZone *gmt = [NSTimeZone timeZoneWithName:@"Universal"]; cal = [self calendarForTimeZone:gmt]; } else { @@ -325,6 +328,10 @@ - (NSDate *)date { #endif } + @synchronized(self) { + [cachedDate_ release]; + cachedDate_ = [date retain]; + } return date; } @@ -333,6 +340,10 @@ - (NSString *)stringValue { } - (NSString *)RFC3339String { + @synchronized(self) { + if (cachedRFC3339String_) return cachedRFC3339String_; + } + NSDateComponents *dateComponents = self.dateComponents; NSInteger offset = self.offsetSeconds; @@ -342,7 +353,7 @@ - (NSString *)RFC3339String { NSString *timeOffsetString; // timeOffsetString like "-08:00" - if (self.isUniversalTime) { + if (self.universalTime) { timeOffsetString = @"Z"; } else if (offset == kGTLUndefinedDateComponent) { // unknown offset is rendered as -00:00 per @@ -373,6 +384,10 @@ - (NSString *)RFC3339String { (long)[dateComponents year], (long)[dateComponents month], (long)[dateComponents day], timeString]; + @synchronized(self) { + [cachedRFC3339String_ release]; + cachedRFC3339String_ = [dateString retain]; + } return dateString; } @@ -396,7 +411,7 @@ - (void)setFromDate:(NSDate *)date timeZone:(NSTimeZone *)tz { NSTimeInterval asTimeInterval = [date timeIntervalSince1970]; NSTimeInterval worker = asTimeInterval - trunc(asTimeInterval); self.milliseconds = (NSInteger)round(worker * 1000.0); - + self.universalTime = NO; NSInteger offset = kGTLUndefinedDateComponent; @@ -416,6 +431,18 @@ - (void)setFromDate:(NSDate *)date timeZone:(NSTimeZone *)tz { } - (void)setFromRFC3339String:(NSString *)str { + static NSCharacterSet *gDashSet; + static NSCharacterSet *gTSet; + static NSCharacterSet *gColonSet; + static NSCharacterSet *gPlusMinusZSet; + + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + gDashSet = [[NSCharacterSet characterSetWithCharactersInString:@"-"] retain]; + gTSet = [[NSCharacterSet characterSetWithCharactersInString:@"Tt "] retain]; + gColonSet = [[NSCharacterSet characterSetWithCharactersInString:@":"] retain]; + gPlusMinusZSet = [[NSCharacterSet characterSetWithCharactersInString:@"+-zZ"] retain]; + }); NSInteger year = kGTLUndefinedDateComponent; NSInteger month = kGTLUndefinedDateComponent; @@ -475,7 +502,7 @@ - (void)setFromRFC3339String:(NSString *)str { self.dateComponents = dateComponents; self.milliseconds = milliseconds; - + // determine the offset, like from Z, or -08:00:00.0 self.timeZone = nil; @@ -483,12 +510,12 @@ - (void)setFromRFC3339String:(NSString *)str { NSInteger totalOffset = kGTLUndefinedDateComponent; self.universalTime = NO; - if ([sign caseInsensitiveCompare:@"Z"] == NSOrderedSame) { + if (sign == nil || [sign caseInsensitiveCompare:@"Z"] == NSOrderedSame) { self.universalTime = YES; totalOffset = 0; - } else if (sign != nil) { + } else { totalOffset = (60 * offsetMinute) + (60 * 60 * offsetHour); diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Objects/GTLErrorObject.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Objects/GTLErrorObject.h similarity index 95% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Objects/GTLErrorObject.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Objects/GTLErrorObject.h index c2ec67db3..3ae1a0329 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Objects/GTLErrorObject.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Objects/GTLErrorObject.h @@ -24,7 +24,7 @@ @interface GTLErrorObject : GTLObject @property (retain) NSNumber *code; @property (retain) NSString *message; -@property (retain) NSArray *data; // of GTLErrorObjectData +@property (retain) GTL_NSArrayOf(GTLErrorObjectData *) *data; // Convenience accessor for creating an NSError from a GTLErrorObject. @property (readonly) NSError *foundationError; diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Objects/GTLErrorObject.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Objects/GTLErrorObject.m similarity index 92% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Objects/GTLErrorObject.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Objects/GTLErrorObject.m index 1fa1023ac..ee47830de 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Objects/GTLErrorObject.m +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Objects/GTLErrorObject.m @@ -27,9 +27,7 @@ @implementation GTLErrorObject @dynamic data; + (NSDictionary *)arrayPropertyToClassMap { - NSDictionary *map = [NSDictionary dictionaryWithObject:[GTLErrorObjectData class] - forKey:@"data"]; - return map; + return @{ @"data" : [GTLErrorObjectData class] }; } - (NSError *)foundationError { diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Objects/GTLObject.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Objects/GTLObject.h similarity index 91% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Objects/GTLObject.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Objects/GTLObject.h index 787ae0ea6..c4777d6ac 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Objects/GTLObject.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Objects/GTLObject.h @@ -26,19 +26,19 @@ #import "GTLUtilities.h" #import "GTLDateTime.h" +@class GTLObject; + @protocol GTLCollectionProtocol @optional -@property (retain) NSArray *items; +@property (retain) GTL_NSArrayOf(GTLObject *) *items; @end @protocol GTLBatchItemCreationProtocol - (void)createItemsWithClassMap:(NSDictionary *)batchClassMap; @end -@interface GTLObject : NSObject { - +@interface GTLObject : NSObject { @private - NSMutableDictionary *json_; // Used when creating the subobjects from this one. @@ -54,9 +54,9 @@ NSMutableDictionary *userProperties_; } -@property (nonatomic, retain) NSMutableDictionary *JSON; -@property (nonatomic, retain) NSDictionary *surrogates; -@property (nonatomic, retain) NSMutableDictionary *userProperties; +@property (nonatomic, retain) GTL_NSMutableDictionaryOf(id, id) *JSON; +@property (nonatomic, retain) GTL_NSDictionaryOf(Class, Class) *surrogates; +@property (nonatomic, retain) GTL_NSMutableDictionaryOf(NSString *, id) *userProperties; /////////////////////////////////////////////////////////////////////////////// // @@ -65,8 +65,8 @@ // These methods are intended for users of the library // -+ (id)object; -+ (id)objectWithJSON:(NSMutableDictionary *)dict; ++ (instancetype)object; ++ (instancetype)objectWithJSON:(NSMutableDictionary *)dict; - (id)copyWithZone:(NSZone *)zone; @@ -78,13 +78,13 @@ // Returns the list of keys in this object's JSON that aren't listed as // properties on the object. -- (NSArray *)additionalJSONKeys; +- (GTL_NSArrayOf(NSString *) *)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 GTL_NONNULL((2)); -- (NSDictionary *)additionalProperties; +- (GTL_NSDictionaryOf(NSString *, id) *)additionalProperties; // User properties are supported for client convenience, but are not copied by // copyWithZone. User Properties keys beginning with _ are reserved by the library. @@ -186,7 +186,7 @@ @end @interface GTLCollectionObject (DynamicMethods) -- (NSArray *)items; +- (GTL_NSArrayOf(GTLObject *) *)items; @end // Base object use for when an service method directly returns an array instead diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Objects/GTLObject.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Objects/GTLObject.m similarity index 92% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Objects/GTLObject.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Objects/GTLObject.m index f7979c849..c7cfb24c5 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Objects/GTLObject.m +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Objects/GTLObject.m @@ -21,10 +21,11 @@ #import "GTLObject.h" #import "GTLRuntimeCommon.h" -#import "GTLJSONParser.h" static NSString *const kUserDataPropertyKey = @"_userData"; +static NSString *const kGTLObjectJSONCoderKey = @"json"; + @interface GTLObject () + (NSMutableArray *)allDeclaredProperties; + (NSArray *)allKnownKeys; @@ -42,11 +43,11 @@ @implementation GTLObject surrogates = surrogates_, userProperties = userProperties_; -+ (id)object { ++ (instancetype)object { return [[[self alloc] init] autorelease]; } -+ (id)objectWithJSON:(NSMutableDictionary *)dict { ++ (instancetype)objectWithJSON:(NSMutableDictionary *)dict { GTLObject *obj = [self object]; obj.JSON = dict; return obj; @@ -113,6 +114,23 @@ - (void)dealloc { [super dealloc]; } ++ (BOOL)supportsSecureCoding { + return YES; +} + +- (instancetype)initWithCoder:(NSCoder *)decoder { + self = [super init]; + if (self) { + json_ = [[decoder decodeObjectOfClass:[NSMutableDictionary class] + forKey:kGTLObjectJSONCoderKey] retain]; + } + return self; +} + +- (void)encodeWithCoder:(NSCoder *)encoder { + [encoder encodeObject:json_ forKey:kGTLObjectJSONCoderKey]; +} + #pragma mark JSON values - (void)setJSONValue:(id)obj forKey:(NSString *)key { @@ -131,13 +149,19 @@ - (id)JSONValueForKey:(NSString *)key { - (NSString *)JSONString { NSError *error = nil; - NSString *str = [GTLJSONParser stringWithObject:[self JSON] - humanReadable:YES - error:&error]; - if (error) { - return [error description]; + + NSDictionary *json = [self JSON]; + if (!json) return @""; + + NSData *data = [NSJSONSerialization dataWithJSONObject:json + options:NSJSONWritingPrettyPrinted + error:&error]; + if (data) { + NSString *jsonStr = [[[NSString alloc] initWithData:data + encoding:NSUTF8StringEncoding] autorelease]; + return jsonStr; } - return str; + return [error description]; } - (NSArray *)additionalJSONKeys { @@ -448,7 +472,7 @@ - (NSString *)description { if ([rawValue isKindOfClass:[NSDictionary class]]) { // for dictionaries, show the list of keys: // {key1,key2,key3} - NSString *subkeyList = [[rawValue allKeys] componentsJoinedByString:@","]; + NSString *subkeyList = [[(NSDictionary *)rawValue allKeys] componentsJoinedByString:@","]; value = [NSString stringWithFormat:@"{%@}", subkeyList]; } else if ([rawValue isKindOfClass:[NSArray class]]) { // for arrays, show the number of items in the array: @@ -482,30 +506,28 @@ + (Class)registeredObjectClassForKind:(NSString *)kind { + (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]; + @autoreleasepool { - if (gKindMap == nil) { - gKindMap = [[NSMutableDictionary alloc] init]; - } + if (gKindMap == nil) { + gKindMap = [[NSMutableDictionary alloc] init]; + } - Class selfClass = [self class]; + 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]); - } + // 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]; + [gKindMap setValue:selfClass forKey:kind]; + } } #pragma mark Object Instantiation @@ -535,7 +557,7 @@ + (GTLObject *)objectForJSON:(NSMutableDictionary *)json NSString *kind = nil; if ([json isKindOfClass:[NSDictionary class]]) { kind = [json valueForKey:@"kind"]; - if ([kind isKindOfClass:[NSString class]] && [kind length] > 0 && ![NSStringFromClass(defaultClass) hasSuffix:@"ResourceId"]) { + if ([kind isKindOfClass:[NSString class]] && [kind length] > 0) { Class dynamicClass = [GTLObject registeredObjectClassForKind:kind]; if (dynamicClass) { classToCreate = dynamicClass; diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Objects/GTLQuery.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Objects/GTLQuery.h similarity index 72% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Objects/GTLQuery.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Objects/GTLQuery.h index 5334dc986..488e6e6d9 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Objects/GTLQuery.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Objects/GTLQuery.h @@ -23,12 +23,15 @@ #import "GTLObject.h" #import "GTLUploadParameters.h" +// This protocol is just to support passing of either a batch or a single query +// to a GTLService instance. The library does not expect or support other +// implementations of the protocol. @protocol GTLQueryProtocol - (BOOL)isBatchQuery; - (BOOL)shouldSkipAuthorization; - (void)executionDidStop; -- (NSDictionary *)additionalHTTPHeaders; -- (NSDictionary *)urlQueryParameters; +- (GTL_NSDictionaryOf(NSString *, NSString *) *)additionalHTTPHeaders; +- (GTL_NSDictionaryOf(NSString *, NSString *) *)urlQueryParameters; - (GTLUploadParameters *)uploadParameters; @end @@ -39,6 +42,22 @@ @end @class GTLServiceTicket; +@class GTLQuery; + +// The test block enables testing of query execution without any network activity. +// +// The test block must finish by calling the response block, passing either an object +// (GTLObject or GTLBatchResult) or an NSError. +// +// The query is available to the test block code as ticket.originalQuery. +// +// Because query execution is asynchronous, the test code must wait for a callback, +// either with GTLService's waitForTicket:timeout:fetchedObject:error: or with XCTestCase's +// waitForExpectationsWithTimeout: +// +// Example usage is available in GTLServiceTest. +typedef void (^GTLQueryTestResponse)(id object, NSError *error); +typedef void (^GTLQueryTestBlock)(GTLServiceTicket *testTicket, GTLQueryTestResponse testResponse); @interface GTLQuery : NSObject { @private @@ -53,6 +72,7 @@ Class expectedObjectClass_; BOOL skipAuthorization_; void (^completionBlock_)(GTLServiceTicket *ticket, id object, NSError *error); + GTLQueryTestBlock testBlock_; } // The rpc method name. @@ -75,14 +95,14 @@ // Any URL query parameters to add to the query (useful for debugging with some // services). -@property (copy) NSDictionary *urlQueryParameters; +@property (copy) GTL_NSDictionaryOf(NSString *, NSString *) *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; +@property (copy) GTL_NSDictionaryOf(NSString *, NSString *) *additionalHTTPHeaders; // The GTLObject subclass expected for results (used if the result doesn't // include a kind attribute). @@ -108,11 +128,15 @@ // } @property (copy) void (^completionBlock)(GTLServiceTicket *ticket, id object, NSError *error); +// Apps may provide a test block on the query or service to avoid network activity +// during testing. See the description above for GTLQueryTestBlock. +@property (copy) GTLQueryTestBlock testBlock; + // methodName is the RPC method name to use. -+ (id)queryWithMethodName:(NSString *)methodName GTL_NONNULL((1)); ++ (instancetype)queryWithMethodName:(NSString *)methodName GTL_NONNULL((1)); // methodName is the RPC method name to use. -- (id)initWithMethodName:(NSString *)method GTL_NONNULL((1)); +- (instancetype)initWithMethodName:(NSString *)method GTL_NONNULL((1)); // 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 diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Objects/GTLQuery.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Objects/GTLQuery.m similarity index 96% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Objects/GTLQuery.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Objects/GTLQuery.m index f91256545..cec245d85 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Objects/GTLQuery.m +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Objects/GTLQuery.m @@ -45,13 +45,14 @@ @implementation GTLQuery additionalHTTPHeaders = additionalHTTPHeaders_, expectedObjectClass = expectedObjectClass_, shouldSkipAuthorization = skipAuthorization_, - completionBlock = completionBlock_; + completionBlock = completionBlock_, + testBlock = testBlock_; -+ (id)queryWithMethodName:(NSString *)methodName { ++ (instancetype)queryWithMethodName:(NSString *)methodName { return [[[self alloc] initWithMethodName:methodName] autorelease]; } -- (id)initWithMethodName:(NSString *)methodName { +- (instancetype)initWithMethodName:(NSString *)methodName { self = [super init]; if (self) { requestID_ = [[[self class] nextRequestID] retain]; @@ -75,6 +76,7 @@ - (void)dealloc { [urlQueryParameters_ release]; [additionalHTTPHeaders_ release]; [completionBlock_ release]; + [testBlock_ release]; [super dealloc]; } @@ -98,6 +100,7 @@ - (id)copyWithZone:(NSZone *)zone { query.expectedObjectClass = self.expectedObjectClass; query.shouldSkipAuthorization = self.shouldSkipAuthorization; query.completionBlock = self.completionBlock; + query.testBlock = self.testBlock; return query; } @@ -145,6 +148,7 @@ - (BOOL)isBatchQuery { - (void)executionDidStop { self.completionBlock = nil; + self.testBlock = nil; } + (NSString *)nextRequestID { diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Objects/GTLRuntimeCommon.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Objects/GTLRuntimeCommon.h similarity index 100% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Objects/GTLRuntimeCommon.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Objects/GTLRuntimeCommon.h diff --git a/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Objects/GTLRuntimeCommon.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Objects/GTLRuntimeCommon.m new file mode 100644 index 000000000..2cd4bb73c --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Objects/GTLRuntimeCommon.m @@ -0,0 +1,941 @@ +/* Copyright (c) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 +#include + +#import "GTLRuntimeCommon.h" + +#import "GTLDateTime.h" +#import "GTLObject.h" +#import "GTLUtilities.h" + +// 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 if ([defaultClass isEqual:[NSNumber class]]) { + result = GTL_EnsureNSNumber(json); + canBeCached = NO; + } 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 = [(GTLObject *)obj JSON]; + if (result == nil) { + // adding an empty object; it should have a JSON dictionary so it can + // hold future assignments + [(GTLObject *)obj setJSON:[NSMutableDictionary dictionary]]; + result = [(GTLObject *)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; + if (obj) { + 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 Runtime lookup support + +static objc_property_t PropertyForSel(Class startClass, + SEL sel, BOOL isSetter, + Class *outFoundClass) { + const char *selName = sel_getName(sel); + const char *baseName = selName; + 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 *propAttrs = property_getAttributes(*prop); + const char *dynamicMarker = strstr(propAttrs, ",D"); + if (!dynamicMarker || + (dynamicMarker[2] != 0 && dynamicMarker[2] != ',' )) { + // It isn't dynamic, skip it. + continue; + } + + if (!isSetter) { + // See if this property has an explicit getter=. (the attributes always start with a T, + // so we can check for the leading ','. + const char *getterMarker = strstr(propAttrs, ",G"); + if (getterMarker) { + const char *getterStart = getterMarker + 2; + const char *getterEnd = getterStart; + while ((*getterEnd != 0) && (*getterEnd != ',')) { + ++getterEnd; + } + size_t getterLen = (size_t)(getterEnd - getterStart); + if ((strncmp(selName, getterStart, getterLen) == 0) + && (selName[getterLen] == 0)) { + // return the actual property + foundProp = *prop; + // if requested, return the class containing the property + if (outFoundClass) *outFoundClass = currClass; + break; + } + } // if (getterMarker) + } // if (!isSetter) + + // Search for an exact-name match (a getter), but case-insensitive on the + // first character (in case baseName comes from a setter) + const char *propName = property_getName(*prop); + size_t propNameLen = strlen(propName); + if (baseNameLen == propNameLen + && strncasecmp(baseName, propName, 1) == 0 + && (baseNameLen <= 1 + || strncmp(baseName + 1, propName + 1, baseNameLen - 1) == 0)) { + // return the actual property + foundProp = *prop; + + // if requested, return the class containing the property + if (outFoundClass) *outFoundClass = currClass; + break; + } + } // for (prop in properties) + 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 NS_ENUM(NSUInteger, GTLPropertyType) { +#if !defined(__LP64__) || !__LP64__ + // These two only needed in 32bit builds since NSInteger in 64bit ends up in the LongLong paths. + GTLPropertyTypeInt32 = 1, + GTLPropertyTypeUInt32, +#endif + GTLPropertyTypeLongLong = 3, + GTLPropertyTypeULongLong, + GTLPropertyTypeFloat, + GTLPropertyTypeDouble, + GTLPropertyTypeBool, + GTLPropertyTypeNSString, + GTLPropertyTypeNSNumber, + GTLPropertyTypeGTLDateTime, + GTLPropertyTypeNSArray, + GTLPropertyTypeNSObject, + GTLPropertyTypeGTLObject, +}; + +typedef struct { + const char *attributePrefix; + + GTLPropertyType propertyType; + const char *setterEncoding; + const char *getterEncoding; + + // 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 + // TB,D -- BOOL comes as bool on 64bit iOS + // Tc,D -- BOOL comes as char otherwise + // T@"NSString",D + // T@"GTLLink",D + // T@"NSArray",D + + + static GTLDynamicImpInfo kImplInfo[] = { +#if !defined(__LP64__) || !__LP64__ + { // NSInteger on 32bit + "Ti", + GTLPropertyTypeInt32, + "v@:i", + "i@:", + nil, nil, + NO + }, + { // NSUInteger on 32bit + "TI", + GTLPropertyTypeUInt32, + "v@:I", + "I@:", + nil, nil, + NO + }, +#endif + { // NSInteger on 64bit, long long on 32bit and 64bit. + "Tq", + GTLPropertyTypeLongLong, + "v@:q", + "q@:", + nil, nil, + NO + }, + { // NSUInteger on 64bit, long long on 32bit and 64bit. + "TQ", + GTLPropertyTypeULongLong, + "v@:Q", + "Q@:", + nil, nil, + NO + }, + { // float + "Tf", + GTLPropertyTypeFloat, + "v@:f", + "f@:", + nil, nil, + NO + }, + { // double + "Td", + GTLPropertyTypeDouble, + "v@:d", + "d@:", + nil, nil, + NO + }, +// This conditional matches the one in iPhoneOS.platform version of +// that controls the definition of BOOL. +#if !defined(OBJC_HIDE_64) && TARGET_OS_IPHONE && (defined(__LP64__) && __LP64__) + { // BOOL as bool + "TB", + GTLPropertyTypeBool, + "v@:B", + "B@:", + nil, nil, + NO + }, +#else + { // BOOL as char + "Tc", + GTLPropertyTypeBool, + "v@:c", + "c@:", + nil, nil, + NO + }, +#endif + { // NSString + "T@\"NSString\"", + GTLPropertyTypeNSString, + "v@:@", + "@@:", + "NSString", nil, + NO + }, + { // NSNumber + "T@\"NSNumber\"", + GTLPropertyTypeNSNumber, + "v@:@", + "@@:", + "NSNumber", nil, + NO + }, + { // GTLDateTime +#if !defined(GTL_TARGET_NAMESPACE) + "T@\"GTLDateTime\"", + GTLPropertyTypeGTLDateTime, + "v@:@", + "@@:", + "GTLDateTime", nil, + NO +#else + "T@\"" GTL_TARGET_NAMESPACE_STRING "_" "GTLDateTime\"", + GTLPropertyTypeGTLDateTime, + "v@:@", + "@@:", + GTL_TARGET_NAMESPACE_STRING "_" "GTLDateTime", nil, + NO +#endif + }, + { // NSArray with type + "T@\"NSArray\"", + GTLPropertyTypeNSArray, + "v@:@", + "@@:", + "NSArray", nil, + NO + }, + { // id (any of the objects above) + "T@,", + GTLPropertyTypeNSObject, + "v@:@", + "@@:", + "NSObject", nil, + NO + }, + { // GTLObject - Last, cause it's a special case and prefix is general + "T@\"", + GTLPropertyTypeGTLObject, + "v@:@", + "@@:", + 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; +} + +// Helper to get the IMP for wiring up the getters. +// NOTE: Every argument passed in should be safe to capture in a block. Avoid +// passing something like selName instead of sel, because nothing says that +// pointer will be valid when it is finally used when the method IMP is invoked +// some time later. +static IMP GTLRuntimeGetterIMP(SEL sel, + GTLPropertyType propertyType, + NSString *jsonKey, + Class containedClass, + Class returnClass) { + // Only used in DEBUG logging. +#pragma unused(sel) + + IMP resultIMP; + switch (propertyType) { + +#if !defined(__LP64__) || !__LP64__ + case GTLPropertyTypeInt32: + resultIMP = imp_implementationWithBlock(^(id obj) { + NSNumber *num = [obj JSONValueForKey:jsonKey]; + num = GTL_EnsureNSNumber(num); + NSInteger result = [num integerValue]; + return result; + }); + break; + + case GTLPropertyTypeUInt32: + resultIMP = imp_implementationWithBlock(^(id obj) { + NSNumber *num = [obj JSONValueForKey:jsonKey]; + num = GTL_EnsureNSNumber(num); + NSUInteger result = [num unsignedIntegerValue]; + return result; + }); + break; +#endif // __LP64__ + + case GTLPropertyTypeLongLong: + resultIMP = imp_implementationWithBlock(^(id obj) { + NSNumber *num = [obj JSONValueForKey:jsonKey]; + num = GTL_EnsureNSNumber(num); + long long result = [num longLongValue]; + return result; + }); + break; + + case GTLPropertyTypeULongLong: + resultIMP = imp_implementationWithBlock(^(id obj) { + NSNumber *num = [obj JSONValueForKey:jsonKey]; + num = GTL_EnsureNSNumber(num); + unsigned long long result = [num unsignedLongLongValue]; + return result; + }); + break; + + + case GTLPropertyTypeFloat: + resultIMP = imp_implementationWithBlock(^(id obj) { + NSNumber *num = [obj JSONValueForKey:jsonKey]; + num = GTL_EnsureNSNumber(num); + float result = [num floatValue]; + return result; + }); + break; + + case GTLPropertyTypeDouble: + resultIMP = imp_implementationWithBlock(^(id obj) { + NSNumber *num = [obj JSONValueForKey:jsonKey]; + num = GTL_EnsureNSNumber(num); + double result = [num doubleValue]; + return result; + }); + break; + + case GTLPropertyTypeBool: + resultIMP = imp_implementationWithBlock(^(id obj) { + NSNumber *num = [obj JSONValueForKey:jsonKey]; + BOOL flag = [num boolValue]; + return flag; + }); + break; + + case GTLPropertyTypeNSString: + resultIMP = imp_implementationWithBlock(^(id obj) { + NSString *str = [obj JSONValueForKey:jsonKey]; + return str; + }); + break; + + case GTLPropertyTypeGTLDateTime: + resultIMP = imp_implementationWithBlock(^GTLDateTime *(GTLObject *obj) { + // Return the cached object before creating on demand. + GTLDateTime *cachedDateTime = [obj cacheChildForKey:jsonKey]; + if (cachedDateTime != nil) { + return cachedDateTime; + } + NSString *str = [obj 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]; + } + [obj setCacheChild:cacheValue forKey:jsonKey]; + return resultValue; + }); + break; + + case GTLPropertyTypeNSNumber: + resultIMP = imp_implementationWithBlock(^(id obj) { + NSNumber *num = [obj JSONValueForKey:jsonKey]; + num = GTL_EnsureNSNumber(num); + return num; + }); + break; + + case GTLPropertyTypeGTLObject: + // Default return calss to GTLObject if it wasn't found. + if (returnClass == Nil) { + returnClass = [GTLObject class]; + } + resultIMP = imp_implementationWithBlock(^GTLObject *(GTLObject *obj) { + // Return the cached object before creating on demand. + GTLObject *cachedObj = [obj cacheChildForKey:jsonKey]; + if (cachedObj != nil) { + return cachedObj; + } + NSMutableDictionary *dict = [obj JSONValueForKey:jsonKey]; + if ([dict isKindOfClass:[NSMutableDictionary class]]) { + NSDictionary *surrogates = obj.surrogates; + GTLObject *subObj = [GTLObject objectForJSON:dict + defaultClass:returnClass + surrogates:surrogates + batchClassMap:nil]; + [obj setCacheChild:subObj forKey:jsonKey]; + return subObj; + } else if ([dict isKindOfClass:[NSNull class]]) { + [obj setCacheChild:nil forKey:jsonKey]; + return (GTLObject*)[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([obj class]), + NSStringFromSelector(sel), + NSStringFromClass([dict class]), dict); + return (GTLObject *)dict; + } + return nil; + }); + break; + + case GTLPropertyTypeNSArray: + resultIMP = imp_implementationWithBlock(^(GTLObject *obj) { + // Return the cached array before creating on demand. + NSMutableArray *cachedArray = [obj cacheChildForKey:jsonKey]; + if (cachedArray != nil) { + return cachedArray; + } + NSMutableArray *result = nil; + NSArray *array = [obj JSONValueForKey:jsonKey]; + if (array != nil) { + if ([array isKindOfClass:[NSArray class]]) { + NSDictionary *surrogates = obj.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([obj class]), + NSStringFromSelector(sel), + NSStringFromClass([array class]), array); + } +#endif + result = (NSMutableArray *)array; + } + } + [obj setCacheChild:result forKey:jsonKey]; + return result; + }); + break; + + case GTLPropertyTypeNSObject: + resultIMP = imp_implementationWithBlock(^id(GTLObject *obj) { + // Return the cached object before creating on demand. + id cachedObj = [obj cacheChildForKey:jsonKey]; + if (cachedObj != nil) { + return cachedObj; + } + id jsonObj = [obj JSONValueForKey:jsonKey]; + if (jsonObj != nil) { + BOOL shouldCache = NO; + NSDictionary *surrogates = obj.surrogates; + id result = [GTLRuntimeCommon objectFromJSON:jsonObj + defaultClass:nil + surrogates:surrogates + isCacheable:&shouldCache]; + + [obj setCacheChild:(shouldCache ? result : nil) + forKey:jsonKey]; + return result; + } + return nil; + }); + break; + + } // switch(propertyType) + + return resultIMP; +} + +// Helper to get the IMP for wiring up the setters. +// NOTE: Every argument passed in should be safe to capture in a block. Avoid +// passing something like selName instead of sel, because nothing says that +// pointer will be valid when it is finally used when the method IMP is invoked +// some time later. +static IMP GTLRuntimeSetterIMP(SEL sel, + GTLPropertyType propertyType, + NSString *jsonKey, + Class containedClass, + Class returnClass) { +#pragma unused(sel, returnClass) + IMP resultIMP; + switch (propertyType) { + +#if !defined(__LP64__) || !__LP64__ + case GTLPropertyTypeInt32: + resultIMP = imp_implementationWithBlock(^(id obj, NSInteger val) { + [obj setJSONValue:@(val) forKey:jsonKey]; + }); + break; + + case GTLPropertyTypeUInt32: + resultIMP = imp_implementationWithBlock(^(id obj, NSUInteger val) { + [obj setJSONValue:@(val) forKey:jsonKey]; + }); + break; +#endif // __LP64__ + + case GTLPropertyTypeLongLong: + resultIMP = imp_implementationWithBlock(^(id obj, long long val) { + [obj setJSONValue:@(val) forKey:jsonKey]; + }); + break; + + case GTLPropertyTypeULongLong: + resultIMP = imp_implementationWithBlock(^(id obj, + unsigned long long val) { + [obj setJSONValue:@(val) forKey:jsonKey]; + }); + break; + + case GTLPropertyTypeFloat: + resultIMP = imp_implementationWithBlock(^(id obj, float val) { + [obj setJSONValue:@(val) forKey:jsonKey]; + }); + break; + + case GTLPropertyTypeDouble: + resultIMP = imp_implementationWithBlock(^(id obj, double val) { + [obj setJSONValue:@(val) forKey:jsonKey]; + }); + break; + + case GTLPropertyTypeBool: + resultIMP = imp_implementationWithBlock(^(id obj, BOOL val) { + [obj setJSONValue:@(val) forKey:jsonKey]; + }); + break; + + case GTLPropertyTypeNSString: + resultIMP = imp_implementationWithBlock(^(id obj, NSString *val) { + NSString *copiedStr = [val copy]; + [obj setJSONValue:copiedStr forKey:jsonKey]; + [copiedStr release]; + }); + break; + + case GTLPropertyTypeGTLDateTime: + resultIMP = imp_implementationWithBlock(^(GTLObject *obj, + GTLDateTime *val) { + id cacheValue, jsonValue; + if (![val isKindOfClass:[NSNull class]]) { + jsonValue = [val stringValue]; + cacheValue = val; + } else { + jsonValue = [NSNull null]; + cacheValue = nil; + } + + [obj setJSONValue:jsonValue forKey:jsonKey]; + [obj setCacheChild:cacheValue forKey:jsonKey]; + }); + break; + + case GTLPropertyTypeNSNumber: + resultIMP = imp_implementationWithBlock(^(id obj, NSNumber *val) { + [obj setJSONValue:val forKey:jsonKey]; + }); + break; + + case GTLPropertyTypeGTLObject: + resultIMP = imp_implementationWithBlock(^(GTLObject *obj, + GTLObject *val) { + id cacheValue, jsonValue; + if (![val isKindOfClass:[NSNull class]]) { + NSMutableDictionary *dict = [val JSON]; + if (dict == nil && val != nil) { + // adding an empty object; it should have a JSON dictionary so it + // can hold future assignments + val.JSON = [NSMutableDictionary dictionary]; + jsonValue = val.JSON; + } else { + jsonValue = dict; + } + cacheValue = val; + } else { + jsonValue = [NSNull null]; + cacheValue = nil; + } + [obj setJSONValue:jsonValue forKey:jsonKey]; + [obj setCacheChild:cacheValue forKey:jsonKey]; + }); + break; + + case GTLPropertyTypeNSArray: + resultIMP = imp_implementationWithBlock(^(GTLObject *obj, + NSMutableArray *val) { + id json = [GTLRuntimeCommon jsonFromAPIObject:val + expectedClass:containedClass + isCacheable:NULL]; + [obj setJSONValue:json forKey:jsonKey]; + [obj setCacheChild:val forKey:jsonKey]; + }); + break; + + case GTLPropertyTypeNSObject: + resultIMP = imp_implementationWithBlock(^(GTLObject *obj, + id val) { + BOOL shouldCache = NO; + id json = [GTLRuntimeCommon jsonFromAPIObject:val + expectedClass:Nil + isCacheable:&shouldCache]; + [obj setJSONValue:json forKey:jsonKey]; + [obj setCacheChild:(shouldCache ? val : nil) + forKey:jsonKey]; + }); + break; + + } // switch(propertyType) + + return resultIMP; +} + +#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) { + return NO; // No luck, out of here. + } + + 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)); + return NO; // Failed to find our impl info, out of here. + } + + 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 + // NOTE: These caches that are built up could likely be dropped and do this + // lookup on demand from the class tree. Most are checked once when a method + // is first resolved, so eventually become wasted memory. + NSDictionary *keyMap = + [[foundClass ancestorClass] propertyToJSONKeyMapForClass:foundClass]; + NSString *jsonKey = [keyMap objectForKey:propStr]; + if (jsonKey == nil) { + jsonKey = propStr; + } + + // For arrays we need to look up what the contained class is. + Class containedClass = nil; + if (implInfo->propertyType == GTLPropertyTypeNSArray) { + 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)); + } + } + + // Wire in the method. + IMP imp; + const char *encoding; + if (isSetter) { + imp = GTLRuntimeSetterIMP(sel, implInfo->propertyType, + jsonKey, containedClass, returnClass); + encoding = implInfo->setterEncoding; + } else { + imp = GTLRuntimeGetterIMP(sel, implInfo->propertyType, + jsonKey, containedClass, returnClass); + encoding = implInfo->getterEncoding; + } + if (class_addMethod(foundClass, sel, imp, encoding)) { + return YES; + } + // Not much we can do if this fails, but leave a breadcumb in the log. + GTL_DEBUG_LOG(@"GTLRuntimeCommon: Failed to wire %@ on %@ (encoding: %s).", + NSStringFromSelector(sel), + NSStringFromClass(foundClass), + encoding); + return NO; +} + +@end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Objects/GTLService.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Objects/GTLService.h similarity index 85% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Objects/GTLService.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Objects/GTLService.h index 7415274e6..242eebd1e 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Objects/GTLService.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Objects/GTLService.h @@ -30,27 +30,46 @@ // GTMSessionFetcher rather than the older GTMHTTPFetcher. The session // fetcher requires iOS 7/OS X 10.9 and supports out-of-process uploads. -#ifndef GTL_USE_SESSION_FETCHER - #if GTM_USE_SESSION_FETCHER - #define GTL_USE_SESSION_FETCHER 1 - #else - #define GTL_USE_SESSION_FETCHER 0 - #endif // GTM_USE_SESSION_FETCHER +#if (!TARGET_OS_IPHONE && defined(MAC_OS_X_VERSION_10_11) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_11) \ + || (TARGET_OS_IPHONE && defined(__IPHONE_9_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_9_0) + #ifndef GTM_USE_SESSION_FETCHER + #define GTM_USE_SESSION_FETCHER 1 + #endif + + #define GTLSERVICE_DEPRECATE_OLD_ENUMS 1 +#endif + +#if !defined(GTL_USE_SESSION_FETCHER) && defined(GTM_USE_SESSION_FETCHER) + #define GTL_USE_SESSION_FETCHER GTM_USE_SESSION_FETCHER #endif // GTL_USE_SESSION_FETCHER +#if !defined(GTL_USE_FRAMEWORK_IMPORTS) + #define GTL_USE_FRAMEWORK_IMPORTS 0 +#endif + #if GTL_USE_SESSION_FETCHER #define GTLUploadFetcherClass GTMSessionUploadFetcher #define GTLUploadFetcherClassStr @"GTMSessionUploadFetcher" - #import "GTMSessionFetcher.h" - #import "GTMSessionFetcherService.h" + #if GTL_USE_FRAMEWORK_IMPORTS + #import + #import + #else + #import "GTMSessionFetcher.h" + #import "GTMSessionFetcherService.h" + #endif // GTL_USE_FRAMEWORK_IMPORTS #else // !GTL_USE_SESSION_FETCHER #define GTLUploadFetcherClass GTMHTTPUploadFetcher #define GTLUploadFetcherClassStr @"GTMHTTPUploadFetcher" - #import "GTMHTTPFetcher.h" - #import "GTMHTTPFetcherService.h" + #if GTL_USE_FRAMEWORK_IMPORTS + #import + #import + #else + #import "GTMHTTPFetcher.h" + #import "GTMHTTPFetcherService.h" + #endif // GTL_USE_FRAMEWORK_IMPORTS #endif // GTL_USE_SESSION_FETCHER #import "GTLBatchQuery.h" @@ -65,11 +84,17 @@ // Error domains extern NSString *const kGTLServiceErrorDomain; -enum { - kGTLErrorQueryResultMissing = -3000, - kGTLErrorWaitTimedOut = -3001 + +typedef NS_ENUM(NSInteger, GTLServiceError) { + GTLServiceErrorQueryResultMissing = -3000, + GTLServiceErrorWaitTimedOut = -3001 }; +#if !GTLSERVICE_DEPRECATE_OLD_ENUMS +#define kGTLErrorQueryResultMissing GTLServiceErrorQueryResultMissing +#define kGTLErrorWaitTimedOut GTLServiceErrorWaitTimedOut +#endif + extern NSString *const kGTLJSONRPCErrorDomain; // We'll consistently store the server error string in the userInfo under @@ -100,9 +125,13 @@ extern NSString *const kGTLServiceTicketParsingStoppedNotification ; typedef void (^GTLServiceCompletionHandler)(GTLServiceTicket *ticket, id object, NSError *error); -typedef void (^GTLServiceUploadProgressBlock)(GTLServiceTicket *ticket, unsigned long long numberOfBytesRead, unsigned long long dataLength); +typedef void (^GTLServiceUploadProgressBlock)(GTLServiceTicket *ticket, + unsigned long long totalBytesUploaded, + unsigned long long totalBytesExpectedToUpload); -typedef BOOL (^GTLServiceRetryBlock)(GTLServiceTicket *ticket, BOOL suggestedWillRetry, NSError *error); +typedef BOOL (^GTLServiceRetryBlock)(GTLServiceTicket *ticket, + BOOL suggestedWillRetry, + NSError *error); #pragma mark - @@ -125,6 +154,7 @@ typedef BOOL (^GTLServiceRetryBlock)(GTLServiceTicket *ticket, BOOL suggestedWil GTLServiceRetryBlock retryBlock_; GTLServiceUploadProgressBlock uploadProgressBlock_; + GTLQueryTestBlock testBlock_; NSUInteger uploadChunkSize_; // zero when uploading via multi-part MIME http body @@ -143,6 +173,11 @@ typedef BOOL (^GTLServiceRetryBlock)(GTLServiceTicket *ticket, BOOL suggestedWil NSURL *rpcUploadURL_; NSDictionary *urlQueryParameters_; NSDictionary *additionalHTTPHeaders_; + +#if GTL_USE_SESSION_FETCHER + NSOperationQueue *delegateQueue_; + NSArray *runLoopModes_; +#endif } #pragma mark Query Execution @@ -216,6 +251,11 @@ typedef BOOL (^GTLServiceRetryBlock)(GTLServiceTicket *ticket, BOOL suggestedWil @property (nonatomic, assign) NSTimeInterval maxRetryInterval; +// A test block can be provided to test service calls without any network activity. +// +// See the description of GTLQueryTestBlock for additional details. +@property (nonatomic, copy) GTLQueryTestBlock testBlock; + // // Fetches may be done using RPC or REST APIs, without creating // a GTLQuery object @@ -333,10 +373,10 @@ typedef BOOL (^GTLServiceRetryBlock)(GTLServiceTicket *ticket, BOOL suggestedWil // using MyCalendarItemSubclass instead of GTLItemCalendar and // MyCalendarEventSubclass instead of GTLItemCalendarEvent. // -// NSDictionary *surrogates = [NSDictionary dictionaryWithObjectsAndKeys: -// [MyCalendarEntrySubclass class], [GTLItemCalendar class], -// [MyCalendarEventSubclass class], [GTLItemCalendarEvent class], -// nil]; +// NSDictionary *surrogates = @{ +// [GTLItemCalendar class] : [MyCalendarEntrySubclass class], +// [GTLItemCalendarEvent class] : [MyCalendarEventSubclass class] +// }; // [calendarService setServiceSurrogates:surrogates]; // @property (nonatomic, retain) NSDictionary *surrogates; @@ -366,7 +406,7 @@ typedef BOOL (^GTLServiceRetryBlock)(GTLServiceTicket *ticket, BOOL suggestedWil // 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; +@property (nonatomic, retain) GTL_NSArrayOf(NSString *) *runLoopModes; // Normally, API requests must be made only via SSL to protect the user's // data and the authentication token. This property allows the application @@ -381,13 +421,17 @@ typedef BOOL (^GTLServiceRetryBlock)(GTLServiceTicket *ticket, BOOL suggestedWil // Applications have a default user-agent based on the application signature // in the Info.plist settings. Most applications should not explicitly set -// this property. +// this property. Any string provided will be cleaned of inappropriate characters. @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 can provide a precise userAgent string identifying the application. +// No cleaning of characters is done. Library-specific details will be appended. +- (void)setExactUserAgent:(NSString *)userAgent; + // Applications may call requestForURL:httpMethod to get a request with the // proper user-agent and ETag headers // @@ -431,10 +475,10 @@ typedef BOOL (^GTLServiceRetryBlock)(GTLServiceTicket *ticket, BOOL suggestedWil // Any url query parameters to add to urls (useful for debugging with some // services). -@property (copy) NSDictionary *urlQueryParameters; +@property (copy) GTL_NSDictionaryOf(NSString *, NSString *) *urlQueryParameters; // Any extra http headers to set on requests for GTLObjects. -@property (copy) NSDictionary *additionalHTTPHeaders; +@property (copy) GTL_NSDictionaryOf(NSString *, NSString *) *additionalHTTPHeaders; // The service API version. @property (nonatomic, copy) NSString *apiVersion; @@ -466,6 +510,25 @@ typedef BOOL (^GTLServiceRetryBlock)(GTLServiceTicket *ticket, BOOL suggestedWil @property (copy) GTLServiceUploadProgressBlock uploadProgressBlock; +@end + +@interface GTLService (TestingSupport) + +// Convenience method to create a mock GTL service just for testing. +// +// Queries executed by this mock service will not perform any network operation, +// but will invoke callbacks and provide the supplied data or error to the +// completion handler. +// +// You can make more customized mocks by setting the test block property of the service +// or query; the test block can inspect the query as ticket.originalQuery +// +// See the description of GTLQueryTestBlock for more details on customized testing. +// +// Example usage is in the unit test method testMockServiceConvenienceMethod. ++ (instancetype)mockServiceWithFakedObject:(id)objectOrNil + fakedError:(NSError *)error; + // Wait synchronously for fetch to complete (strongly discouraged) // // This just runs the current event loop until the fetch completes @@ -483,6 +546,7 @@ typedef BOOL (^GTLServiceRetryBlock)(GTLServiceTicket *ticket, BOOL suggestedWil timeout:(NSTimeInterval)timeoutInSeconds fetchedObject:(GTLObject **)outObjectOrNil error:(NSError **)outErrorOrNil GTL_NONNULL((1)); + @end #pragma mark - @@ -491,6 +555,7 @@ typedef BOOL (^GTLServiceRetryBlock)(GTLServiceTicket *ticket, BOOL suggestedWil // Ticket base class // @interface GTLServiceTicket : NSObject { + @private GTLService *service_; NSMutableDictionary *ticketProperties_; @@ -520,9 +585,9 @@ typedef BOOL (^GTLServiceRetryBlock)(GTLServiceTicket *ticket, BOOL suggestedWil NSOperation *parseOperation_; } -+ (id)ticketForService:(GTLService *)service; ++ (instancetype)ticketForService:(GTLService *)service; -- (id)initWithService:(GTLService *)service; +- (instancetype)initWithService:(GTLService *)service; - (id)service; @@ -552,7 +617,7 @@ typedef BOOL (^GTLServiceRetryBlock)(GTLServiceTicket *ticket, BOOL suggestedWil - (void)setProperty:(id)obj forKey:(NSString *)key GTL_NONNULL((1)); // pass nil obj to remove property - (id)propertyForKey:(NSString *)key; -@property (nonatomic, copy) NSDictionary *properties; +@property (nonatomic, copy) GTL_NSDictionaryOf(NSString *, id) *properties; @property (nonatomic, retain) id userData; #pragma mark Payload @@ -563,7 +628,7 @@ typedef BOOL (^GTLServiceRetryBlock)(GTLServiceTicket *ticket, BOOL suggestedWil @property (nonatomic, retain) id originalQuery; // Query used to create this ticket - (GTLQuery *)queryForRequestID:(NSString *)requestID GTL_NONNULL((1)); // Returns the query from within the batch with the given id. -@property (nonatomic, retain) NSDictionary *surrogates; +@property (nonatomic, retain) GTL_NSDictionaryOf(Class, Class) *surrogates; #pragma mark Retry diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Objects/GTLService.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Objects/GTLService.m similarity index 85% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Objects/GTLService.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Objects/GTLService.m index c1ea50107..b9e497229 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Objects/GTLService.m +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Objects/GTLService.m @@ -79,6 +79,17 @@ - (id)ticket { } @end +#if !defined(GTL_HAS_SESSION_UPLOAD_FETCHER_IMPORT) +#define GTL_HAS_SESSION_UPLOAD_FETCHER_IMPORT 0 +#endif + +#if GTL_HAS_SESSION_UPLOAD_FETCHER_IMPORT +#if GTL_USE_FRAMEWORK_IMPORTS + #import +#else + #import "GTMSessionUploadFetcher.h" +#endif // GTL_USE_FRAMEWORK_IMPORTS +#else // If the upload fetcher class is available, it can be used for chunked uploads // // We locally declare some methods of the upload fetcher so we @@ -123,6 +134,7 @@ - (void)pauseFetching; - (void)resumeFetching; - (BOOL)isPaused; @end +#endif // GTL_HAS_SESSION_UPLOAD_FETCHER_IMPORT @interface GTLService () @@ -167,6 +179,10 @@ @interface GTLObject (StandardProperties) @property (retain) NSNumber *nextStartIndex; @end +@interface GTLQuery (StandardProperties) +@property (retain) NSString *fields; +@end + @implementation GTLService @synthesize userAgentAddition = userAgentAddition_, @@ -187,7 +203,8 @@ @implementation GTLService rpcUploadURL = rpcUploadURL_, allowInsecureQueries = allowInsecureQueries_, retryBlock = retryBlock_, - uploadProgressBlock = uploadProgressBlock_; + uploadProgressBlock = uploadProgressBlock_, + testBlock = testBlock_; + (Class)ticketClass { return [GTLServiceTicket class]; @@ -231,12 +248,17 @@ - (void)dealloc { [surrogates_ release]; [uploadProgressBlock_ release]; [retryBlock_ release]; + [testBlock_ release]; [apiKey_ release]; [apiVersion_ release]; [rpcURL_ release]; [rpcUploadURL_ release]; [urlQueryParameters_ release]; [additionalHTTPHeaders_ release]; +#if GTL_USE_SESSION_FETCHER + [delegateQueue_ release]; + [runLoopModes_ release]; +#endif [super dealloc]; } @@ -419,7 +441,7 @@ - (GTLServiceTicket *)fetchObjectWithURL:(NSURL *)targetURL isREST:(BOOL)isREST delegate:(id)delegate didFinishSelector:(SEL)finishedSelector - completionHandler:(id)completionHandler // GTLServiceCompletionHandler + completionHandler:(GTLServiceCompletionHandler)completionHandler executingQuery:(id)query ticket:(GTLServiceTicket *)ticket { @@ -455,8 +477,7 @@ - (GTLServiceTicket *)fetchObjectWithURL:(NSURL *)targetURL if (isREST && [apiKey length] > 0) { NSString *const kDeveloperAPIQueryParamKey = @"key"; NSDictionary *queryParameters; - queryParameters = [NSDictionary dictionaryWithObject:apiKey - forKey:kDeveloperAPIQueryParamKey]; + queryParameters = @{ kDeveloperAPIQueryParamKey : apiKey }; targetURL = [GTLUtilities URLWithString:[targetURL absoluteString] queryParameters:queryParameters]; } @@ -480,8 +501,26 @@ - (GTLServiceTicket *)fetchObjectWithURL:(NSURL *)targetURL ticket.postedObject = bodyObject; ticket.executingQuery = query; - if (ticket.originalQuery == nil) { - ticket.originalQuery = query; + + GTLQuery *originalQuery = (GTLQuery *)ticket.originalQuery; + if (originalQuery == nil) { + originalQuery = (GTLQuery *)query; + ticket.originalQuery = originalQuery; + } + + GTLQueryTestBlock testBlock = originalQuery.testBlock; + if (!testBlock) { + testBlock = self.testBlock; + } + + if (testBlock) { + [self simulateFetchWithTicket:ticket + testBlock:testBlock + dataToPost:dataToPost + delegate:delegate + didFinishSelector:finishedSelector + completionHandler:completionHandler]; + return ticket; } GTMBridgeFetcherService *fetcherService = self.fetcherService; @@ -635,9 +674,16 @@ - (GTLUploadFetcherClass *)uploadFetcherWithRequest:(NSURLRequest *)request } else if (uploadData) { fetcher.uploadData = uploadData; } else if (uploadFileHandle) { +#if DEBUG + if (uploadParams.useBackgroundSession) { + NSLog(@"Warning: GTLUploadParameters should be supplied an uploadFileURL rather" + @" than a file handle to support background uploads.\n %@", uploadParams); + } +#endif fetcher.uploadFileHandle = uploadFileHandle; } } + fetcher.useBackgroundSession = uploadParams.useBackgroundSession; #else // !GTL_USE_SESSION_FETCHER if (uploadLocationURL) { // Resuming with the session fetcher and a file handle. @@ -744,7 +790,7 @@ - (GTLServiceTicket *)fetchObjectWithMethodNamed:(NSString *)methodName urlQueryParameters:(NSDictionary *)urlQueryParameters delegate:(id)delegate didFinishSelector:(SEL)finishedSelector - completionHandler:(id)completionHandler // GTLServiceCompletionHandler + completionHandler:(GTLServiceCompletionHandler)completionHandler executingQuery:(id)executingQuery ticket:(GTLServiceTicket *)ticket { GTL_DEBUG_ASSERT([methodName length] > 0, @"Got an empty method name"); @@ -766,9 +812,9 @@ - (GTLServiceTicket *)fetchObjectWithMethodNamed:(NSString *)methodName requestID:requestID]; NSError *error = nil; - dataToPost = [GTLJSONParser dataWithObject:rpcPayload - humanReadable:NO - error:&error]; + dataToPost = [NSJSONSerialization dataWithJSONObject:rpcPayload + options:0 + error:&error]; if (dataToPost == nil) { // There is the chance something went into parameters that wasn't valid. GTL_DEBUG_LOG(@"JSON generation error: %@", error); @@ -817,7 +863,7 @@ - (GTLServiceTicket *)fetchObjectWithMethodNamed:(NSString *)methodName - (GTLServiceTicket *)executeBatchQuery:(GTLBatchQuery *)batch delegate:(id)delegate didFinishSelector:(SEL)finishedSelector - completionHandler:(id)completionHandler // GTLServiceCompletionHandler + completionHandler:(GTLServiceCompletionHandler)completionHandler ticket:(GTLServiceTicket *)ticket { GTLBatchQuery *batchCopy = [[batch copy] autorelease]; NSArray *queries = batchCopy.queries; @@ -865,10 +911,9 @@ - (GTLServiceTicket *)executeBatchQuery:(GTLBatchQuery *)batch } NSError *error = nil; - NSData *dataToPost = nil; - dataToPost = [GTLJSONParser dataWithObject:rpcPayloads - humanReadable:NO - error:&error]; + NSData *dataToPost = [NSJSONSerialization dataWithJSONObject:rpcPayloads + options:0 + error:&error]; if (dataToPost == nil) { // There is the chance something went into parameters that wasn't valid. GTL_DEBUG_LOG(@"JSON generation error: %@", error); @@ -936,7 +981,7 @@ - (GTLServiceTicket *)fetchObjectWithURL:(NSURL *)targetURL mayAuthorize:(BOOL)mayAuthorize delegate:(id)delegate didFinishSelector:(SEL)finishedSelector - completionHandler:(id)completionHandler // GTLServiceCompletionHandler + completionHandler:(GTLServiceCompletionHandler)completionHandler 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 @@ -954,15 +999,13 @@ - (GTLServiceTicket *)fetchObjectWithURL:(NSURL *)targetURL NSDictionary *json = bodyObject.JSON; if (isRESTDataWrapperRequired_) { // create the top-level "data" object - NSDictionary *dataDict = [NSDictionary dictionaryWithObject:json - forKey:@"data"]; - whatToSend = dataDict; + whatToSend = @{ @"data" : json }; } else { whatToSend = json; } - dataToPost = [GTLJSONParser dataWithObject:whatToSend - humanReadable:NO - error:&error]; + dataToPost = [NSJSONSerialization dataWithJSONObject:whatToSend + options:0 + error:&error]; if (dataToPost == nil) { GTL_DEBUG_LOG(@"JSON generation error: %@", error); } @@ -1046,8 +1089,10 @@ - (void)objectFetcher:(GTMBridgeFetcher *)fetcher finishedWithData:(NSData *)dat if ([data length] > 0) { if ([contentType hasPrefix:@"application/json"]) { NSError *parseError = nil; - NSMutableDictionary *jsonWrapper = [GTLJSONParser objectWithData:data - error:&parseError]; + NSMutableDictionary *jsonWrapper = + [NSJSONSerialization JSONObjectWithData:data + options:NSJSONReadingMutableContainers + error:&parseError]; if (parseError) { // We could not parse the JSON payload error = parseError; @@ -1062,8 +1107,7 @@ - (void)objectFetcher:(GTMBridgeFetcher *)fetcher finishedWithData:(NSData *)dat // error response visible in the error object. NSString *reasonStr = [[[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding] autorelease]; - NSDictionary *userInfo = [NSDictionary dictionaryWithObject:reasonStr - forKey:NSLocalizedFailureReasonErrorKey]; + NSDictionary *userInfo = @{ NSLocalizedFailureReasonErrorKey : reasonStr }; error = [NSError errorWithDomain:kGTMBridgeFetcherStatusDomain code:status userInfo:userInfo]; @@ -1115,7 +1159,7 @@ - (void)prepareToParseObjectForFetcher:(GTMBridgeFetcher *)fetcher { id executingQuery = ticket.executingQuery; if ([executingQuery isBatchQuery]) { // build a dictionary of expected classes for the batch responses - GTLBatchQuery *batchQuery = executingQuery; + GTLBatchQuery *batchQuery = (GTLBatchQuery *)executingQuery; NSArray *queries = batchQuery.queries; NSDictionary *batchClassMap = [NSMutableDictionary dictionaryWithCapacity:[queries count]]; for (GTLQuery *query in queries) { @@ -1183,8 +1227,10 @@ - (void)parseObjectFromDataOfFetcher:(GTMBridgeFetcher *)fetcher { #endif NSError *parseError = nil; - NSMutableDictionary *jsonWrapper = [GTLJSONParser objectWithData:data - error:&parseError]; + NSMutableDictionary *jsonWrapper = + [NSJSONSerialization JSONObjectWithData:data + options:NSJSONReadingMutableContainers + error:&parseError]; if ([parseOperation isCancelled]) return; if (parseError != nil) { @@ -1226,14 +1272,23 @@ - (void)parseObjectFromDataOfFetcher:(GTMBridgeFetcher *)fetcher { [fetcher setProperty: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 - [fetcher setProperty:error - forKey:kFetcherFetchErrorKey]; + if (errorJSON) { + GTLErrorObject *errorObject = [GTLErrorObject objectWithJSON:errorJSON]; + NSError *error = [errorObject foundationError]; + + // Store the error and let it go to the callback + [fetcher setProperty:error + forKey:kFetcherFetchErrorKey]; + } else { +#if DEBUG && !defined(NS_BLOCK_ASSERTIONS) + id query = ticket.executingQuery; + if ([query respondsToSelector:@selector(fields)]) { + id fields = [query performSelector:@selector(fields)]; + GTL_ASSERT(fields != nil, @"no result or error in response:\n%@", + jsonWrapper); + } +#endif + } } } @@ -1379,43 +1434,10 @@ - (void)handleParsedObjectForFetcher:(GTMBridgeFetcher *)fetcher { 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); - } - } + [self invokeBatchCompletionsWithTicket:ticket + batchQuery:(GTLBatchQuery *)originalQuery + batchResult:(GTLBatchResult *)object + error:error]; } // Release query callback blocks @@ -1442,6 +1464,163 @@ - (void)handleParsedObjectForFetcher:(GTMBridgeFetcher *)fetcher { ticket.uploadProgressBlock = nil; } +- (void)invokeBatchCompletionsWithTicket:(GTLServiceTicket *)ticket + batchQuery:(GTLBatchQuery *)batchQuery + batchResult:(GTLBatchResult *)batchResult + error:(NSError *)error { + // Batch query + // + // We'll step through the queries of the original batch, not of the + // batch result + 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:GTLServiceErrorQueryResultMissing + userInfo:nil]; + } + } + } + completionBlock(ticket, oneResult, oneError); + } + } +} + +- (void)simulateFetchWithTicket:(GTLServiceTicket *)ticket + testBlock:(GTLQueryTestBlock)testBlock + dataToPost:(NSData *)dataToPost + delegate:(id)delegate + didFinishSelector:(SEL)finishedSelector + completionHandler:(GTLServiceCompletionHandler)completionHandler { + + GTLQuery *originalQuery = (GTLQuery *)ticket.originalQuery; + ticket.executingQuery = originalQuery; + + NSOperationQueue *delegateQueue = self.delegateQueue ?: [NSOperationQueue mainQueue]; + + testBlock(ticket, ^(id testObject, NSError *testError) { + [delegateQueue addOperationWithBlock:^{ + if (testError) { + // During simulation, we invoke any retry selector or block, but ignore the result. + const BOOL willRetry = NO; + GTLServiceRetryBlock retryBlock = ticket.retryBlock; + SEL retrySelector = ticket.retrySelector; + if (retrySelector) { + (void)[self invokeRetrySelector:retrySelector + delegate:delegate + ticket:ticket + willRetry:willRetry + error:testError]; + } + + if (retryBlock) { + (void)retryBlock(ticket, willRetry, testError); + } + } else { + // Simulate upload progress, calling back up to three times. + if (ticket.uploadProgressBlock || ticket.uploadProgressSelector) { + GTLQuery *query = (GTLQuery *)ticket.originalQuery; + unsigned long long uploadLength = [self simulatedUploadLengthForQuery:query + dataToPost:dataToPost]; + unsigned long long sendReportSize = uploadLength / 3 + 1; + unsigned long long totalSentSoFar = 0; + while (totalSentSoFar < uploadLength) { + unsigned long long bytesRemaining = uploadLength - totalSentSoFar; + sendReportSize = MIN(sendReportSize, bytesRemaining); + totalSentSoFar += sendReportSize; + + [self invokeProgressCallbackForTicket:ticket + deliveredBytes:(unsigned long long)totalSentSoFar + totalBytes:(unsigned long long)uploadLength]; + } + } + } + + if (![originalQuery isBatchQuery]) { + // Single query + GTLServiceCompletionHandler completionBlock = originalQuery.completionBlock; + if (completionBlock) { + completionBlock(ticket, testObject, testError); + } + } else { + // Batch query + GTL_DEBUG_ASSERT(!testObject || [testObject isKindOfClass:[GTLBatchResult class]], + @"Batch queries should have result objects of type GTLBatchResult (not %@)", + [testObject class]); + + [self invokeBatchCompletionsWithTicket:ticket + batchQuery:(GTLBatchQuery *)originalQuery + batchResult:(GTLBatchResult *)testObject + error:testError]; + } // isBatchQuery + + if (finishedSelector) { + [[self class] invokeCallback:finishedSelector + target:delegate + ticket:ticket + object:testObject + error:testError]; + } + if (completionHandler) { + completionHandler(ticket, testObject, testError); + } + ticket.hasCalledCallback = YES; + + [originalQuery executionDidStop]; + }]; // addOperationWithBlock: + }); // testBlock +} + +- (unsigned long long)simulatedUploadLengthForQuery:(GTLQuery *)query + dataToPost:(NSData *)dataToPost { + // We're uploading the body object and other posted metadata, plus optionally the + // data or file specified in the upload parameters. + unsigned long long uploadLength = [dataToPost length]; + + GTLUploadParameters *uploadParameters = query.uploadParameters; + if (uploadParameters) { + NSData *uploadData = uploadParameters.data; + if (uploadData) { + uploadLength += [uploadData length]; + } else { + NSURL *fileURL = uploadParameters.fileURL; + if (fileURL) { + NSError *fileError = nil; + NSNumber *fileSizeNum = nil; + if ([fileURL getResourceValue:&fileSizeNum + forKey:NSURLFileSizeKey + error:&fileError]) { + uploadLength += [fileSizeNum unsignedLongLongValue]; + } + } else { + NSFileHandle *fileHandle = uploadParameters.fileHandle; + unsigned long long fileLength = [fileHandle seekToEndOfFile]; + uploadLength += fileLength; + } + } + } + return uploadLength; +} + #pragma mark - + (void)invokeCallback:(SEL)callbackSel @@ -1508,38 +1687,6 @@ - (BOOL)invokeRetrySelector:(SEL)retrySelector 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 @@ -1746,12 +1893,18 @@ - (GTLServiceTicket *)executeQuery:(id)queryObj delegate:(id)delegate didFinishSelector:(SEL)finishedSelector { if ([queryObj isBatchQuery]) { - return [self executeBatchQuery:queryObj + GTL_DEBUG_ASSERT([queryObj isKindOfClass:[GTLBatchQuery class]], + @"GTLBatchQuery required for batches (passed %@)", + [queryObj class]); + return [self executeBatchQuery:(GTLBatchQuery *)queryObj delegate:delegate didFinishSelector:finishedSelector completionHandler:NULL ticket:nil]; } + GTL_DEBUG_ASSERT([queryObj isKindOfClass:[GTLQuery class]], + @"GTLQuery required for single queries (passed %@)", + [queryObj class]); GTLQuery *query = [[(GTLQuery *)queryObj copy] autorelease]; NSString *methodName = query.methodName; @@ -1774,12 +1927,18 @@ - (GTLServiceTicket *)executeQuery:(id)queryObj - (GTLServiceTicket *)executeQuery:(id)queryObj completionHandler:(void (^)(GTLServiceTicket *ticket, id object, NSError *error))handler { if ([queryObj isBatchQuery]) { - return [self executeBatchQuery:queryObj + GTL_DEBUG_ASSERT([queryObj isKindOfClass:[GTLBatchQuery class]], + @"GTLBatchQuery required for batches (passed %@)", + [queryObj class]); + return [self executeBatchQuery:(GTLBatchQuery *)queryObj delegate:nil didFinishSelector:NULL completionHandler:handler ticket:nil]; } + GTL_DEBUG_ASSERT([queryObj isKindOfClass:[GTLQuery class]], + @"GTLQuery required for single queries (passed %@)", + [queryObj class]); GTLQuery *query = [[(GTLQuery *)queryObj copy] autorelease]; NSString *methodName = query.methodName; @@ -2089,7 +2248,6 @@ - (NSString *)userAgent { } - (void)setExactUserAgent:(NSString *)userAgent { - // internal use only [userAgent_ release]; userAgent_ = [userAgent copy]; } @@ -2133,30 +2291,36 @@ - (BOOL)shouldFetchInBackground { } - (void)setDelegateQueue:(NSOperationQueue *)delegateQueue { -#if !GTL_USE_SESSION_FETCHER +#if GTL_USE_SESSION_FETCHER + [delegateQueue_ autorelease]; + delegateQueue_ = [delegateQueue retain]; +#else self.fetcherService.delegateQueue = delegateQueue; #endif } - (NSOperationQueue *)delegateQueue { -#if !GTL_USE_SESSION_FETCHER - return self.fetcherService.delegateQueue; +#if GTL_USE_SESSION_FETCHER + return delegateQueue_; #else - return nil; + return self.fetcherService.delegateQueue; #endif } - (void)setRunLoopModes:(NSArray *)array { -#if !GTL_USE_SESSION_FETCHER +#if GTL_USE_SESSION_FETCHER + [runLoopModes_ autorelease]; + runLoopModes_ = [array copy]; +#else self.fetcherService.runLoopModes = array; #endif } - (NSArray *)runLoopModes { -#if !GTL_USE_SESSION_FETCHER - return self.fetcherService.runLoopModes; +#if GTL_USE_SESSION_FETCHER + return runLoopModes_; #else - return nil; + return self.fetcherService.runLoopModes; #endif } @@ -2225,70 +2389,107 @@ - (NSUInteger)serviceUploadChunkSize { - (void)setServiceUploadChunkSize:(NSUInteger)val { if (val == kGTLStandardUploadChunkSize) { - // determine an appropriate upload chunk size for the system + // determine an appropriate upload chunk size for the system. + // The upload server prefers multiples of 256K. + const NSUInteger kMegabyte = 4 * 256 * 1024; -#if GTL_USE_SESSION_FETCHER - BOOL doesSupportSentDataCallback = YES; -#else - BOOL doesSupportSentDataCallback = [GTMHTTPFetcher doesSupportSentDataCallback]; -#endif - if (!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; + // For iPhone, we're balancing an increased upload size with + // limiting the memory used for the upload data buffer. + val = 4 * kMegabyte; #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 + 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 = 25 * kMegabyte; + } 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 = kMegabyte; } +#endif } uploadChunkSize_ = val; } @end +@implementation GTLService (TestingSupport) + ++ (instancetype)mockServiceWithFakedObject:(id)objectOrNil + fakedError:(NSError *)errorOrNil { + GTLService *service = [[GTLService alloc] init]; + service.rpcURL = [NSURL URLWithString:@"https://example.invalid"]; + service.testBlock = ^(GTLServiceTicket *ticket, GTLQueryTestResponse testResponse) { + testResponse(objectOrNil, errorOrNil); + }; + return service; +} + +- (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:GTLServiceErrorWaitTimedOut + userInfo:nil]; + } + + if (outObjectOrNil) *outObjectOrNil = ticket.fetchedObject; + if (outErrorOrNil) *outErrorOrNil = fetchError; + + return (fetchError == nil); +} + +@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_, - retryBlock = retryBlock_; - -+ (id)ticketForService:(GTLService *)service { + 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_, + retryBlock = retryBlock_; + ++ (instancetype)ticketForService:(GTLService *)service { return [[[self alloc] initWithService:service] autorelease]; } -- (id)initWithService:(GTLService *)service { +- (instancetype)initWithService:(GTLService *)service { self = [super init]; if (self) { service_ = [service retain]; @@ -2395,6 +2596,17 @@ - (id)service { return service_; } +- (void)setObjectFetcher:(GTMBridgeFetcher *)fetcher { + [objectFetcher_ autorelease]; + objectFetcher_ = [fetcher retain]; + + [self updateObjectFetcherProgressCallbacks]; +} + +- (GTMBridgeFetcher *)objectFetcher { + return objectFetcher_; +} + - (void)setUserData:(id)userData { [self setProperty:userData forKey:kServiceUserDataPropertyKey]; } @@ -2452,57 +2664,53 @@ - (SEL)uploadProgressSelector { } - (void)setUploadProgressSelector:(SEL)progressSelector { - uploadProgressSelector_ = progressSelector; + if (uploadProgressSelector_ != 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) { -#if GTL_USE_SESSION_FETCHER - __block GTMSessionFetcher *fetcher = [self objectFetcher]; - fetcher.sendProgressBlock = ^(int64_t bytesSent, int64_t totalBytesSent, - int64_t totalBytesExpectedToSend) { - [service_ objectFetcher:fetcher - didSendBytes:(NSInteger)bytesSent - totalBytesSent:(NSInteger)totalBytesSent - totalBytesExpectedToSend:(NSInteger)totalBytesExpectedToSend]; - }; -#else - SEL sentDataSel = @selector(objectFetcher:didSendBytes:totalBytesSent:totalBytesExpectedToSend:); - [[self objectFetcher] setSentDataSelector:sentDataSel]; -#endif + [self updateObjectFetcherProgressCallbacks]; } } +- (GTLServiceUploadProgressBlock)uploadProgressBlock { + return uploadProgressBlock_; +} + - (void)setUploadProgressBlock:(GTLServiceUploadProgressBlock)block { - [uploadProgressBlock_ autorelease]; - uploadProgressBlock_ = [block copy]; + if (uploadProgressBlock_ != block) { + [uploadProgressBlock_ autorelease]; + uploadProgressBlock_ = [block copy]; + + [self updateObjectFetcherProgressCallbacks]; + } +} + +- (void)updateObjectFetcherProgressCallbacks { + // Internal method. Do not override. + GTMBridgeFetcher *fetcher = [self objectFetcher]; - if (uploadProgressBlock_) { - // As above, we need the fetcher to call us back when bytes are sent. #if GTL_USE_SESSION_FETCHER - __block GTMSessionFetcher *fetcher = [self objectFetcher]; - fetcher.sendProgressBlock = ^(int64_t bytesSent, int64_t totalBytesSent, - int64_t totalBytesExpectedToSend) { - [service_ objectFetcher:fetcher - didSendBytes:(NSInteger)bytesSent - totalBytesSent:(NSInteger)totalBytesSent - totalBytesExpectedToSend:(NSInteger)totalBytesExpectedToSend]; - }; + GTMSessionFetcherSendProgressBlock fetcherSentDataBlock = ^(int64_t bytesSent, + int64_t totalBytesSent, + int64_t totalBytesExpectedToSend) { + [service_ objectFetcher:fetcher + didSendBytes:(NSInteger)bytesSent + totalBytesSent:(NSInteger)totalBytesSent + totalBytesExpectedToSend:(NSInteger)totalBytesExpectedToSend]; + }; + + if (uploadProgressSelector_ || uploadProgressBlock_) { + fetcher.sendProgressBlock = fetcherSentDataBlock; + } else { + fetcher.sendProgressBlock = nil; + } #else + if (uploadProgressSelector_ || uploadProgressBlock_) { SEL sentDataSel = @selector(objectFetcher:didSendBytes:totalBytesSent:totalBytesExpectedToSend:); - [[self objectFetcher] setSentDataSelector:sentDataSel]; -#endif + [fetcher setSentDataSelector:sentDataSel]; + } else { + [fetcher setSentDataSelector:NULL]; } -} - -- (GTLServiceUploadProgressBlock)uploadProgressBlock { - return uploadProgressBlock_; +#endif // GTL_USE_SESSION_FETCHER } - (NSInteger)statusCode { diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Objects/GTLUploadParameters.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Objects/GTLUploadParameters.h similarity index 80% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Objects/GTLUploadParameters.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Objects/GTLUploadParameters.h index b436d9b04..45c792afb 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Objects/GTLUploadParameters.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Objects/GTLUploadParameters.h @@ -33,6 +33,7 @@ NSURL *uploadLocationURL_; NSString *slug_; BOOL shouldSendUploadOnly_; + BOOL useBackgroundSession_; } // Uploading requires MIME type and one of @@ -54,13 +55,19 @@ // Uploads may be done without a JSON body in the initial request @property (assign) BOOL shouldSendUploadOnly; +// Uploads will use a background session when uploading via GTMSessionUploadFetcher. +// Default is YES. Since background session fetches are slower than foreground fetches, +// it's reasonable for an application to set this to NO when uploading small data or files. +@property (assign) BOOL useBackgroundSession; + + (instancetype)uploadParametersWithData:(NSData *)data MIMEType:(NSString *)mimeType GTL_NONNULL((1,2)); ++ (instancetype)uploadParametersWithFileURL:(NSURL *)fileURL + MIMEType:(NSString *)mimeType GTL_NONNULL((1,2)); + +// Provided for compatibility only. For files, upload using a file URL, not a file handle. + (instancetype)uploadParametersWithFileHandle:(NSFileHandle *)fileHandle MIMEType:(NSString *)mimeType GTL_NONNULL((1,2)); -+ (instancetype)uploadParametersWithFileURL:(NSURL *)fileHandle - MIMEType:(NSString *)mimeType GTL_NONNULL((1,2)); - @end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Objects/GTLUploadParameters.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Objects/GTLUploadParameters.m similarity index 89% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Objects/GTLUploadParameters.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Objects/GTLUploadParameters.m index 03db6a1b1..d69bbffe0 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Objects/GTLUploadParameters.m +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Objects/GTLUploadParameters.m @@ -29,13 +29,15 @@ @implementation GTLUploadParameters uploadLocationURL = uploadLocationURL_, fileURL = fileURL_, slug = slug_, - shouldSendUploadOnly = shouldSendUploadOnly_; + shouldSendUploadOnly = shouldSendUploadOnly_, + useBackgroundSession = useBackgroundSession_; + (instancetype)uploadParametersWithData:(NSData *)data MIMEType:(NSString *)mimeType { GTLUploadParameters *params = [[[self alloc] init] autorelease]; params.data = data; params.MIMEType = mimeType; + params.useBackgroundSession = YES; return params; } @@ -44,6 +46,7 @@ + (instancetype)uploadParametersWithFileHandle:(NSFileHandle *)fileHandle GTLUploadParameters *params = [[[self alloc] init] autorelease]; params.fileHandle = fileHandle; params.MIMEType = mimeType; + params.useBackgroundSession = YES; return params; } @@ -52,6 +55,7 @@ + (instancetype)uploadParametersWithFileURL:(NSURL *)fileURL GTLUploadParameters *params = [[[self alloc] init] autorelease]; params.fileURL = fileURL; params.MIMEType = mimeType; + params.useBackgroundSession = YES; return params; } @@ -64,6 +68,7 @@ - (id)copyWithZone:(NSZone *)zone { newParams.uploadLocationURL = self.uploadLocationURL; newParams.slug = self.slug; newParams.shouldSendUploadOnly = self.shouldSendUploadOnly; + newParams.useBackgroundSession = self.useBackgroundSession; return newParams; } @@ -78,6 +83,7 @@ - (void)dealloc { [super dealloc]; } +#if DEBUG - (NSString *)description { NSMutableArray *array = [NSMutableArray array]; NSString *str = [NSString stringWithFormat:@"MIMEType:%@", MIMEType_]; @@ -114,10 +120,15 @@ - (NSString *)description { [array addObject:@"shouldSendUploadOnly"]; } + if (useBackgroundSession_) { + [array addObject:@"useBackgroundSession"]; + } + NSString *descStr = [array componentsJoinedByString:@", "]; str = [NSString stringWithFormat:@"%@ %p: {%@}", [self class], self, descStr]; return str; } +#endif @end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLQueryYouTube.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLQueryYouTube.h similarity index 63% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLQueryYouTube.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLQueryYouTube.h index 34f5e0467..8c6e64065 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLQueryYouTube.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLQueryYouTube.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2014 Google Inc. +/* Copyright (c) 2016 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ // Documentation: // https://developers.google.com/youtube/v3 // Classes: -// GTLQueryYouTube (45 custom class methods, 54 custom properties) +// GTLQueryYouTube (71 custom class methods, 71 custom properties) #if GTL_BUILT_AS_FRAMEWORK #import "GTL/GTLQuery.h" @@ -35,16 +35,23 @@ #endif @class GTLYouTubeActivity; +@class GTLYouTubeCaption; @class GTLYouTubeChannel; @class GTLYouTubeChannelBannerResource; @class GTLYouTubeChannelSection; +@class GTLYouTubeComment; +@class GTLYouTubeCommentThread; @class GTLYouTubeInvideoBranding; @class GTLYouTubeLiveBroadcast; +@class GTLYouTubeLiveChatBan; +@class GTLYouTubeLiveChatMessage; +@class GTLYouTubeLiveChatModerator; @class GTLYouTubeLiveStream; @class GTLYouTubePlaylist; @class GTLYouTubePlaylistItem; @class GTLYouTubeSubscription; @class GTLYouTubeVideo; +@class GTLYouTubeVideoAbuseReport; @interface GTLQueryYouTube : GTLQuery @@ -53,68 +60,84 @@ // // Selector specifying which fields to include in a partial response. -@property (copy) NSString *fields; +@property (nonatomic, copy) NSString *fields; // // Method-specific parameters; see the comments below for more information. // -@property (assign) BOOL autoLevels; -@property (copy) NSString *broadcastStatus; -@property (copy) NSString *categoryId; -@property (copy) NSString *channelId; -@property (copy) NSString *channelType; -@property (copy) NSString *chart; -@property (assign) BOOL displaySlate; -@property (copy) NSString *eventType; -@property (copy) NSString *forChannelId; -@property (assign) BOOL forContentOwner; -@property (assign) BOOL forMine; -@property (copy) NSString *forUsername; -@property (copy) NSString *hl; -@property (assign) BOOL home; +@property (nonatomic, copy) NSString *allThreadsRelatedToChannelId; +@property (nonatomic, assign) BOOL autoLevels; +@property (nonatomic, assign) BOOL banAuthor; +@property (nonatomic, copy) NSString *broadcastStatus; +@property (nonatomic, copy) NSString *broadcastType; +@property (nonatomic, copy) NSString *categoryId; +@property (nonatomic, copy) NSString *channelId; +@property (nonatomic, copy) NSString *channelType; +@property (nonatomic, copy) NSString *chart; +@property (nonatomic, assign) BOOL displaySlate; +@property (nonatomic, copy) NSString *eventType; +@property (nonatomic, copy) NSString *filter; +@property (nonatomic, copy) NSString *forChannelId; +@property (nonatomic, assign) BOOL forContentOwner; +@property (nonatomic, assign) BOOL forDeveloper; +@property (nonatomic, assign) BOOL forMine; +@property (nonatomic, copy) NSString *forUsername; +@property (nonatomic, copy) NSString *hl; +@property (nonatomic, assign) BOOL home; // identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). -@property (copy) NSString *identifier; -@property (copy) NSString *locale; -@property (copy) NSString *location; -@property (copy) NSString *locationRadius; -@property (assign) BOOL managedByMe; -@property (assign) NSUInteger maxResults; -@property (assign) BOOL mine; -@property (copy) NSString *myRating; -@property (assign) BOOL mySubscribers; -@property (assign) BOOL notifySubscribers; -@property (assign) unsigned long long offsetTimeMs; -@property (copy) NSString *onBehalfOfContentOwner; -@property (copy) NSString *onBehalfOfContentOwnerChannel; -@property (copy) NSString *order; -@property (copy) NSString *pageToken; -@property (copy) NSString *part; -@property (copy) NSString *playlistId; -@property (retain) GTLDateTime *publishedAfter; -@property (retain) GTLDateTime *publishedBefore; -@property (copy) NSString *q; -@property (copy) NSString *rating; -@property (copy) NSString *regionCode; -@property (copy) NSString *relatedToVideoId; -@property (copy) NSString *safeSearch; -@property (assign) BOOL stabilize; -@property (copy) NSString *streamId; -@property (copy) NSString *topicId; -@property (copy) NSString *type; -@property (copy) NSString *videoCaption; -@property (copy) NSString *videoCategoryId; -@property (copy) NSString *videoDefinition; -@property (copy) NSString *videoDimension; -@property (copy) NSString *videoDuration; -@property (copy) NSString *videoEmbeddable; -@property (copy) NSString *videoId; -@property (copy) NSString *videoLicense; -@property (copy) NSString *videoSyndicated; -@property (copy) NSString *videoType; -@property (retain) GTLDateTime *walltime; - -#pragma mark - -#pragma mark "activities" methods +@property (nonatomic, copy) NSString *identifier; +@property (nonatomic, copy) NSString *liveChatId; +@property (nonatomic, copy) NSString *locale; +@property (nonatomic, copy) NSString *location; +@property (nonatomic, copy) NSString *locationRadius; +@property (nonatomic, assign) BOOL managedByMe; +@property (nonatomic, assign) NSUInteger maxResults; +@property (nonatomic, assign) BOOL mine; +@property (nonatomic, copy) NSString *moderationStatus; +@property (nonatomic, copy) NSString *myRating; +@property (nonatomic, assign) BOOL mySubscribers; +@property (nonatomic, assign) BOOL notifySubscribers; +@property (nonatomic, assign) unsigned long long offsetTimeMs; +@property (nonatomic, copy) NSString *onBehalfOf; +@property (nonatomic, copy) NSString *onBehalfOfContentOwner; +@property (nonatomic, copy) NSString *onBehalfOfContentOwnerChannel; +@property (nonatomic, copy) NSString *order; +@property (nonatomic, copy) NSString *pageToken; +@property (nonatomic, copy) NSString *parentId; +@property (nonatomic, copy) NSString *part; +@property (nonatomic, copy) NSString *playlistId; +@property (nonatomic, assign) NSUInteger profileImageSize; +@property (nonatomic, retain) GTLDateTime *publishedAfter; +@property (nonatomic, retain) GTLDateTime *publishedBefore; +@property (nonatomic, copy) NSString *q; +@property (nonatomic, copy) NSString *rating; +@property (nonatomic, copy) NSString *regionCode; +@property (nonatomic, copy) NSString *relatedToVideoId; +@property (nonatomic, copy) NSString *relevanceLanguage; +@property (nonatomic, retain) GTLYouTubeVideoAbuseReport *report; +@property (nonatomic, copy) NSString *safeSearch; +@property (nonatomic, copy) NSString *searchTerms; +@property (nonatomic, assign) BOOL stabilize; +@property (nonatomic, copy) NSString *streamId; +@property (nonatomic, assign) BOOL sync; +@property (nonatomic, copy) NSString *textFormat; +@property (nonatomic, copy) NSString *tfmt; +@property (nonatomic, copy) NSString *tlang; +@property (nonatomic, copy) NSString *topicId; +@property (nonatomic, copy) NSString *type; +@property (nonatomic, copy) NSString *videoCaption; +@property (nonatomic, copy) NSString *videoCategoryId; +@property (nonatomic, copy) NSString *videoDefinition; +@property (nonatomic, copy) NSString *videoDimension; +@property (nonatomic, copy) NSString *videoDuration; +@property (nonatomic, copy) NSString *videoEmbeddable; +@property (nonatomic, copy) NSString *videoId; +@property (nonatomic, copy) NSString *videoLicense; +@property (nonatomic, copy) NSString *videoSyndicated; +@property (nonatomic, copy) NSString *videoType; +@property (nonatomic, retain) GTLDateTime *walltime; + +#pragma mark - "activities" methods // These create a GTLQueryYouTube object. // Method: youtube.activities.insert @@ -129,13 +152,12 @@ // 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 +// kGTLAuthScopeYouTubeForceSsl // Fetches a GTLYouTubeActivity. -+ (id)queryForActivitiesInsertWithObject:(GTLYouTubeActivity *)object - part:(NSString *)part; ++ (instancetype)queryForActivitiesInsertWithObject:(GTLYouTubeActivity *)object + part:(NSString *)part; // Method: youtube.activities.list // Returns a list of channel activity events that match the request criteria. @@ -144,11 +166,9 @@ // 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. +// activity resource properties that the API response will include. // If the parameter identifies a property that contains child properties, -// the child properties will be included in the response. For example, in a +// the child properties will be included in the response. For example, in an // 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 @@ -184,12 +204,192 @@ // activity feed. // Authorization scope(s): // kGTLAuthScopeYouTube +// kGTLAuthScopeYouTubeForceSsl // kGTLAuthScopeYouTubeReadonly // Fetches a GTLYouTubeActivityListResponse. -+ (id)queryForActivitiesListWithPart:(NSString *)part; ++ (instancetype)queryForActivitiesListWithPart:(NSString *)part; + +#pragma mark - "captions" methods +// These create a GTLQueryYouTube object. + +// Method: youtube.captions.delete +// Deletes a specified caption track. +// Required: +// identifier: The id parameter identifies the caption track that is being +// deleted. The value is a caption track ID as identified by the id property +// in a caption resource. +// Optional: +// onBehalfOf: ID of the Google+ Page for the channel that the request is be +// on behalf of +// onBehalfOfContentOwner: Note: This parameter is intended exclusively for +// YouTube content partners. +// The onBehalfOfContentOwner parameter indicates that the request's +// authorization credentials identify a YouTube CMS user who is acting on +// behalf of the content owner specified in the parameter value. This +// parameter is intended for YouTube content partners that own and manage +// many different YouTube channels. It allows content owners to authenticate +// once and get access to all their video and channel data, without having +// to provide authentication credentials for each individual channel. The +// actual CMS account that the user authenticates with must be linked to the +// specified YouTube content owner. +// Authorization scope(s): +// kGTLAuthScopeYouTubeForceSsl +// kGTLAuthScopeYouTubeYoutubepartner ++ (instancetype)queryForCaptionsDeleteWithIdentifier:(NSString *)identifier; + +// Method: youtube.captions.download +// Downloads a caption track. The caption track is returned in its original +// format unless the request specifies a value for the tfmt parameter and in its +// original language unless the request specifies a value for the tlang +// parameter. +// Required: +// identifier: The id parameter identifies the caption track that is being +// retrieved. The value is a caption track ID as identified by the id +// property in a caption resource. +// Optional: +// onBehalfOf: ID of the Google+ Page for the channel that the request is be +// on behalf of +// onBehalfOfContentOwner: Note: This parameter is intended exclusively for +// YouTube content partners. +// The onBehalfOfContentOwner parameter indicates that the request's +// authorization credentials identify a YouTube CMS user who is acting on +// behalf of the content owner specified in the parameter value. This +// parameter is intended for YouTube content partners that own and manage +// many different YouTube channels. It allows content owners to authenticate +// once and get access to all their video and channel data, without having +// to provide authentication credentials for each individual channel. The +// actual CMS account that the user authenticates with must be linked to the +// specified YouTube content owner. +// tfmt: The tfmt parameter specifies that the caption track should be +// returned in a specific format. If the parameter is not included in the +// request, the track is returned in its original format. +// kGTLYouTubeTfmtSbv: SubViewer subtitle. +// kGTLYouTubeTfmtScc: Scenarist Closed Caption format. +// kGTLYouTubeTfmtSrt: SubRip subtitle. +// kGTLYouTubeTfmtTtml: Timed Text Markup Language caption. +// kGTLYouTubeTfmtVtt: Web Video Text Tracks caption. +// tlang: The tlang parameter specifies that the API response should return a +// translation of the specified caption track. The parameter value is an ISO +// 639-1 two-letter language code that identifies the desired caption +// language. The translation is generated by using machine translation, such +// as Google Translate. +// Authorization scope(s): +// kGTLAuthScopeYouTubeForceSsl +// kGTLAuthScopeYouTubeYoutubepartner ++ (instancetype)queryForCaptionsDownloadWithIdentifier:(NSString *)identifier; + +// Method: youtube.captions.insert +// Uploads a caption track. +// Required: +// part: The part parameter specifies the caption resource parts that the API +// response will include. Set the parameter value to snippet. +// Optional: +// onBehalfOf: ID of the Google+ Page for the channel that the request is be +// on behalf of +// onBehalfOfContentOwner: Note: This parameter is intended exclusively for +// YouTube content partners. +// The onBehalfOfContentOwner parameter indicates that the request's +// authorization credentials identify a YouTube CMS user who is acting on +// behalf of the content owner specified in the parameter value. This +// parameter is intended for YouTube content partners that own and manage +// many different YouTube channels. It allows content owners to authenticate +// once and get access to all their video and channel data, without having +// to provide authentication credentials for each individual channel. The +// actual CMS account that the user authenticates with must be linked to the +// specified YouTube content owner. +// sync: The sync parameter indicates whether YouTube should automatically +// synchronize the caption file with the audio track of the video. If you +// set the value to true, YouTube will disregard any time codes that are in +// the uploaded caption file and generate new time codes for the captions. +// You should set the sync parameter to true if you are uploading a +// transcript, which has no time codes, or if you suspect the time codes in +// your file are incorrect and want YouTube to try to fix them. +// Upload Parameters: +// Maximum size: 100MB +// Accepted MIME type(s): */*, application/octet-stream, text/xml +// Authorization scope(s): +// kGTLAuthScopeYouTubeForceSsl +// kGTLAuthScopeYouTubeYoutubepartner +// Fetches a GTLYouTubeCaption. ++ (instancetype)queryForCaptionsInsertWithObject:(GTLYouTubeCaption *)object + part:(NSString *)part + uploadParameters:(GTLUploadParameters *)uploadParametersOrNil; + +// Method: youtube.captions.list +// Returns a list of caption tracks that are associated with a specified video. +// Note that the API response does not contain the actual captions and that the +// captions.download method provides the ability to retrieve a caption track. +// Required: +// part: The part parameter specifies a comma-separated list of one or more +// caption resource parts that the API response will include. The part names +// that you can include in the parameter value are id and snippet. +// videoId: The videoId parameter specifies the YouTube video ID of the video +// for which the API should return caption tracks. +// Optional: +// identifier: The id parameter specifies a comma-separated list of IDs that +// identify the caption resources that should be retrieved. Each ID must +// identify a caption track associated with the specified video. +// onBehalfOf: ID of the Google+ Page for the channel that the request is on +// behalf of. +// onBehalfOfContentOwner: Note: This parameter is intended exclusively for +// YouTube content partners. +// The onBehalfOfContentOwner parameter indicates that the request's +// authorization credentials identify a YouTube CMS user who is acting on +// behalf of the content owner specified in the parameter value. This +// parameter is intended for YouTube content partners that own and manage +// many different YouTube channels. It allows content owners to authenticate +// once and get access to all their video and channel data, without having +// to provide authentication credentials for each individual channel. The +// actual CMS account that the user authenticates with must be linked to the +// specified YouTube content owner. +// Authorization scope(s): +// kGTLAuthScopeYouTubeForceSsl +// kGTLAuthScopeYouTubeYoutubepartner +// Fetches a GTLYouTubeCaptionListResponse. ++ (instancetype)queryForCaptionsListWithPart:(NSString *)part + videoId:(NSString *)videoId; + +// Method: youtube.captions.update +// Updates a caption track. When updating a caption track, you can change the +// track's draft status, upload a new caption file for the track, or both. +// 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. Set the property value +// to snippet if you are updating the track's draft status. Otherwise, set +// the property value to id. +// Optional: +// onBehalfOf: ID of the Google+ Page for the channel that the request is be +// on behalf of +// onBehalfOfContentOwner: Note: This parameter is intended exclusively for +// YouTube content partners. +// The onBehalfOfContentOwner parameter indicates that the request's +// authorization credentials identify a YouTube CMS user who is acting on +// behalf of the content owner specified in the parameter value. This +// parameter is intended for YouTube content partners that own and manage +// many different YouTube channels. It allows content owners to authenticate +// once and get access to all their video and channel data, without having +// to provide authentication credentials for each individual channel. The +// actual CMS account that the user authenticates with must be linked to the +// specified YouTube content owner. +// sync: Note: The API server only processes the parameter value if the +// request contains an updated caption file. +// The sync parameter indicates whether YouTube should automatically +// synchronize the caption file with the audio track of the video. If you +// set the value to true, YouTube will automatically synchronize the caption +// track with the audio track. +// Upload Parameters: +// Maximum size: 100MB +// Accepted MIME type(s): */*, application/octet-stream, text/xml +// Authorization scope(s): +// kGTLAuthScopeYouTubeForceSsl +// kGTLAuthScopeYouTubeYoutubepartner +// Fetches a GTLYouTubeCaption. ++ (instancetype)queryForCaptionsUpdateWithObject:(GTLYouTubeCaption *)object + part:(NSString *)part + uploadParameters:(GTLUploadParameters *)uploadParametersOrNil; -#pragma mark - -#pragma mark "channelBanners" methods +#pragma mark - "channelBanners" methods // These create a GTLQueryYouTube object. // Method: youtube.channelBanners.insert @@ -220,13 +420,13 @@ // Accepted MIME type(s): application/octet-stream, image/jpeg, image/png // Authorization scope(s): // kGTLAuthScopeYouTube +// kGTLAuthScopeYouTubeForceSsl // kGTLAuthScopeYouTubeUpload // Fetches a GTLYouTubeChannelBannerResource. -+ (id)queryForChannelBannersInsertWithObject:(GTLYouTubeChannelBannerResource *)object - uploadParameters:(GTLUploadParameters *)uploadParametersOrNil; ++ (instancetype)queryForChannelBannersInsertWithObject:(GTLYouTubeChannelBannerResource *)object + uploadParameters:(GTLUploadParameters *)uploadParametersOrNil; -#pragma mark - -#pragma mark "channelSections" methods +#pragma mark - "channelSections" methods // These create a GTLQueryYouTube object. // Method: youtube.channelSections.delete @@ -249,8 +449,9 @@ // specified YouTube content owner. // Authorization scope(s): // kGTLAuthScopeYouTube +// kGTLAuthScopeYouTubeForceSsl // kGTLAuthScopeYouTubeYoutubepartner -+ (id)queryForChannelSectionsDeleteWithIdentifier:(NSString *)identifier; ++ (instancetype)queryForChannelSectionsDeleteWithIdentifier:(NSString *)identifier; // Method: youtube.channelSections.insert // Adds a channelSection for the authenticated user's channel. @@ -291,10 +492,11 @@ // credentials for each separate channel. // Authorization scope(s): // kGTLAuthScopeYouTube +// kGTLAuthScopeYouTubeForceSsl // kGTLAuthScopeYouTubeYoutubepartner // Fetches a GTLYouTubeChannelSection. -+ (id)queryForChannelSectionsInsertWithObject:(GTLYouTubeChannelSection *)object - part:(NSString *)part; ++ (instancetype)queryForChannelSectionsInsertWithObject:(GTLYouTubeChannelSection *)object + part:(NSString *)part; // Method: youtube.channelSections.list // Returns channelSection resources that match the API request criteria. @@ -311,6 +513,14 @@ // Optional: // channelId: The channelId parameter specifies a YouTube channel ID. The API // will only return that channel's channelSections. +// hl: The hl parameter indicates that the snippet.localized property values +// in the returned channelSection resources should be in the specified +// language if localized values for that language are available. For +// example, if the API request specifies hl=de, the snippet.localized +// properties in the API response will contain German titles if German +// titles are available. Channel owners can provide localized channel +// section titles using either the channelSections.insert or +// channelSections.update method. // identifier: The id parameter specifies a comma-separated list of the // YouTube channelSection ID(s) for the resource(s) that are being // retrieved. In a channelSection resource, the id property specifies the @@ -330,10 +540,11 @@ // specified YouTube content owner. // Authorization scope(s): // kGTLAuthScopeYouTube +// kGTLAuthScopeYouTubeForceSsl // kGTLAuthScopeYouTubeReadonly // kGTLAuthScopeYouTubeYoutubepartner // Fetches a GTLYouTubeChannelSectionListResponse. -+ (id)queryForChannelSectionsListWithPart:(NSString *)part; ++ (instancetype)queryForChannelSectionsListWithPart:(NSString *)part; // Method: youtube.channelSections.update // Update a channelSection. @@ -357,13 +568,13 @@ // specified YouTube content owner. // Authorization scope(s): // kGTLAuthScopeYouTube +// kGTLAuthScopeYouTubeForceSsl // kGTLAuthScopeYouTubeYoutubepartner // Fetches a GTLYouTubeChannelSection. -+ (id)queryForChannelSectionsUpdateWithObject:(GTLYouTubeChannelSection *)object - part:(NSString *)part; ++ (instancetype)queryForChannelSectionsUpdateWithObject:(GTLYouTubeChannelSection *)object + part:(NSString *)part; -#pragma mark - -#pragma mark "channels" methods +#pragma mark - "channels" methods // These create a GTLQueryYouTube object. // Method: youtube.channels.list @@ -371,9 +582,7 @@ // 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, topicDetails, and invideoPromotion. +// channel resource properties that the API response will include. // 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, @@ -384,50 +593,61 @@ // thereby requesting YouTube channels associated with that category. // forUsername: The forUsername parameter specifies a YouTube username, // thereby requesting the channel associated with that username. +// hl: The hl parameter should be used for filter out the properties that are +// not in the given language. Used for the brandingSettings part. // 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. -// managedByMe: Set this parameter's value to true to instruct the API to only -// return channels managed by the content owner that the -// onBehalfOfContentOwner parameter specifies. The user must be -// authenticated as a CMS account linked to the specified content owner and -// onBehalfOfContentOwner must be provided. +// managedByMe: Note: This parameter is intended exclusively for YouTube +// content partners. +// Set this parameter's value to true to instruct the API to only return +// channels managed by the content owner that the onBehalfOfContentOwner +// parameter specifies. The user must be authenticated as a CMS account +// linked to the specified content owner and onBehalfOfContentOwner must be +// provided. // 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. -// onBehalfOfContentOwner: The onBehalfOfContentOwner parameter indicates that -// the authenticated user is acting on behalf of the content owner specified -// in the parameter value. This parameter is intended for YouTube content -// partners that own and manage many different YouTube channels. It allows -// content owners to authenticate once and get access to all their video and -// channel data, without having to provide authentication credentials for -// each individual channel. The actual CMS account that the user -// authenticates with needs to be linked to the specified YouTube content -// owner. +// mySubscribers: Use the subscriptions.list method and its mySubscribers +// parameter to retrieve a list of subscribers to the authenticated user's +// channel. +// onBehalfOfContentOwner: Note: This parameter is intended exclusively for +// YouTube content partners. +// The onBehalfOfContentOwner parameter indicates that the request's +// authorization credentials identify a YouTube CMS user who is acting on +// behalf of the content owner specified in the parameter value. This +// parameter is intended for YouTube content partners that own and manage +// many different YouTube channels. It allows content owners to authenticate +// once and get access to all their video and channel data, without having +// to provide authentication credentials for each individual channel. The +// CMS account that the user authenticates with must be linked to the +// specified YouTube content owner. // 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 +// kGTLAuthScopeYouTubeForceSsl // kGTLAuthScopeYouTubeReadonly // kGTLAuthScopeYouTubeYoutubepartner // kGTLAuthScopeYouTubeYoutubepartnerChannelAudit // Fetches a GTLYouTubeChannelListResponse. -+ (id)queryForChannelsListWithPart:(NSString *)part; ++ (instancetype)queryForChannelsListWithPart:(NSString *)part; // Method: youtube.channels.update -// Updates a channel's metadata. +// Updates a channel's metadata. Note that this method currently only supports +// updates to the channel resource's brandingSettings and invideoPromotion +// objects and their child properties. // 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 id and -// invideoPromotion. -// Note that this method will override the existing values for all of the +// The API currently only allows the parameter value to be set to either +// brandingSettings or invideoPromotion. (You cannot update both of those +// parts with a single request.) +// Note that this method overrides the existing values for all of the // mutable properties that are contained in any parts that the parameter // value specifies. // Optional: @@ -442,27 +662,257 @@ // owner. // Authorization scope(s): // kGTLAuthScopeYouTube +// kGTLAuthScopeYouTubeForceSsl // kGTLAuthScopeYouTubeYoutubepartner // Fetches a GTLYouTubeChannel. -+ (id)queryForChannelsUpdateWithObject:(GTLYouTubeChannel *)object - part:(NSString *)part; ++ (instancetype)queryForChannelsUpdateWithObject:(GTLYouTubeChannel *)object + part:(NSString *)part; -#pragma mark - -#pragma mark "guideCategories" methods +#pragma mark - "comments" methods +// These create a GTLQueryYouTube object. + +// Method: youtube.comments.delete +// Deletes a comment. +// Required: +// identifier: The id parameter specifies the comment ID for the resource that +// is being deleted. +// Authorization scope(s): +// kGTLAuthScopeYouTubeForceSsl ++ (instancetype)queryForCommentsDeleteWithIdentifier:(NSString *)identifier; + +// Method: youtube.comments.insert +// Creates a reply to an existing comment. Note: To create a top-level comment, +// use the commentThreads.insert method. +// Required: +// part: The part parameter identifies the properties that the API response +// will include. Set the parameter value to snippet. The snippet part has a +// quota cost of 2 units. +// Authorization scope(s): +// kGTLAuthScopeYouTubeForceSsl +// Fetches a GTLYouTubeComment. ++ (instancetype)queryForCommentsInsertWithObject:(GTLYouTubeComment *)object + part:(NSString *)part; + +// Method: youtube.comments.list +// Returns a list of comments that match the API request parameters. +// Required: +// part: The part parameter specifies a comma-separated list of one or more +// comment resource properties that the API response will include. +// Optional: +// identifier: The id parameter specifies a comma-separated list of comment +// IDs for the resources that are being retrieved. In a comment resource, +// the id property specifies the comment's ID. +// maxResults: The maxResults parameter specifies the maximum number of items +// that should be returned in the result set. +// Note: This parameter is not supported for use in conjunction with the id +// parameter. (1..100, default 20) +// pageToken: The pageToken parameter identifies a specific page in the result +// set that should be returned. In an API response, the nextPageToken +// property identifies the next page of the result that can be retrieved. +// Note: This parameter is not supported for use in conjunction with the id +// parameter. +// parentId: The parentId parameter specifies the ID of the comment for which +// replies should be retrieved. +// Note: YouTube currently supports replies only for top-level comments. +// However, replies to replies may be supported in the future. +// textFormat: This parameter indicates whether the API should return comments +// formatted as HTML or as plain text. (Default "FORMAT_HTML") +// kGTLYouTubeTextFormatHtml: Returns the comments in HTML format. This is +// the default value. +// kGTLYouTubeTextFormatPlainText: Returns the comments in plain text +// format. +// Authorization scope(s): +// kGTLAuthScopeYouTubeForceSsl +// Fetches a GTLYouTubeCommentListResponse. ++ (instancetype)queryForCommentsListWithPart:(NSString *)part; + +// Method: youtube.comments.markAsSpam +// Expresses the caller's opinion that one or more comments should be flagged as +// spam. +// Required: +// identifier: The id parameter specifies a comma-separated list of IDs of +// comments that the caller believes should be classified as spam. +// Authorization scope(s): +// kGTLAuthScopeYouTubeForceSsl ++ (instancetype)queryForCommentsMarkAsSpamWithIdentifier:(NSString *)identifier; + +// Method: youtube.comments.setModerationStatus +// Sets the moderation status of one or more comments. The API request must be +// authorized by the owner of the channel or video associated with the comments. +// Required: +// identifier: The id parameter specifies a comma-separated list of IDs that +// identify the comments for which you are updating the moderation status. +// moderationStatus: Identifies the new moderation status of the specified +// comments. +// kGTLYouTubeModerationStatusHeldForReview: Marks a comment as awaiting +// review by a moderator. +// kGTLYouTubeModerationStatusPublished: Clears a comment for public +// display. +// kGTLYouTubeModerationStatusRejected: Rejects a comment as being unfit +// for display. This action also effectively hides all replies to the +// rejected comment. +// Note: The API does not currently provide a way to list or otherwise +// discover rejected comments. However, you can change the moderation +// status of a rejected comment if you still know its ID. If you were to +// change the moderation status of a rejected comment, the comment +// replies would subsequently be discoverable again as well. +// Optional: +// banAuthor: The banAuthor parameter lets you indicate that you want to +// automatically reject any additional comments written by the comment's +// author. Set the parameter value to true to ban the author. +// Note: This parameter is only valid if the moderationStatus parameter is +// also set to rejected. (Default false) +// Authorization scope(s): +// kGTLAuthScopeYouTubeForceSsl ++ (instancetype)queryForCommentsSetModerationStatusWithIdentifier:(NSString *)identifier + moderationStatus:(NSString *)moderationStatus; + +// Method: youtube.comments.update +// Modifies a comment. +// Required: +// part: The part parameter identifies the properties that the API response +// will include. You must at least include the snippet part in the parameter +// value since that part contains all of the properties that the API request +// can update. +// Authorization scope(s): +// kGTLAuthScopeYouTubeForceSsl +// Fetches a GTLYouTubeComment. ++ (instancetype)queryForCommentsUpdateWithObject:(GTLYouTubeComment *)object + part:(NSString *)part; + +#pragma mark - "commentThreads" methods +// These create a GTLQueryYouTube object. + +// Method: youtube.commentThreads.insert +// Creates a new top-level comment. To add a reply to an existing comment, use +// the comments.insert method instead. +// Required: +// part: The part parameter identifies the properties that the API response +// will include. Set the parameter value to snippet. The snippet part has a +// quota cost of 2 units. +// Authorization scope(s): +// kGTLAuthScopeYouTubeForceSsl +// Fetches a GTLYouTubeCommentThread. ++ (instancetype)queryForCommentThreadsInsertWithObject:(GTLYouTubeCommentThread *)object + part:(NSString *)part; + +// Method: youtube.commentThreads.list +// Returns a list of comment threads that match the API request parameters. +// Required: +// part: The part parameter specifies a comma-separated list of one or more +// commentThread resource properties that the API response will include. +// Optional: +// allThreadsRelatedToChannelId: The allThreadsRelatedToChannelId parameter +// instructs the API to return all comment threads associated with the +// specified channel. The response can include comments about the channel or +// about the channel's videos. +// channelId: The channelId parameter instructs the API to return comment +// threads containing comments about the specified channel. (The response +// will not include comments left on videos that the channel uploaded.) +// identifier: The id parameter specifies a comma-separated list of comment +// thread IDs for the resources that should be retrieved. +// maxResults: The maxResults parameter specifies the maximum number of items +// that should be returned in the result set. +// Note: This parameter is not supported for use in conjunction with the id +// parameter. (1..100, default 20) +// moderationStatus: Set this parameter to limit the returned comment threads +// to a particular moderation state. +// Note: This parameter is not supported for use in conjunction with the id +// parameter. (Default "MODERATION_STATUS_PUBLISHED") +// kGTLYouTubeModerationStatusHeldForReview: Retrieve comment threads that +// are awaiting review by a moderator. A comment thread can be included +// in the response if the top-level comment or at least one of the +// replies to that comment are awaiting review. +// kGTLYouTubeModerationStatusLikelySpam: Retrieve comment threads +// classified as likely to be spam. A comment thread can be included in +// the response if the top-level comment or at least one of the replies +// to that comment is considered likely to be spam. +// kGTLYouTubeModerationStatusPublished: Retrieve threads of published +// comments. This is the default value. A comment thread can be included +// in the response if its top-level comment has been published. +// order: The order parameter specifies the order in which the API response +// should list comment threads. Valid values are: +// - time - Comment threads are ordered by time. This is the default +// behavior. +// - relevance - Comment threads are ordered by relevance.Note: This +// parameter is not supported for use in conjunction with the id parameter. +// (Default "true") +// kGTLYouTubeOrderRelevance: Order by relevance. +// kGTLYouTubeOrderTime: Order by time. +// pageToken: The pageToken parameter identifies a specific page in the result +// set that should be returned. In an API response, the nextPageToken +// property identifies the next page of the result that can be retrieved. +// Note: This parameter is not supported for use in conjunction with the id +// parameter. +// searchTerms: The searchTerms parameter instructs the API to limit the API +// response to only contain comments that contain the specified search +// terms. +// Note: This parameter is not supported for use in conjunction with the id +// parameter. +// textFormat: Set this parameter's value to html or plainText to instruct the +// API to return the comments left by users in html formatted or in plain +// text. (Default "FORMAT_HTML") +// kGTLYouTubeTextFormatHtml: Returns the comments in HTML format. This is +// the default value. +// kGTLYouTubeTextFormatPlainText: Returns the comments in plain text +// format. +// videoId: The videoId parameter instructs the API to return comment threads +// associated with the specified video ID. +// Authorization scope(s): +// kGTLAuthScopeYouTubeForceSsl +// Fetches a GTLYouTubeCommentThreadListResponse. ++ (instancetype)queryForCommentThreadsListWithPart:(NSString *)part; + +// Method: youtube.commentThreads.update +// Modifies the top-level comment in a comment thread. +// Required: +// part: The part parameter specifies a comma-separated list of commentThread +// resource properties that the API response will include. You must at least +// include the snippet part in the parameter value since that part contains +// all of the properties that the API request can update. +// Authorization scope(s): +// kGTLAuthScopeYouTubeForceSsl +// Fetches a GTLYouTubeCommentThread. ++ (instancetype)queryForCommentThreadsUpdateWithObject:(GTLYouTubeCommentThread *)object + part:(NSString *)part; + +#pragma mark - "fanFundingEvents" methods +// These create a GTLQueryYouTube object. + +// Method: youtube.fanFundingEvents.list +// Lists fan funding events for a channel. +// Required: +// part: The part parameter specifies the fanFundingEvent resource parts that +// the API response will include. Supported values are id and snippet. +// Optional: +// hl: The hl parameter instructs the API to retrieve localized resource +// metadata for a specific application language that the YouTube website +// supports. The parameter value must be a language code included in the +// list returned by the i18nLanguages.list method. +// If localized resource details are available in that language, the +// resource's snippet.localized object will contain the localized values. +// However, if localized details are not available, the snippet.localized +// object will contain resource details in the resource's default language. +// maxResults: The maxResults parameter specifies the maximum number of items +// that should be returned in the result set. (0..50, default 5) +// 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 +// kGTLAuthScopeYouTubeForceSsl +// kGTLAuthScopeYouTubeReadonly +// Fetches a GTLYouTubeFanFundingEventListResponse. ++ (instancetype)queryForFanFundingEventsListWithPart:(NSString *)part; + +#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. +// part: The part parameter specifies the guideCategory resource properties +// that the API response will include. Set the parameter value to snippet. // Optional: // hl: The hl parameter specifies the language that will be used for text // values in the API response. (Default en-US) @@ -475,60 +925,57 @@ // value is an ISO 3166-1 alpha-2 country code. // Authorization scope(s): // kGTLAuthScopeYouTube +// kGTLAuthScopeYouTubeForceSsl // kGTLAuthScopeYouTubeReadonly // kGTLAuthScopeYouTubeYoutubepartner // Fetches a GTLYouTubeGuideCategoryListResponse. -+ (id)queryForGuideCategoriesListWithPart:(NSString *)part; ++ (instancetype)queryForGuideCategoriesListWithPart:(NSString *)part; -#pragma mark - -#pragma mark "i18nLanguages" methods +#pragma mark - "i18nLanguages" methods // These create a GTLQueryYouTube object. // Method: youtube.i18nLanguages.list -// Returns a list of supported languages. +// Returns a list of application languages that the YouTube website supports. // Required: -// part: The part parameter specifies a comma-separated list of one or more -// i18nLanguage resource properties that the API response will include. The -// part names that you can include in the parameter value are id and -// snippet. +// part: The part parameter specifies the i18nLanguage resource properties +// that the API response will include. Set the parameter value to snippet. // Optional: // hl: The hl parameter specifies the language that should be used for text // values in the API response. (Default en_US) // Authorization scope(s): // kGTLAuthScopeYouTube +// kGTLAuthScopeYouTubeForceSsl // kGTLAuthScopeYouTubeReadonly // kGTLAuthScopeYouTubeYoutubepartner // Fetches a GTLYouTubeI18nLanguageListResponse. -+ (id)queryForI18nLanguagesListWithPart:(NSString *)part; ++ (instancetype)queryForI18nLanguagesListWithPart:(NSString *)part; -#pragma mark - -#pragma mark "i18nRegions" methods +#pragma mark - "i18nRegions" methods // These create a GTLQueryYouTube object. // Method: youtube.i18nRegions.list -// Returns a list of supported regions. +// Returns a list of content regions that the YouTube website supports. // Required: -// part: The part parameter specifies a comma-separated list of one or more -// i18nRegion resource properties that the API response will include. The -// part names that you can include in the parameter value are id and -// snippet. +// part: The part parameter specifies the i18nRegion resource properties that +// the API response will include. Set the parameter value to snippet. // Optional: // hl: The hl parameter specifies the language that should be used for text // values in the API response. (Default en_US) // Authorization scope(s): // kGTLAuthScopeYouTube +// kGTLAuthScopeYouTubeForceSsl // kGTLAuthScopeYouTubeReadonly // kGTLAuthScopeYouTubeYoutubepartner // Fetches a GTLYouTubeI18nRegionListResponse. -+ (id)queryForI18nRegionsListWithPart:(NSString *)part; ++ (instancetype)queryForI18nRegionsListWithPart:(NSString *)part; -#pragma mark - -#pragma mark "liveBroadcasts" methods +#pragma mark - "liveBroadcasts" methods // These create a GTLQueryYouTube object. // Method: youtube.liveBroadcasts.bind // Binds a YouTube broadcast to a stream or removes an existing binding between -// a broadcast and a stream. A broadcast can only be bound to one video stream. +// a broadcast and a stream. A broadcast can only be bound to one video stream, +// though a video stream may be bound to more than one broadcast. // Required: // identifier: The id parameter specifies the unique ID of the broadcast that // is being bound to a video stream. @@ -571,9 +1018,10 @@ // video stream. // Authorization scope(s): // kGTLAuthScopeYouTube +// kGTLAuthScopeYouTubeForceSsl // Fetches a GTLYouTubeLiveBroadcast. -+ (id)queryForLiveBroadcastsBindWithIdentifier:(NSString *)identifier - part:(NSString *)part; ++ (instancetype)queryForLiveBroadcastsBindWithIdentifier:(NSString *)identifier + part:(NSString *)part; // Method: youtube.liveBroadcasts.control // Controls the settings for a slate that can be displayed in the broadcast @@ -633,9 +1081,10 @@ // (YYYY-MM-DDThh:mm:ss.sssZ) format. // Authorization scope(s): // kGTLAuthScopeYouTube +// kGTLAuthScopeYouTubeForceSsl // Fetches a GTLYouTubeLiveBroadcast. -+ (id)queryForLiveBroadcastsControlWithIdentifier:(NSString *)identifier - part:(NSString *)part; ++ (instancetype)queryForLiveBroadcastsControlWithIdentifier:(NSString *)identifier + part:(NSString *)part; // Method: youtube.liveBroadcasts.delete // Deletes a broadcast. @@ -673,7 +1122,8 @@ // credentials for each separate channel. // Authorization scope(s): // kGTLAuthScopeYouTube -+ (id)queryForLiveBroadcastsDeleteWithIdentifier:(NSString *)identifier; +// kGTLAuthScopeYouTubeForceSsl ++ (instancetype)queryForLiveBroadcastsDeleteWithIdentifier:(NSString *)identifier; // Method: youtube.liveBroadcasts.insert // Creates a broadcast. @@ -714,9 +1164,10 @@ // credentials for each separate channel. // Authorization scope(s): // kGTLAuthScopeYouTube +// kGTLAuthScopeYouTubeForceSsl // Fetches a GTLYouTubeLiveBroadcast. -+ (id)queryForLiveBroadcastsInsertWithObject:(GTLYouTubeLiveBroadcast *)object - part:(NSString *)part; ++ (instancetype)queryForLiveBroadcastsInsertWithObject:(GTLYouTubeLiveBroadcast *)object + part:(NSString *)part; // Method: youtube.liveBroadcasts.list // Returns a list of YouTube broadcasts that match the API request parameters. @@ -734,6 +1185,12 @@ // ended. // kGTLYouTubeBroadcastStatusUpcoming: Return broadcasts that have not yet // started. +// broadcastType: The broadcastType parameter filters the API response to only +// include broadcasts with the specified type. This is only compatible with +// the mine filter for now. (Default "BROADCAST_TYPE_FILTER_EVENT") +// kGTLYouTubeBroadcastTypeAll: Return all broadcasts. +// kGTLYouTubeBroadcastTypeEvent: Return only scheduled event broadcasts. +// kGTLYouTubeBroadcastTypePersistent: Return only persistent broadcasts. // identifier: The id parameter specifies a comma-separated list of YouTube // broadcast IDs that identify the broadcasts being retrieved. In a // liveBroadcast resource, the id property specifies the broadcast's ID. @@ -775,9 +1232,10 @@ // prevPageToken properties identify other pages that could be retrieved. // Authorization scope(s): // kGTLAuthScopeYouTube +// kGTLAuthScopeYouTubeForceSsl // kGTLAuthScopeYouTubeReadonly // Fetches a GTLYouTubeLiveBroadcastListResponse. -+ (id)queryForLiveBroadcastsListWithPart:(NSString *)part; ++ (instancetype)queryForLiveBroadcastsListWithPart:(NSString *)part; // Method: youtube.liveBroadcasts.transition // Changes the status of a YouTube live broadcast and initiates any processes @@ -838,10 +1296,11 @@ // credentials for each separate channel. // Authorization scope(s): // kGTLAuthScopeYouTube +// kGTLAuthScopeYouTubeForceSsl // Fetches a GTLYouTubeLiveBroadcast. -+ (id)queryForLiveBroadcastsTransitionWithBroadcastStatus:(NSString *)broadcastStatus - identifier:(NSString *)identifier - part:(NSString *)part; ++ (instancetype)queryForLiveBroadcastsTransitionWithBroadcastStatus:(NSString *)broadcastStatus + identifier:(NSString *)identifier + part:(NSString *)part; // Method: youtube.liveBroadcasts.update // Updates a broadcast. For example, you could modify the broadcast settings @@ -892,12 +1351,146 @@ // credentials for each separate channel. // Authorization scope(s): // kGTLAuthScopeYouTube +// kGTLAuthScopeYouTubeForceSsl // Fetches a GTLYouTubeLiveBroadcast. -+ (id)queryForLiveBroadcastsUpdateWithObject:(GTLYouTubeLiveBroadcast *)object - part:(NSString *)part; ++ (instancetype)queryForLiveBroadcastsUpdateWithObject:(GTLYouTubeLiveBroadcast *)object + part:(NSString *)part; + +#pragma mark - "liveChatBans" methods +// These create a GTLQueryYouTube object. + +// Method: youtube.liveChatBans.delete +// Removes a chat ban. +// Required: +// identifier: The id parameter identifies the chat ban to remove. The value +// uniquely identifies both the ban and the chat. +// Authorization scope(s): +// kGTLAuthScopeYouTube +// kGTLAuthScopeYouTubeForceSsl ++ (instancetype)queryForLiveChatBansDeleteWithIdentifier:(NSString *)identifier; + +// Method: youtube.liveChatBans.insert +// Adds a new ban to the chat. +// 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 returns. Set the parameter value to +// snippet. +// Authorization scope(s): +// kGTLAuthScopeYouTube +// kGTLAuthScopeYouTubeForceSsl +// Fetches a GTLYouTubeLiveChatBan. ++ (instancetype)queryForLiveChatBansInsertWithObject:(GTLYouTubeLiveChatBan *)object + part:(NSString *)part; + +#pragma mark - "liveChatMessages" methods +// These create a GTLQueryYouTube object. -#pragma mark - -#pragma mark "liveStreams" methods +// Method: youtube.liveChatMessages.delete +// Deletes a chat message. +// Required: +// identifier: The id parameter specifies the YouTube chat message ID of the +// resource that is being deleted. +// Authorization scope(s): +// kGTLAuthScopeYouTube +// kGTLAuthScopeYouTubeForceSsl ++ (instancetype)queryForLiveChatMessagesDeleteWithIdentifier:(NSString *)identifier; + +// Method: youtube.liveChatMessages.insert +// Adds a message to a live chat. +// Required: +// part: The part parameter serves two purposes. It identifies the properties +// that the write operation will set as well as the properties that the API +// response will include. Set the parameter value to snippet. +// Authorization scope(s): +// kGTLAuthScopeYouTube +// kGTLAuthScopeYouTubeForceSsl +// Fetches a GTLYouTubeLiveChatMessage. ++ (instancetype)queryForLiveChatMessagesInsertWithObject:(GTLYouTubeLiveChatMessage *)object + part:(NSString *)part; + +// Method: youtube.liveChatMessages.list +// Lists live chat messages for a specific chat. +// Required: +// liveChatId: The liveChatId parameter specifies the ID of the chat whose +// messages will be returned. +// part: The part parameter specifies the liveChatComment resource parts that +// the API response will include. Supported values are id and snippet. +// Optional: +// hl: The hl parameter instructs the API to retrieve localized resource +// metadata for a specific application language that the YouTube website +// supports. The parameter value must be a language code included in the +// list returned by the i18nLanguages.list method. +// If localized resource details are available in that language, the +// resource's snippet.localized object will contain the localized values. +// However, if localized details are not available, the snippet.localized +// object will contain resource details in the resource's default language. +// maxResults: The maxResults parameter specifies the maximum number of +// messages that should be returned in the result set. (200..2000, default +// 500) +// pageToken: The pageToken parameter identifies a specific page in the result +// set that should be returned. In an API response, the nextPageToken +// property identify other pages that could be retrieved. +// profileImageSize: The profileImageSize parameter specifies the size of the +// user profile pictures that should be returned in the result set. Default: +// 88. (16..720) +// Authorization scope(s): +// kGTLAuthScopeYouTube +// kGTLAuthScopeYouTubeForceSsl +// kGTLAuthScopeYouTubeReadonly +// Fetches a GTLYouTubeLiveChatMessageListResponse. ++ (instancetype)queryForLiveChatMessagesListWithLiveChatId:(NSString *)liveChatId + part:(NSString *)part; + +#pragma mark - "liveChatModerators" methods +// These create a GTLQueryYouTube object. + +// Method: youtube.liveChatModerators.delete +// Removes a chat moderator. +// Required: +// identifier: The id parameter identifies the chat moderator to remove. The +// value uniquely identifies both the moderator and the chat. +// Authorization scope(s): +// kGTLAuthScopeYouTube +// kGTLAuthScopeYouTubeForceSsl ++ (instancetype)queryForLiveChatModeratorsDeleteWithIdentifier:(NSString *)identifier; + +// Method: youtube.liveChatModerators.insert +// Adds a new moderator for the chat. +// 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 returns. Set the parameter value to +// snippet. +// Authorization scope(s): +// kGTLAuthScopeYouTube +// kGTLAuthScopeYouTubeForceSsl +// Fetches a GTLYouTubeLiveChatModerator. ++ (instancetype)queryForLiveChatModeratorsInsertWithObject:(GTLYouTubeLiveChatModerator *)object + part:(NSString *)part; + +// Method: youtube.liveChatModerators.list +// Lists moderators for a live chat. +// Required: +// liveChatId: The liveChatId parameter specifies the YouTube live chat for +// which the API should return moderators. +// part: The part parameter specifies the liveChatModerator resource parts +// that the API response will include. Supported values are id and snippet. +// Optional: +// maxResults: The maxResults parameter specifies the maximum number of items +// that should be returned in the result set. (0..50, default 5) +// 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 +// kGTLAuthScopeYouTubeForceSsl +// kGTLAuthScopeYouTubeReadonly +// Fetches a GTLYouTubeLiveChatModeratorListResponse. ++ (instancetype)queryForLiveChatModeratorsListWithLiveChatId:(NSString *)liveChatId + part:(NSString *)part; + +#pragma mark - "liveStreams" methods // These create a GTLQueryYouTube object. // Method: youtube.liveStreams.delete @@ -936,7 +1529,8 @@ // credentials for each separate channel. // Authorization scope(s): // kGTLAuthScopeYouTube -+ (id)queryForLiveStreamsDeleteWithIdentifier:(NSString *)identifier; +// kGTLAuthScopeYouTubeForceSsl ++ (instancetype)queryForLiveStreamsDeleteWithIdentifier:(NSString *)identifier; // Method: youtube.liveStreams.insert // Creates a video stream. The stream enables you to send your video to YouTube, @@ -978,9 +1572,10 @@ // credentials for each separate channel. // Authorization scope(s): // kGTLAuthScopeYouTube +// kGTLAuthScopeYouTubeForceSsl // Fetches a GTLYouTubeLiveStream. -+ (id)queryForLiveStreamsInsertWithObject:(GTLYouTubeLiveStream *)object - part:(NSString *)part; ++ (instancetype)queryForLiveStreamsInsertWithObject:(GTLYouTubeLiveStream *)object + part:(NSString *)part; // Method: youtube.liveStreams.list // Returns a list of video streams that match the API request parameters. @@ -994,8 +1589,7 @@ // stream IDs that identify the streams being retrieved. In a liveStream // resource, the id property specifies the stream's ID. // maxResults: The maxResults parameter specifies the maximum number of items -// that should be returned in the result set. Acceptable values are 0 to 50, -// inclusive. The default value is 5. (0..50, default 5) +// that should be returned in the result set. (0..50, default 5) // mine: The mine parameter can be used to instruct the API to only return // streams owned by the authenticated user. Set the parameter value to true // to only retrieve your own streams. @@ -1032,9 +1626,10 @@ // prevPageToken properties identify other pages that could be retrieved. // Authorization scope(s): // kGTLAuthScopeYouTube +// kGTLAuthScopeYouTubeForceSsl // kGTLAuthScopeYouTubeReadonly // Fetches a GTLYouTubeLiveStreamListResponse. -+ (id)queryForLiveStreamsListWithPart:(NSString *)part; ++ (instancetype)queryForLiveStreamsListWithPart:(NSString *)part; // Method: youtube.liveStreams.update // Updates a video stream. If the properties that you want to change cannot be @@ -1080,12 +1675,12 @@ // credentials for each separate channel. // Authorization scope(s): // kGTLAuthScopeYouTube +// kGTLAuthScopeYouTubeForceSsl // Fetches a GTLYouTubeLiveStream. -+ (id)queryForLiveStreamsUpdateWithObject:(GTLYouTubeLiveStream *)object - part:(NSString *)part; ++ (instancetype)queryForLiveStreamsUpdateWithObject:(GTLYouTubeLiveStream *)object + part:(NSString *)part; -#pragma mark - -#pragma mark "playlistItems" methods +#pragma mark - "playlistItems" methods // These create a GTLQueryYouTube object. // Method: youtube.playlistItems.delete @@ -1096,8 +1691,9 @@ // property specifies the playlist item's ID. // Authorization scope(s): // kGTLAuthScopeYouTube +// kGTLAuthScopeYouTubeForceSsl // kGTLAuthScopeYouTubeYoutubepartner -+ (id)queryForPlaylistItemsDeleteWithIdentifier:(NSString *)identifier; ++ (instancetype)queryForPlaylistItemsDeleteWithIdentifier:(NSString *)identifier; // Method: youtube.playlistItems.insert // Adds a resource to a playlist. @@ -1105,8 +1701,6 @@ // 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, and status. // Optional: // onBehalfOfContentOwner: Note: This parameter is intended exclusively for // YouTube content partners. @@ -1121,10 +1715,11 @@ // specified YouTube content owner. // Authorization scope(s): // kGTLAuthScopeYouTube +// kGTLAuthScopeYouTubeForceSsl // kGTLAuthScopeYouTubeYoutubepartner // Fetches a GTLYouTubePlaylistItem. -+ (id)queryForPlaylistItemsInsertWithObject:(GTLYouTubePlaylistItem *)object - part:(NSString *)part; ++ (instancetype)queryForPlaylistItemsInsertWithObject:(GTLYouTubePlaylistItem *)object + part:(NSString *)part; // Method: youtube.playlistItems.list // Returns a collection of playlist items that match the API request parameters. @@ -1132,9 +1727,7 @@ // 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, -// contentDetails, and status. +// playlistItem resource properties that the API response will include. // 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, @@ -1169,10 +1762,11 @@ // only the playlist items that contain the specified video. // Authorization scope(s): // kGTLAuthScopeYouTube +// kGTLAuthScopeYouTubeForceSsl // kGTLAuthScopeYouTubeReadonly // kGTLAuthScopeYouTubeYoutubepartner // Fetches a GTLYouTubePlaylistItemListResponse. -+ (id)queryForPlaylistItemsListWithPart:(NSString *)part; ++ (instancetype)queryForPlaylistItemsListWithPart:(NSString *)part; // Method: youtube.playlistItems.update // Modifies a playlist item. For example, you could update the item's position @@ -1181,8 +1775,6 @@ // 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, 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 item can specify a start time @@ -1196,13 +1788,13 @@ // settings. // Authorization scope(s): // kGTLAuthScopeYouTube +// kGTLAuthScopeYouTubeForceSsl // kGTLAuthScopeYouTubeYoutubepartner // Fetches a GTLYouTubePlaylistItem. -+ (id)queryForPlaylistItemsUpdateWithObject:(GTLYouTubePlaylistItem *)object - part:(NSString *)part; ++ (instancetype)queryForPlaylistItemsUpdateWithObject:(GTLYouTubePlaylistItem *)object + part:(NSString *)part; -#pragma mark - -#pragma mark "playlists" methods +#pragma mark - "playlists" methods // These create a GTLQueryYouTube object. // Method: youtube.playlists.delete @@ -1225,8 +1817,9 @@ // specified YouTube content owner. // Authorization scope(s): // kGTLAuthScopeYouTube +// kGTLAuthScopeYouTubeForceSsl // kGTLAuthScopeYouTubeYoutubepartner -+ (id)queryForPlaylistsDeleteWithIdentifier:(NSString *)identifier; ++ (instancetype)queryForPlaylistsDeleteWithIdentifier:(NSString *)identifier; // Method: youtube.playlists.insert // Creates a playlist. @@ -1234,8 +1827,6 @@ // 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. // Optional: // onBehalfOfContentOwner: Note: This parameter is intended exclusively for // YouTube content partners. @@ -1267,10 +1858,11 @@ // credentials for each separate channel. // Authorization scope(s): // kGTLAuthScopeYouTube +// kGTLAuthScopeYouTubeForceSsl // kGTLAuthScopeYouTubeYoutubepartner // Fetches a GTLYouTubePlaylist. -+ (id)queryForPlaylistsInsertWithObject:(GTLYouTubePlaylist *)object - part:(NSString *)part; ++ (instancetype)queryForPlaylistsInsertWithObject:(GTLYouTubePlaylist *)object + part:(NSString *)part; // Method: youtube.playlists.list // Returns a collection of playlists that match the API request parameters. For @@ -1278,9 +1870,7 @@ // 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, -// status, and contentDetails. +// playlist resource properties that the API response will include. // 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, @@ -1289,6 +1879,8 @@ // Optional: // channelId: This value indicates that the API should only return the // specified channel's playlists. +// hl: The hl parameter should be used for filter out the properties that are +// not in the given language. Used for the snippet part. // 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 @@ -1330,10 +1922,11 @@ // prevPageToken properties identify other pages that could be retrieved. // Authorization scope(s): // kGTLAuthScopeYouTube +// kGTLAuthScopeYouTubeForceSsl // kGTLAuthScopeYouTubeReadonly // kGTLAuthScopeYouTubeYoutubepartner // Fetches a GTLYouTubePlaylistListResponse. -+ (id)queryForPlaylistsListWithPart:(NSString *)part; ++ (instancetype)queryForPlaylistsListWithPart:(NSString *)part; // Method: youtube.playlists.update // Modifies a playlist. For example, you could change a playlist's title, @@ -1342,17 +1935,12 @@ // 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. +// Note that this method will override the existing values for mutable +// properties that are contained in any parts that the request body +// specifies. For example, a playlist's description is contained in the +// snippet part, which must be included in the request body. If the request +// does not specify a value for the snippet.description property, the +// playlist's existing description will be deleted. // Optional: // onBehalfOfContentOwner: Note: This parameter is intended exclusively for // YouTube content partners. @@ -1367,13 +1955,13 @@ // specified YouTube content owner. // Authorization scope(s): // kGTLAuthScopeYouTube +// kGTLAuthScopeYouTubeForceSsl // kGTLAuthScopeYouTubeYoutubepartner // Fetches a GTLYouTubePlaylist. -+ (id)queryForPlaylistsUpdateWithObject:(GTLYouTubePlaylist *)object - part:(NSString *)part; ++ (instancetype)queryForPlaylistsUpdateWithObject:(GTLYouTubePlaylist *)object + part:(NSString *)part; -#pragma mark - -#pragma mark "search" methods +#pragma mark - "search" methods // These create a GTLQueryYouTube object. // Method: youtube.search.list @@ -1383,14 +1971,8 @@ // 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. +// search resource properties that the API response will include. Set the +// parameter value to snippet. // Optional: // channelId: The channelId parameter indicates that the API response should // only contain resources created by the channel @@ -1399,6 +1981,8 @@ // kGTLYouTubeChannelTypeAny: Return all channels. // kGTLYouTubeChannelTypeShow: Only retrieve shows. // eventType: The eventType parameter restricts a search to broadcast events. +// If you specify a value for this parameter, you must also set the type +// parameter's value to video. // kGTLYouTubeEventTypeCompleted: Only include completed broadcasts. // kGTLYouTubeEventTypeLive: Only include active broadcasts. // kGTLYouTubeEventTypeUpcoming: Only include upcoming broadcasts. @@ -1409,21 +1993,35 @@ // onBehalfOfContentOwner parameter. The user must be authenticated using a // CMS account linked to the specified content owner and // onBehalfOfContentOwner must be provided. +// forDeveloper: The forDeveloper parameter restricts the search to only +// retrieve videos uploaded via the developer's application or website. The +// API server uses the request's authorization credentials to identify the +// developer. Therefore, a developer can restrict results to videos uploaded +// through the developer's own app or website but not to videos uploaded +// through other apps or sites. // forMine: The forMine parameter restricts the search to only retrieve videos // owned by the authenticated user. If you set this parameter to true, then // the type parameter's value must also be set to video. -// location: The location parameter restricts a search to videos that have a -// geographical location specified in their metadata. The value is a string -// that specifies geographic latitude/longitude coordinates e.g. -// (37.42307,-122.08427) -// locationRadius: The locationRadius, in conjunction with the location -// parameter, defines a geographic area. If the geographic coordinates -// associated with a video fall within that area, then the video may be -// included in search results. This parameter value must be a floating point -// number followed by a measurement unit. Valid measurement units are m, km, -// ft, and mi. For example, valid parameter values include 1500m, 5km, -// 10000ft, and 0.75mi. The API does not support locationRadius parameter -// values larger than 1000 kilometers. +// location: The location parameter, in conjunction with the locationRadius +// parameter, defines a circular geographic area and also restricts a search +// to videos that specify, in their metadata, a geographic location that +// falls within that area. The parameter value is a string that specifies +// latitude/longitude coordinates e.g. (37.42307,-122.08427). +// - The location parameter value identifies the point at the center of the +// area. +// - The locationRadius parameter specifies the maximum distance that the +// location associated with a video can be from that point for the video to +// still be included in the search results.The API returns an error if your +// request specifies a value for the location parameter but does not also +// specify a value for the locationRadius parameter. +// locationRadius: The locationRadius parameter, in conjunction with the +// location parameter, defines a circular geographic area. +// The parameter value must be a floating point number followed by a +// measurement unit. Valid measurement units are m, km, ft, and mi. For +// example, valid parameter values include 1500m, 5km, 10000ft, and 0.75mi. +// The API does not support locationRadius parameter values larger than 1000 +// kilometers. +// Note: See the definition of the location parameter for more information. // maxResults: The maxResults parameter specifies the maximum number of items // that should be returned in the result set. (0..50, default 5) // onBehalfOfContentOwner: Note: This parameter is intended exclusively for @@ -1462,6 +2060,14 @@ // The value is an RFC 3339 formatted date-time value // (1970-01-01T00:00:00Z). // q: The q parameter specifies the query term to search for. +// Your request can also use the Boolean NOT (-) and OR (|) operators to +// exclude videos or to find videos that are associated with one of several +// search terms. For example, to search for videos matching either "boating" +// or "sailing", set the q parameter value to boating|sailing. Similarly, to +// search for videos matching either "boating" or "sailing" but not +// "fishing", set the q parameter value to boating|sailing -fishing. Note +// that the pipe character must be URL-escaped when it is sent in your API +// request. The URL-escaped value for the pipe character is %7C. // regionCode: The regionCode parameter instructs the API to return search // results for the specified country. The parameter value is an ISO 3166-1 // alpha-2 country code. @@ -1469,6 +2075,13 @@ // 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. +// relevanceLanguage: The relevanceLanguage parameter instructs the API to +// return search results that are most relevant to the specified language. +// The parameter value is typically an ISO 639-1 two-letter language code. +// However, you should use the values zh-Hans for simplified Chinese and +// zh-Hant for traditional Chinese. Please note that results in other +// languages will still be returned if they are highly relevant to the +// search query term. // safeSearch: The safeSearch parameter indicates whether the search results // should include restricted content as well as standard content. // kGTLYouTubeSafeSearchModerate: YouTube will filter some content from @@ -1489,7 +2102,9 @@ // particular type of resource. The value is a comma-separated list of // resource types. (Default video,channel,playlist) // videoCaption: The videoCaption parameter indicates whether the API should -// filter video search results based on whether they have captions. +// filter video search results based on whether they have captions. If you +// specify a value for this parameter, you must also set the type +// parameter's value to video. // kGTLYouTubeVideoCaptionAny: Do not filter results based on caption // availability. // kGTLYouTubeVideoCaptionClosedCaption: Only include videos that have @@ -1497,18 +2112,22 @@ // kGTLYouTubeVideoCaptionNone: Only include videos that do not have // captions. // videoCategoryId: The videoCategoryId parameter filters video search results -// based on their category. +// based on their category. If you specify a value for this parameter, you +// must also set the type parameter's value to video. // 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. +// higher resolutions, like 1080p, might also be available. If you specify a +// value for this parameter, you must also set the type parameter's value to +// video. // 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. +// only retrieve 2D or 3D videos. If you specify a value for this parameter, +// you must also set the type parameter's value to video. // kGTLYouTubeVideoDimensionX2d: Restrict search results to exclude 3D // videos. // kGTLYouTubeVideoDimensionX3d: Restrict search results to only include 3D @@ -1516,7 +2135,8 @@ // 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. +// based on their duration. If you specify a value for this parameter, you +// must also set the type parameter's value to video. // kGTLYouTubeVideoDurationAny: Do not filter video search results based on // their duration. This is the default value. // kGTLYouTubeVideoDurationLong: Only include videos longer than 20 @@ -1526,13 +2146,16 @@ // kGTLYouTubeVideoDurationShort: Only include videos that are less than // four minutes long. // videoEmbeddable: The videoEmbeddable parameter lets you to restrict a -// search to only videos that can be embedded into a webpage. +// search to only videos that can be embedded into a webpage. If you specify +// a value for this parameter, you must also set the type parameter's value +// to video. // kGTLYouTubeVideoEmbeddableAny: Return all videos, embeddable or not. // kGTLYouTubeVideoEmbeddableTrue: Only retrieve embeddable videos. // 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. +// YouTube license to each of their videos. If you specify a value for this +// parameter, you must also set the type parameter's value to video. // kGTLYouTubeVideoLicenseAny: Return all videos, regardless of which // license they have, that match the query parameters. // kGTLYouTubeVideoLicenseCreativeCommon: Only return videos that have a @@ -1541,23 +2164,52 @@ // kGTLYouTubeVideoLicenseYoutube: Only return videos that have the // standard YouTube license. // videoSyndicated: The videoSyndicated parameter lets you to restrict a -// search to only videos that can be played outside youtube.com. +// search to only videos that can be played outside youtube.com. If you +// specify a value for this parameter, you must also set the type +// parameter's value to video. // kGTLYouTubeVideoSyndicatedAny: Return all videos, syndicated or not. // kGTLYouTubeVideoSyndicatedTrue: Only retrieve syndicated videos. // videoType: The videoType parameter lets you restrict a search to a -// particular type of videos. +// particular type of videos. If you specify a value for this parameter, you +// must also set the type parameter's value to video. // kGTLYouTubeVideoTypeAny: Return all videos. // kGTLYouTubeVideoTypeEpisode: Only retrieve episodes of shows. // kGTLYouTubeVideoTypeMovie: Only retrieve movies. // Authorization scope(s): // kGTLAuthScopeYouTube +// kGTLAuthScopeYouTubeForceSsl // kGTLAuthScopeYouTubeReadonly // kGTLAuthScopeYouTubeYoutubepartner // Fetches a GTLYouTubeSearchListResponse. -+ (id)queryForSearchListWithPart:(NSString *)part; ++ (instancetype)queryForSearchListWithPart:(NSString *)part; + +#pragma mark - "sponsors" methods +// These create a GTLQueryYouTube object. + +// Method: youtube.sponsors.list +// Lists sponsors for a channel. +// Required: +// part: The part parameter specifies the sponsor resource parts that the API +// response will include. Supported values are id and snippet. +// Optional: +// filter: The filter parameter specifies which channel sponsors to return. +// (Default "POLL_NEWEST") +// kGTLYouTubeFilterAll: Return all sponsors, from newest to oldest. +// kGTLYouTubeFilterNewest: Return the most recent sponsors, from newest to +// oldest. +// maxResults: The maxResults parameter specifies the maximum number of items +// that should be returned in the result set. (0..50, default 5) +// 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 +// kGTLAuthScopeYouTubeForceSsl +// kGTLAuthScopeYouTubeReadonly +// Fetches a GTLYouTubeSponsorListResponse. ++ (instancetype)queryForSponsorsListWithPart:(NSString *)part; -#pragma mark - -#pragma mark "subscriptions" methods +#pragma mark - "subscriptions" methods // These create a GTLQueryYouTube object. // Method: youtube.subscriptions.delete @@ -1568,8 +2220,9 @@ // property specifies the YouTube subscription ID. // Authorization scope(s): // kGTLAuthScopeYouTube +// kGTLAuthScopeYouTubeForceSsl // kGTLAuthScopeYouTubeYoutubepartner -+ (id)queryForSubscriptionsDeleteWithIdentifier:(NSString *)identifier; ++ (instancetype)queryForSubscriptionsDeleteWithIdentifier:(NSString *)identifier; // Method: youtube.subscriptions.insert // Adds a subscription for the authenticated user's channel. @@ -1577,22 +2230,19 @@ // 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 +// kGTLAuthScopeYouTubeForceSsl // kGTLAuthScopeYouTubeYoutubepartner // Fetches a GTLYouTubeSubscription. -+ (id)queryForSubscriptionsInsertWithObject:(GTLYouTubeSubscription *)object - part:(NSString *)part; ++ (instancetype)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. +// subscription resource properties that the API response will include. // 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, @@ -1652,13 +2302,13 @@ // prevPageToken properties identify other pages that could be retrieved. // Authorization scope(s): // kGTLAuthScopeYouTube +// kGTLAuthScopeYouTubeForceSsl // kGTLAuthScopeYouTubeReadonly // kGTLAuthScopeYouTubeYoutubepartner // Fetches a GTLYouTubeSubscriptionListResponse. -+ (id)queryForSubscriptionsListWithPart:(NSString *)part; ++ (instancetype)queryForSubscriptionsListWithPart:(NSString *)part; -#pragma mark - -#pragma mark "thumbnails" methods +#pragma mark - "thumbnails" methods // These create a GTLQueryYouTube object. // Method: youtube.thumbnails.set @@ -1667,38 +2317,59 @@ // videoId: The videoId parameter specifies a YouTube video ID for which the // custom video thumbnail is being provided. // Optional: -// onBehalfOfContentOwner: The onBehalfOfContentOwner parameter indicates that -// the authenticated user is acting on behalf of the content owner specified -// in the parameter value. This parameter is intended for YouTube content -// partners that own and manage many different YouTube channels. It allows -// content owners to authenticate once and get access to all their video and -// channel data, without having to provide authentication credentials for -// each individual channel. The actual CMS account that the user -// authenticates with needs to be linked to the specified YouTube content -// owner. +// onBehalfOfContentOwner: Note: This parameter is intended exclusively for +// YouTube content partners. +// The onBehalfOfContentOwner parameter indicates that the request's +// authorization credentials identify a YouTube CMS user who is acting on +// behalf of the content owner specified in the parameter value. This +// parameter is intended for YouTube content partners that own and manage +// many different YouTube channels. It allows content owners to authenticate +// once and get access to all their video and channel data, without having +// to provide authentication credentials for each individual channel. The +// actual CMS account that the user authenticates with must be linked to the +// specified YouTube content owner. // Upload Parameters: // Maximum size: 2MB // Accepted MIME type(s): application/octet-stream, image/jpeg, image/png // Authorization scope(s): // kGTLAuthScopeYouTube +// kGTLAuthScopeYouTubeForceSsl // kGTLAuthScopeYouTubeUpload // kGTLAuthScopeYouTubeYoutubepartner // Fetches a GTLYouTubeThumbnailSetResponse. -+ (id)queryForThumbnailsSetWithVideoId:(NSString *)videoId - uploadParameters:(GTLUploadParameters *)uploadParametersOrNil; ++ (instancetype)queryForThumbnailsSetWithVideoId:(NSString *)videoId + uploadParameters:(GTLUploadParameters *)uploadParametersOrNil; -#pragma mark - -#pragma mark "videoCategories" methods +#pragma mark - "videoAbuseReportReasons" methods // These create a GTLQueryYouTube object. -// Method: youtube.videoCategories.list -// Returns a list of categories that can be associated with YouTube videos. +// Method: youtube.videoAbuseReportReasons.list +// Returns a list of abuse reasons that can be used for reporting abusive +// 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) +// Authorization scope(s): +// kGTLAuthScopeYouTube +// kGTLAuthScopeYouTubeForceSsl +// kGTLAuthScopeYouTubeReadonly +// Fetches a GTLYouTubeVideoAbuseReportReasonListResponse. ++ (instancetype)queryForVideoAbuseReportReasonsListWithPart:(NSString *)part; + +#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 properties +// that the API response will include. Set the parameter value to 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 @@ -1706,13 +2377,13 @@ // value is an ISO 3166-1 alpha-2 country code. // Authorization scope(s): // kGTLAuthScopeYouTube +// kGTLAuthScopeYouTubeForceSsl // kGTLAuthScopeYouTubeReadonly // kGTLAuthScopeYouTubeYoutubepartner // Fetches a GTLYouTubeVideoCategoryListResponse. -+ (id)queryForVideoCategoriesListWithPart:(NSString *)part; ++ (instancetype)queryForVideoCategoriesListWithPart:(NSString *)part; -#pragma mark - -#pragma mark "videos" methods +#pragma mark - "videos" methods // These create a GTLQueryYouTube object. // Method: youtube.videos.delete @@ -1735,8 +2406,9 @@ // specified YouTube content owner. // Authorization scope(s): // kGTLAuthScopeYouTube +// kGTLAuthScopeYouTubeForceSsl // kGTLAuthScopeYouTubeYoutubepartner -+ (id)queryForVideosDeleteWithIdentifier:(NSString *)identifier; ++ (instancetype)queryForVideosDeleteWithIdentifier:(NSString *)identifier; // Method: youtube.videos.getRating // Retrieves the ratings that the authorized user gave to a list of specified @@ -1760,9 +2432,10 @@ // specified YouTube content owner. // Authorization scope(s): // kGTLAuthScopeYouTube +// kGTLAuthScopeYouTubeForceSsl // kGTLAuthScopeYouTubeYoutubepartner // Fetches a GTLYouTubeVideoGetRatingResponse. -+ (id)queryForVideosGetRatingWithIdentifier:(NSString *)identifier; ++ (instancetype)queryForVideosGetRatingWithIdentifier:(NSString *)identifier; // Method: youtube.videos.insert // Uploads a video to YouTube and optionally sets the video's metadata. @@ -1770,21 +2443,22 @@ // 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, fileDetails, liveStreamingDetails, player, -// processingDetails, recordingDetails, statistics, status, suggestions, 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. +// Note that not all parts contain properties that can be set when inserting +// or updating a video. 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. // Optional: // autoLevels: The autoLevels parameter indicates whether YouTube should // automatically enhance the video's lighting and color. // notifySubscribers: The notifySubscribers parameter indicates whether -// YouTube should send notification to subscribers about the inserted video. -// (Default true) +// YouTube should send a notification about the new video to users who +// subscribe to the video's channel. A parameter value of True indicates +// that subscribers will be notified of newly uploaded videos. However, a +// channel owner who is uploading many videos might prefer to set the value +// to False to avoid sending a notification about each new video to the +// channel's subscribers. (Default true) // onBehalfOfContentOwner: Note: This parameter is intended exclusively for // YouTube content partners. // The onBehalfOfContentOwner parameter indicates that the request's @@ -1820,22 +2494,19 @@ // Accepted MIME type(s): application/octet-stream, video/* // Authorization scope(s): // kGTLAuthScopeYouTube +// kGTLAuthScopeYouTubeForceSsl // kGTLAuthScopeYouTubeUpload // kGTLAuthScopeYouTubeYoutubepartner // Fetches a GTLYouTubeVideo. -+ (id)queryForVideosInsertWithObject:(GTLYouTubeVideo *)object - part:(NSString *)part - uploadParameters:(GTLUploadParameters *)uploadParametersOrNil; ++ (instancetype)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: // 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, fileDetails, liveStreamingDetails, player, -// processingDetails, recordingDetails, statistics, status, suggestions, and -// topicDetails. +// video resource properties that the API response will include. // 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, @@ -1845,6 +2516,14 @@ // chart: The chart parameter identifies the chart that you want to retrieve. // kGTLYouTubeChartMostPopular: Return the most popular videos for the // specified content region and video category. +// hl: The hl parameter instructs the API to retrieve localized resource +// metadata for a specific application language that the YouTube website +// supports. The parameter value must be a language code included in the +// list returned by the i18nLanguages.list method. +// If localized resource details are available in that language, the +// resource's snippet.localized object will contain the localized values. +// However, if localized details are not available, the snippet.localized +// object will contain resource details in the resource's default language. // 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. @@ -1887,10 +2566,11 @@ // not restricted to a particular category. (Default 0) // Authorization scope(s): // kGTLAuthScopeYouTube +// kGTLAuthScopeYouTubeForceSsl // kGTLAuthScopeYouTubeReadonly // kGTLAuthScopeYouTubeYoutubepartner // Fetches a GTLYouTubeVideoListResponse. -+ (id)queryForVideosListWithPart:(NSString *)part; ++ (instancetype)queryForVideosListWithPart:(NSString *)part; // Method: youtube.videos.rate // Add a like or dislike rating to a video or remove a rating from a video. @@ -1904,7 +2584,17 @@ // video. // kGTLYouTubeRatingNone: Removes any rating that the authenticated user // had previously set for the video. +// Authorization scope(s): +// kGTLAuthScopeYouTube +// kGTLAuthScopeYouTubeForceSsl +// kGTLAuthScopeYouTubeYoutubepartner ++ (instancetype)queryForVideosRateWithIdentifier:(NSString *)identifier + rating:(NSString *)rating; + +// Method: youtube.videos.reportAbuse +// Report abuse for a video. // Optional: +// report: GTLYouTubeVideoAbuseReport // onBehalfOfContentOwner: Note: This parameter is intended exclusively for // YouTube content partners. // The onBehalfOfContentOwner parameter indicates that the request's @@ -1918,9 +2608,9 @@ // specified YouTube content owner. // Authorization scope(s): // kGTLAuthScopeYouTube +// kGTLAuthScopeYouTubeForceSsl // kGTLAuthScopeYouTubeYoutubepartner -+ (id)queryForVideosRateWithIdentifier:(NSString *)identifier - rating:(NSString *)rating; ++ (instancetype)queryForVideosReportAbuse; // Method: youtube.videos.update // Updates a video's metadata. @@ -1928,10 +2618,6 @@ // 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, fileDetails, liveStreamingDetails, player, -// processingDetails, recordingDetails, statistics, status, suggestions, 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 @@ -1941,12 +2627,12 @@ // 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. +// In addition, not all parts contain properties that can be set when +// inserting or updating a video. 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. // Optional: // onBehalfOfContentOwner: Note: This parameter is intended exclusively for // YouTube content partners. @@ -1961,59 +2647,65 @@ // specified YouTube content owner. // Authorization scope(s): // kGTLAuthScopeYouTube +// kGTLAuthScopeYouTubeForceSsl // kGTLAuthScopeYouTubeYoutubepartner // Fetches a GTLYouTubeVideo. -+ (id)queryForVideosUpdateWithObject:(GTLYouTubeVideo *)object - part:(NSString *)part; ++ (instancetype)queryForVideosUpdateWithObject:(GTLYouTubeVideo *)object + part:(NSString *)part; -#pragma mark - -#pragma mark "watermarks" methods +#pragma mark - "watermarks" methods // These create a GTLQueryYouTube object. // Method: youtube.watermarks.set // Uploads a watermark image to YouTube and sets it for a channel. // Required: -// channelId: The channelId parameter specifies a YouTube channel ID for which -// the watermark is being provided. +// channelId: The channelId parameter specifies the YouTube channel ID for +// which the watermark is being provided. // Optional: -// onBehalfOfContentOwner: The onBehalfOfContentOwner parameter indicates that -// the authenticated user is acting on behalf of the content owner specified -// in the parameter value. This parameter is intended for YouTube content -// partners that own and manage many different YouTube channels. It allows -// content owners to authenticate once and get access to all their video and -// channel data, without having to provide authentication credentials for -// each individual channel. The actual CMS account that the user -// authenticates with needs to be linked to the specified YouTube content -// owner. +// onBehalfOfContentOwner: Note: This parameter is intended exclusively for +// YouTube content partners. +// The onBehalfOfContentOwner parameter indicates that the request's +// authorization credentials identify a YouTube CMS user who is acting on +// behalf of the content owner specified in the parameter value. This +// parameter is intended for YouTube content partners that own and manage +// many different YouTube channels. It allows content owners to authenticate +// once and get access to all their video and channel data, without having +// to provide authentication credentials for each individual channel. The +// CMS account that the user authenticates with must be linked to the +// specified YouTube content owner. // Upload Parameters: // Maximum size: 10MB // Accepted MIME type(s): application/octet-stream, image/jpeg, image/png // Authorization scope(s): // kGTLAuthScopeYouTube +// kGTLAuthScopeYouTubeForceSsl // kGTLAuthScopeYouTubeUpload // kGTLAuthScopeYouTubeYoutubepartner -+ (id)queryForWatermarksSetWithObject:(GTLYouTubeInvideoBranding *)object - channelId:(NSString *)channelId - uploadParameters:(GTLUploadParameters *)uploadParametersOrNil; ++ (instancetype)queryForWatermarksSetWithObject:(GTLYouTubeInvideoBranding *)object + channelId:(NSString *)channelId + uploadParameters:(GTLUploadParameters *)uploadParametersOrNil; // Method: youtube.watermarks.unset -// Deletes a watermark. +// Deletes a channel's watermark image. // Required: -// channelId: The channelId parameter specifies a YouTube channel ID for which -// the watermark is being unset. +// channelId: The channelId parameter specifies the YouTube channel ID for +// which the watermark is being unset. // Optional: -// onBehalfOfContentOwner: The onBehalfOfContentOwner parameter indicates that -// the authenticated user is acting on behalf of the content owner specified -// in the parameter value. This parameter is intended for YouTube content -// partners that own and manage many different YouTube channels. It allows -// content owners to authenticate once and get access to all their video and -// channel data, without having to provide authentication credentials for -// each individual channel. The actual CMS account that the user -// authenticates with needs to be linked to the specified YouTube content -// owner. +// onBehalfOfContentOwner: Note: This parameter is intended exclusively for +// YouTube content partners. +// The onBehalfOfContentOwner parameter indicates that the request's +// authorization credentials identify a YouTube CMS user who is acting on +// behalf of the content owner specified in the parameter value. This +// parameter is intended for YouTube content partners that own and manage +// many different YouTube channels. It allows content owners to authenticate +// once and get access to all their video and channel data, without having +// to provide authentication credentials for each individual channel. The +// CMS account that the user authenticates with must be linked to the +// specified YouTube content owner. // Authorization scope(s): // kGTLAuthScopeYouTube +// kGTLAuthScopeYouTubeForceSsl // kGTLAuthScopeYouTubeYoutubepartner -+ (id)queryForWatermarksUnsetWithChannelId:(NSString *)channelId; ++ (instancetype)queryForWatermarksUnsetWithChannelId:(NSString *)channelId; @end diff --git a/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLQueryYouTube.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLQueryYouTube.m new file mode 100644 index 000000000..f32e540de --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLQueryYouTube.m @@ -0,0 +1,910 @@ +/* Copyright (c) 2016 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 Data API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube/v3 +// Classes: +// GTLQueryYouTube (71 custom class methods, 71 custom properties) + +#import "GTLQueryYouTube.h" + +#import "GTLYouTubeActivity.h" +#import "GTLYouTubeActivityListResponse.h" +#import "GTLYouTubeCaption.h" +#import "GTLYouTubeCaptionListResponse.h" +#import "GTLYouTubeChannel.h" +#import "GTLYouTubeChannelBannerResource.h" +#import "GTLYouTubeChannelListResponse.h" +#import "GTLYouTubeChannelSection.h" +#import "GTLYouTubeChannelSectionListResponse.h" +#import "GTLYouTubeComment.h" +#import "GTLYouTubeCommentListResponse.h" +#import "GTLYouTubeCommentThread.h" +#import "GTLYouTubeCommentThreadListResponse.h" +#import "GTLYouTubeFanFundingEventListResponse.h" +#import "GTLYouTubeGuideCategoryListResponse.h" +#import "GTLYouTubeI18nLanguageListResponse.h" +#import "GTLYouTubeI18nRegionListResponse.h" +#import "GTLYouTubeInvideoBranding.h" +#import "GTLYouTubeLiveBroadcast.h" +#import "GTLYouTubeLiveBroadcastListResponse.h" +#import "GTLYouTubeLiveChatBan.h" +#import "GTLYouTubeLiveChatMessage.h" +#import "GTLYouTubeLiveChatMessageListResponse.h" +#import "GTLYouTubeLiveChatModerator.h" +#import "GTLYouTubeLiveChatModeratorListResponse.h" +#import "GTLYouTubeLiveStream.h" +#import "GTLYouTubeLiveStreamListResponse.h" +#import "GTLYouTubePlaylist.h" +#import "GTLYouTubePlaylistItem.h" +#import "GTLYouTubePlaylistItemListResponse.h" +#import "GTLYouTubePlaylistListResponse.h" +#import "GTLYouTubeSearchListResponse.h" +#import "GTLYouTubeSponsorListResponse.h" +#import "GTLYouTubeSubscription.h" +#import "GTLYouTubeSubscriptionListResponse.h" +#import "GTLYouTubeThumbnailSetResponse.h" +#import "GTLYouTubeVideo.h" +#import "GTLYouTubeVideoAbuseReport.h" +#import "GTLYouTubeVideoAbuseReportReasonListResponse.h" +#import "GTLYouTubeVideoCategoryListResponse.h" +#import "GTLYouTubeVideoGetRatingResponse.h" +#import "GTLYouTubeVideoListResponse.h" + +@implementation GTLQueryYouTube + +@dynamic allThreadsRelatedToChannelId, autoLevels, banAuthor, broadcastStatus, + broadcastType, categoryId, channelId, channelType, chart, displaySlate, + eventType, fields, filter, forChannelId, forContentOwner, forDeveloper, + forMine, forUsername, hl, home, identifier, liveChatId, locale, + location, locationRadius, managedByMe, maxResults, mine, + moderationStatus, myRating, mySubscribers, notifySubscribers, + offsetTimeMs, onBehalfOf, onBehalfOfContentOwner, + onBehalfOfContentOwnerChannel, order, pageToken, parentId, part, + playlistId, profileImageSize, publishedAfter, publishedBefore, q, + rating, regionCode, relatedToVideoId, relevanceLanguage, report, + safeSearch, searchTerms, stabilize, streamId, sync, textFormat, tfmt, + tlang, topicId, type, videoCaption, videoCategoryId, videoDefinition, + videoDimension, videoDuration, videoEmbeddable, videoId, videoLicense, + videoSyndicated, videoType, walltime; + ++ (NSDictionary *)parameterNameMap { + NSDictionary *map = @{ + @"identifier" : @"id" + }; + return map; +} + +#pragma mark - "activities" methods +// These create a GTLQueryYouTube object. + ++ (instancetype)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; +} + ++ (instancetype)queryForActivitiesListWithPart:(NSString *)part { + NSString *methodName = @"youtube.activities.list"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.part = part; + query.expectedObjectClass = [GTLYouTubeActivityListResponse class]; + return query; +} + +#pragma mark - "captions" methods +// These create a GTLQueryYouTube object. + ++ (instancetype)queryForCaptionsDeleteWithIdentifier:(NSString *)identifier { + NSString *methodName = @"youtube.captions.delete"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.identifier = identifier; + return query; +} + ++ (instancetype)queryForCaptionsDownloadWithIdentifier:(NSString *)identifier { + NSString *methodName = @"youtube.captions.download"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.identifier = identifier; + return query; +} + ++ (instancetype)queryForCaptionsInsertWithObject:(GTLYouTubeCaption *)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.captions.insert"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.part = part; + query.uploadParameters = uploadParametersOrNil; + query.expectedObjectClass = [GTLYouTubeCaption class]; + return query; +} + ++ (instancetype)queryForCaptionsListWithPart:(NSString *)part + videoId:(NSString *)videoId { + NSString *methodName = @"youtube.captions.list"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.part = part; + query.videoId = videoId; + query.expectedObjectClass = [GTLYouTubeCaptionListResponse class]; + return query; +} + ++ (instancetype)queryForCaptionsUpdateWithObject:(GTLYouTubeCaption *)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.captions.update"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.part = part; + query.uploadParameters = uploadParametersOrNil; + query.expectedObjectClass = [GTLYouTubeCaption class]; + return query; +} + +#pragma mark - "channelBanners" methods +// These create a GTLQueryYouTube object. + ++ (instancetype)queryForChannelBannersInsertWithObject:(GTLYouTubeChannelBannerResource *)object + uploadParameters:(GTLUploadParameters *)uploadParametersOrNil { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"youtube.channelBanners.insert"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.uploadParameters = uploadParametersOrNil; + query.expectedObjectClass = [GTLYouTubeChannelBannerResource class]; + return query; +} + +#pragma mark - "channelSections" methods +// These create a GTLQueryYouTube object. + ++ (instancetype)queryForChannelSectionsDeleteWithIdentifier:(NSString *)identifier { + NSString *methodName = @"youtube.channelSections.delete"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.identifier = identifier; + return query; +} + ++ (instancetype)queryForChannelSectionsInsertWithObject:(GTLYouTubeChannelSection *)object + part:(NSString *)part { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"youtube.channelSections.insert"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.part = part; + query.expectedObjectClass = [GTLYouTubeChannelSection class]; + return query; +} + ++ (instancetype)queryForChannelSectionsListWithPart:(NSString *)part { + NSString *methodName = @"youtube.channelSections.list"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.part = part; + query.expectedObjectClass = [GTLYouTubeChannelSectionListResponse class]; + return query; +} + ++ (instancetype)queryForChannelSectionsUpdateWithObject:(GTLYouTubeChannelSection *)object + part:(NSString *)part { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"youtube.channelSections.update"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.part = part; + query.expectedObjectClass = [GTLYouTubeChannelSection class]; + return query; +} + +#pragma mark - "channels" methods +// These create a GTLQueryYouTube object. + ++ (instancetype)queryForChannelsListWithPart:(NSString *)part { + NSString *methodName = @"youtube.channels.list"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.part = part; + query.expectedObjectClass = [GTLYouTubeChannelListResponse class]; + return query; +} + ++ (instancetype)queryForChannelsUpdateWithObject:(GTLYouTubeChannel *)object + part:(NSString *)part { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"youtube.channels.update"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.part = part; + query.expectedObjectClass = [GTLYouTubeChannel class]; + return query; +} + +#pragma mark - "comments" methods +// These create a GTLQueryYouTube object. + ++ (instancetype)queryForCommentsDeleteWithIdentifier:(NSString *)identifier { + NSString *methodName = @"youtube.comments.delete"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.identifier = identifier; + return query; +} + ++ (instancetype)queryForCommentsInsertWithObject:(GTLYouTubeComment *)object + part:(NSString *)part { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"youtube.comments.insert"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.part = part; + query.expectedObjectClass = [GTLYouTubeComment class]; + return query; +} + ++ (instancetype)queryForCommentsListWithPart:(NSString *)part { + NSString *methodName = @"youtube.comments.list"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.part = part; + query.expectedObjectClass = [GTLYouTubeCommentListResponse class]; + return query; +} + ++ (instancetype)queryForCommentsMarkAsSpamWithIdentifier:(NSString *)identifier { + NSString *methodName = @"youtube.comments.markAsSpam"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.identifier = identifier; + return query; +} + ++ (instancetype)queryForCommentsSetModerationStatusWithIdentifier:(NSString *)identifier + moderationStatus:(NSString *)moderationStatus { + NSString *methodName = @"youtube.comments.setModerationStatus"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.identifier = identifier; + query.moderationStatus = moderationStatus; + return query; +} + ++ (instancetype)queryForCommentsUpdateWithObject:(GTLYouTubeComment *)object + part:(NSString *)part { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"youtube.comments.update"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.part = part; + query.expectedObjectClass = [GTLYouTubeComment class]; + return query; +} + +#pragma mark - "commentThreads" methods +// These create a GTLQueryYouTube object. + ++ (instancetype)queryForCommentThreadsInsertWithObject:(GTLYouTubeCommentThread *)object + part:(NSString *)part { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"youtube.commentThreads.insert"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.part = part; + query.expectedObjectClass = [GTLYouTubeCommentThread class]; + return query; +} + ++ (instancetype)queryForCommentThreadsListWithPart:(NSString *)part { + NSString *methodName = @"youtube.commentThreads.list"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.part = part; + query.expectedObjectClass = [GTLYouTubeCommentThreadListResponse class]; + return query; +} + ++ (instancetype)queryForCommentThreadsUpdateWithObject:(GTLYouTubeCommentThread *)object + part:(NSString *)part { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"youtube.commentThreads.update"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.part = part; + query.expectedObjectClass = [GTLYouTubeCommentThread class]; + return query; +} + +#pragma mark - "fanFundingEvents" methods +// These create a GTLQueryYouTube object. + ++ (instancetype)queryForFanFundingEventsListWithPart:(NSString *)part { + NSString *methodName = @"youtube.fanFundingEvents.list"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.part = part; + query.expectedObjectClass = [GTLYouTubeFanFundingEventListResponse class]; + return query; +} + +#pragma mark - "guideCategories" methods +// These create a GTLQueryYouTube object. + ++ (instancetype)queryForGuideCategoriesListWithPart:(NSString *)part { + NSString *methodName = @"youtube.guideCategories.list"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.part = part; + query.expectedObjectClass = [GTLYouTubeGuideCategoryListResponse class]; + return query; +} + +#pragma mark - "i18nLanguages" methods +// These create a GTLQueryYouTube object. + ++ (instancetype)queryForI18nLanguagesListWithPart:(NSString *)part { + NSString *methodName = @"youtube.i18nLanguages.list"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.part = part; + query.expectedObjectClass = [GTLYouTubeI18nLanguageListResponse class]; + return query; +} + +#pragma mark - "i18nRegions" methods +// These create a GTLQueryYouTube object. + ++ (instancetype)queryForI18nRegionsListWithPart:(NSString *)part { + NSString *methodName = @"youtube.i18nRegions.list"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.part = part; + query.expectedObjectClass = [GTLYouTubeI18nRegionListResponse class]; + return query; +} + +#pragma mark - "liveBroadcasts" methods +// These create a GTLQueryYouTube object. + ++ (instancetype)queryForLiveBroadcastsBindWithIdentifier:(NSString *)identifier + part:(NSString *)part { + NSString *methodName = @"youtube.liveBroadcasts.bind"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.identifier = identifier; + query.part = part; + query.expectedObjectClass = [GTLYouTubeLiveBroadcast class]; + return query; +} + ++ (instancetype)queryForLiveBroadcastsControlWithIdentifier:(NSString *)identifier + part:(NSString *)part { + NSString *methodName = @"youtube.liveBroadcasts.control"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.identifier = identifier; + query.part = part; + query.expectedObjectClass = [GTLYouTubeLiveBroadcast class]; + return query; +} + ++ (instancetype)queryForLiveBroadcastsDeleteWithIdentifier:(NSString *)identifier { + NSString *methodName = @"youtube.liveBroadcasts.delete"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.identifier = identifier; + return query; +} + ++ (instancetype)queryForLiveBroadcastsInsertWithObject:(GTLYouTubeLiveBroadcast *)object + part:(NSString *)part { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"youtube.liveBroadcasts.insert"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.part = part; + query.expectedObjectClass = [GTLYouTubeLiveBroadcast class]; + return query; +} + ++ (instancetype)queryForLiveBroadcastsListWithPart:(NSString *)part { + NSString *methodName = @"youtube.liveBroadcasts.list"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.part = part; + query.expectedObjectClass = [GTLYouTubeLiveBroadcastListResponse class]; + return query; +} + ++ (instancetype)queryForLiveBroadcastsTransitionWithBroadcastStatus:(NSString *)broadcastStatus + identifier:(NSString *)identifier + part:(NSString *)part { + NSString *methodName = @"youtube.liveBroadcasts.transition"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.broadcastStatus = broadcastStatus; + query.identifier = identifier; + query.part = part; + query.expectedObjectClass = [GTLYouTubeLiveBroadcast class]; + return query; +} + ++ (instancetype)queryForLiveBroadcastsUpdateWithObject:(GTLYouTubeLiveBroadcast *)object + part:(NSString *)part { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"youtube.liveBroadcasts.update"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.part = part; + query.expectedObjectClass = [GTLYouTubeLiveBroadcast class]; + return query; +} + +#pragma mark - "liveChatBans" methods +// These create a GTLQueryYouTube object. + ++ (instancetype)queryForLiveChatBansDeleteWithIdentifier:(NSString *)identifier { + NSString *methodName = @"youtube.liveChatBans.delete"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.identifier = identifier; + return query; +} + ++ (instancetype)queryForLiveChatBansInsertWithObject:(GTLYouTubeLiveChatBan *)object + part:(NSString *)part { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"youtube.liveChatBans.insert"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.part = part; + query.expectedObjectClass = [GTLYouTubeLiveChatBan class]; + return query; +} + +#pragma mark - "liveChatMessages" methods +// These create a GTLQueryYouTube object. + ++ (instancetype)queryForLiveChatMessagesDeleteWithIdentifier:(NSString *)identifier { + NSString *methodName = @"youtube.liveChatMessages.delete"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.identifier = identifier; + return query; +} + ++ (instancetype)queryForLiveChatMessagesInsertWithObject:(GTLYouTubeLiveChatMessage *)object + part:(NSString *)part { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"youtube.liveChatMessages.insert"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.part = part; + query.expectedObjectClass = [GTLYouTubeLiveChatMessage class]; + return query; +} + ++ (instancetype)queryForLiveChatMessagesListWithLiveChatId:(NSString *)liveChatId + part:(NSString *)part { + NSString *methodName = @"youtube.liveChatMessages.list"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.liveChatId = liveChatId; + query.part = part; + query.expectedObjectClass = [GTLYouTubeLiveChatMessageListResponse class]; + return query; +} + +#pragma mark - "liveChatModerators" methods +// These create a GTLQueryYouTube object. + ++ (instancetype)queryForLiveChatModeratorsDeleteWithIdentifier:(NSString *)identifier { + NSString *methodName = @"youtube.liveChatModerators.delete"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.identifier = identifier; + return query; +} + ++ (instancetype)queryForLiveChatModeratorsInsertWithObject:(GTLYouTubeLiveChatModerator *)object + part:(NSString *)part { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"youtube.liveChatModerators.insert"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.part = part; + query.expectedObjectClass = [GTLYouTubeLiveChatModerator class]; + return query; +} + ++ (instancetype)queryForLiveChatModeratorsListWithLiveChatId:(NSString *)liveChatId + part:(NSString *)part { + NSString *methodName = @"youtube.liveChatModerators.list"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.liveChatId = liveChatId; + query.part = part; + query.expectedObjectClass = [GTLYouTubeLiveChatModeratorListResponse class]; + return query; +} + +#pragma mark - "liveStreams" methods +// These create a GTLQueryYouTube object. + ++ (instancetype)queryForLiveStreamsDeleteWithIdentifier:(NSString *)identifier { + NSString *methodName = @"youtube.liveStreams.delete"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.identifier = identifier; + return query; +} + ++ (instancetype)queryForLiveStreamsInsertWithObject:(GTLYouTubeLiveStream *)object + part:(NSString *)part { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"youtube.liveStreams.insert"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.part = part; + query.expectedObjectClass = [GTLYouTubeLiveStream class]; + return query; +} + ++ (instancetype)queryForLiveStreamsListWithPart:(NSString *)part { + NSString *methodName = @"youtube.liveStreams.list"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.part = part; + query.expectedObjectClass = [GTLYouTubeLiveStreamListResponse class]; + return query; +} + ++ (instancetype)queryForLiveStreamsUpdateWithObject:(GTLYouTubeLiveStream *)object + part:(NSString *)part { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"youtube.liveStreams.update"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.part = part; + query.expectedObjectClass = [GTLYouTubeLiveStream class]; + return query; +} + +#pragma mark - "playlistItems" methods +// These create a GTLQueryYouTube object. + ++ (instancetype)queryForPlaylistItemsDeleteWithIdentifier:(NSString *)identifier { + NSString *methodName = @"youtube.playlistItems.delete"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.identifier = identifier; + return query; +} + ++ (instancetype)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; +} + ++ (instancetype)queryForPlaylistItemsListWithPart:(NSString *)part { + NSString *methodName = @"youtube.playlistItems.list"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.part = part; + query.expectedObjectClass = [GTLYouTubePlaylistItemListResponse class]; + return query; +} + ++ (instancetype)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 - "playlists" methods +// These create a GTLQueryYouTube object. + ++ (instancetype)queryForPlaylistsDeleteWithIdentifier:(NSString *)identifier { + NSString *methodName = @"youtube.playlists.delete"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.identifier = identifier; + return query; +} + ++ (instancetype)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; +} + ++ (instancetype)queryForPlaylistsListWithPart:(NSString *)part { + NSString *methodName = @"youtube.playlists.list"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.part = part; + query.expectedObjectClass = [GTLYouTubePlaylistListResponse class]; + return query; +} + ++ (instancetype)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 - "search" methods +// These create a GTLQueryYouTube object. + ++ (instancetype)queryForSearchListWithPart:(NSString *)part { + NSString *methodName = @"youtube.search.list"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.part = part; + query.expectedObjectClass = [GTLYouTubeSearchListResponse class]; + return query; +} + +#pragma mark - "sponsors" methods +// These create a GTLQueryYouTube object. + ++ (instancetype)queryForSponsorsListWithPart:(NSString *)part { + NSString *methodName = @"youtube.sponsors.list"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.part = part; + query.expectedObjectClass = [GTLYouTubeSponsorListResponse class]; + return query; +} + +#pragma mark - "subscriptions" methods +// These create a GTLQueryYouTube object. + ++ (instancetype)queryForSubscriptionsDeleteWithIdentifier:(NSString *)identifier { + NSString *methodName = @"youtube.subscriptions.delete"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.identifier = identifier; + return query; +} + ++ (instancetype)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; +} + ++ (instancetype)queryForSubscriptionsListWithPart:(NSString *)part { + NSString *methodName = @"youtube.subscriptions.list"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.part = part; + query.expectedObjectClass = [GTLYouTubeSubscriptionListResponse class]; + return query; +} + +#pragma mark - "thumbnails" methods +// These create a GTLQueryYouTube object. + ++ (instancetype)queryForThumbnailsSetWithVideoId:(NSString *)videoId + uploadParameters:(GTLUploadParameters *)uploadParametersOrNil { + NSString *methodName = @"youtube.thumbnails.set"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.videoId = videoId; + query.uploadParameters = uploadParametersOrNil; + query.expectedObjectClass = [GTLYouTubeThumbnailSetResponse class]; + return query; +} + +#pragma mark - "videoAbuseReportReasons" methods +// These create a GTLQueryYouTube object. + ++ (instancetype)queryForVideoAbuseReportReasonsListWithPart:(NSString *)part { + NSString *methodName = @"youtube.videoAbuseReportReasons.list"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.part = part; + query.expectedObjectClass = [GTLYouTubeVideoAbuseReportReasonListResponse class]; + return query; +} + +#pragma mark - "videoCategories" methods +// These create a GTLQueryYouTube object. + ++ (instancetype)queryForVideoCategoriesListWithPart:(NSString *)part { + NSString *methodName = @"youtube.videoCategories.list"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.part = part; + query.expectedObjectClass = [GTLYouTubeVideoCategoryListResponse class]; + return query; +} + +#pragma mark - "videos" methods +// These create a GTLQueryYouTube object. + ++ (instancetype)queryForVideosDeleteWithIdentifier:(NSString *)identifier { + NSString *methodName = @"youtube.videos.delete"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.identifier = identifier; + return query; +} + ++ (instancetype)queryForVideosGetRatingWithIdentifier:(NSString *)identifier { + NSString *methodName = @"youtube.videos.getRating"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.identifier = identifier; + query.expectedObjectClass = [GTLYouTubeVideoGetRatingResponse class]; + return query; +} + ++ (instancetype)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; +} + ++ (instancetype)queryForVideosListWithPart:(NSString *)part { + NSString *methodName = @"youtube.videos.list"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.part = part; + query.expectedObjectClass = [GTLYouTubeVideoListResponse class]; + return query; +} + ++ (instancetype)queryForVideosRateWithIdentifier:(NSString *)identifier + rating:(NSString *)rating { + NSString *methodName = @"youtube.videos.rate"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.identifier = identifier; + query.rating = rating; + return query; +} + ++ (instancetype)queryForVideosReportAbuse { + NSString *methodName = @"youtube.videos.reportAbuse"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + return query; +} + ++ (instancetype)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; +} + +#pragma mark - "watermarks" methods +// These create a GTLQueryYouTube object. + ++ (instancetype)queryForWatermarksSetWithObject:(GTLYouTubeInvideoBranding *)object + channelId:(NSString *)channelId + uploadParameters:(GTLUploadParameters *)uploadParametersOrNil { + if (object == nil) { + GTL_DEBUG_ASSERT(object != nil, @"%@ got a nil object", NSStringFromSelector(_cmd)); + return nil; + } + NSString *methodName = @"youtube.watermarks.set"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.bodyObject = object; + query.channelId = channelId; + query.uploadParameters = uploadParametersOrNil; + return query; +} + ++ (instancetype)queryForWatermarksUnsetWithChannelId:(NSString *)channelId { + NSString *methodName = @"youtube.watermarks.unset"; + GTLQueryYouTube *query = [self queryWithMethodName:methodName]; + query.channelId = channelId; + return query; +} + +@end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLServiceYouTube.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLServiceYouTube.h similarity index 100% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLServiceYouTube.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLServiceYouTube.h diff --git a/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLServiceYouTube.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLServiceYouTube.m new file mode 100644 index 000000000..8c2915008 --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLServiceYouTube.m @@ -0,0 +1,226 @@ +/* Copyright (c) 2016 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 Data API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube/v3 +// 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 = @[ + [GTLQueryYouTube class], + [GTLYouTubeAccessPolicy class], + [GTLYouTubeActivity class], + [GTLYouTubeActivityContentDetails class], + [GTLYouTubeActivityContentDetailsBulletin class], + [GTLYouTubeActivityContentDetailsChannelItem class], + [GTLYouTubeActivityContentDetailsComment class], + [GTLYouTubeActivityContentDetailsFavorite class], + [GTLYouTubeActivityContentDetailsLike class], + [GTLYouTubeActivityContentDetailsPlaylistItem class], + [GTLYouTubeActivityContentDetailsPromotedItem class], + [GTLYouTubeActivityContentDetailsRecommendation class], + [GTLYouTubeActivityContentDetailsSocial class], + [GTLYouTubeActivityContentDetailsSubscription class], + [GTLYouTubeActivityContentDetailsUpload class], + [GTLYouTubeActivityListResponse class], + [GTLYouTubeActivitySnippet class], + [GTLYouTubeCaption class], + [GTLYouTubeCaptionListResponse class], + [GTLYouTubeCaptionSnippet class], + [GTLYouTubeCdnSettings class], + [GTLYouTubeChannel class], + [GTLYouTubeChannelAuditDetails class], + [GTLYouTubeChannelBannerResource class], + [GTLYouTubeChannelBrandingSettings class], + [GTLYouTubeChannelContentDetails class], + [GTLYouTubeChannelContentOwnerDetails class], + [GTLYouTubeChannelConversionPing class], + [GTLYouTubeChannelConversionPings class], + [GTLYouTubeChannelListResponse class], + [GTLYouTubeChannelLocalization class], + [GTLYouTubeChannelProfileDetails class], + [GTLYouTubeChannelSection class], + [GTLYouTubeChannelSectionContentDetails class], + [GTLYouTubeChannelSectionListResponse class], + [GTLYouTubeChannelSectionLocalization class], + [GTLYouTubeChannelSectionSnippet class], + [GTLYouTubeChannelSectionTargeting class], + [GTLYouTubeChannelSettings class], + [GTLYouTubeChannelSnippet class], + [GTLYouTubeChannelStatistics class], + [GTLYouTubeChannelStatus class], + [GTLYouTubeChannelTopicDetails class], + [GTLYouTubeComment class], + [GTLYouTubeCommentListResponse class], + [GTLYouTubeCommentSnippet class], + [GTLYouTubeCommentThread class], + [GTLYouTubeCommentThreadListResponse class], + [GTLYouTubeCommentThreadReplies class], + [GTLYouTubeCommentThreadSnippet class], + [GTLYouTubeContentRating class], + [GTLYouTubeFanFundingEvent class], + [GTLYouTubeFanFundingEventListResponse class], + [GTLYouTubeFanFundingEventSnippet class], + [GTLYouTubeGeoPoint class], + [GTLYouTubeGuideCategory class], + [GTLYouTubeGuideCategoryListResponse class], + [GTLYouTubeGuideCategorySnippet class], + [GTLYouTubeI18nLanguage class], + [GTLYouTubeI18nLanguageListResponse class], + [GTLYouTubeI18nLanguageSnippet class], + [GTLYouTubeI18nRegion class], + [GTLYouTubeI18nRegionListResponse class], + [GTLYouTubeI18nRegionSnippet class], + [GTLYouTubeImageSettings class], + [GTLYouTubeIngestionInfo class], + [GTLYouTubeInvideoBranding class], + [GTLYouTubeInvideoPosition class], + [GTLYouTubeInvideoPromotion class], + [GTLYouTubeInvideoTiming class], + [GTLYouTubeLanguageTag class], + [GTLYouTubeLiveBroadcast class], + [GTLYouTubeLiveBroadcastContentDetails class], + [GTLYouTubeLiveBroadcastListResponse class], + [GTLYouTubeLiveBroadcastSnippet class], + [GTLYouTubeLiveBroadcastStatistics class], + [GTLYouTubeLiveBroadcastStatus class], + [GTLYouTubeLiveBroadcastTopic class], + [GTLYouTubeLiveBroadcastTopicDetails class], + [GTLYouTubeLiveBroadcastTopicSnippet class], + [GTLYouTubeLiveChatBan class], + [GTLYouTubeLiveChatBanSnippet class], + [GTLYouTubeLiveChatFanFundingEventDetails class], + [GTLYouTubeLiveChatMessage class], + [GTLYouTubeLiveChatMessageAuthorDetails class], + [GTLYouTubeLiveChatMessageListResponse class], + [GTLYouTubeLiveChatMessageSnippet class], + [GTLYouTubeLiveChatModerator class], + [GTLYouTubeLiveChatModeratorListResponse class], + [GTLYouTubeLiveChatModeratorSnippet class], + [GTLYouTubeLiveChatTextMessageDetails class], + [GTLYouTubeLiveStream class], + [GTLYouTubeLiveStreamConfigurationIssue class], + [GTLYouTubeLiveStreamContentDetails class], + [GTLYouTubeLiveStreamHealthStatus class], + [GTLYouTubeLiveStreamListResponse class], + [GTLYouTubeLiveStreamSnippet class], + [GTLYouTubeLiveStreamStatus class], + [GTLYouTubeLocalizedProperty class], + [GTLYouTubeLocalizedString class], + [GTLYouTubeMonitorStreamInfo class], + [GTLYouTubePageInfo class], + [GTLYouTubePlaylist class], + [GTLYouTubePlaylistContentDetails class], + [GTLYouTubePlaylistItem class], + [GTLYouTubePlaylistItemContentDetails class], + [GTLYouTubePlaylistItemListResponse class], + [GTLYouTubePlaylistItemSnippet class], + [GTLYouTubePlaylistItemStatus class], + [GTLYouTubePlaylistListResponse class], + [GTLYouTubePlaylistLocalization class], + [GTLYouTubePlaylistPlayer class], + [GTLYouTubePlaylistSnippet class], + [GTLYouTubePlaylistStatus class], + [GTLYouTubePromotedItem class], + [GTLYouTubePromotedItemId class], + [GTLYouTubePropertyValue class], + [GTLYouTubeResourceId class], + [GTLYouTubeSearchListResponse class], + [GTLYouTubeSearchResult class], + [GTLYouTubeSearchResultSnippet class], + [GTLYouTubeSponsor class], + [GTLYouTubeSponsorListResponse class], + [GTLYouTubeSponsorSnippet class], + [GTLYouTubeSubscription class], + [GTLYouTubeSubscriptionContentDetails class], + [GTLYouTubeSubscriptionListResponse class], + [GTLYouTubeSubscriptionSnippet class], + [GTLYouTubeSubscriptionSubscriberSnippet class], + [GTLYouTubeThumbnail class], + [GTLYouTubeThumbnailDetails class], + [GTLYouTubeThumbnailSetResponse class], + [GTLYouTubeTokenPagination class], + [GTLYouTubeVideo class], + [GTLYouTubeVideoAbuseReport class], + [GTLYouTubeVideoAbuseReportReason class], + [GTLYouTubeVideoAbuseReportReasonListResponse class], + [GTLYouTubeVideoAbuseReportReasonSnippet class], + [GTLYouTubeVideoAbuseReportSecondaryReason class], + [GTLYouTubeVideoAgeGating class], + [GTLYouTubeVideoCategory class], + [GTLYouTubeVideoCategoryListResponse class], + [GTLYouTubeVideoCategorySnippet class], + [GTLYouTubeVideoContentDetails class], + [GTLYouTubeVideoContentDetailsRegionRestriction class], + [GTLYouTubeVideoFileDetails class], + [GTLYouTubeVideoFileDetailsAudioStream class], + [GTLYouTubeVideoFileDetailsVideoStream class], + [GTLYouTubeVideoGetRatingResponse class], + [GTLYouTubeVideoListResponse class], + [GTLYouTubeVideoLiveStreamingDetails class], + [GTLYouTubeVideoLocalization class], + [GTLYouTubeVideoMonetizationDetails class], + [GTLYouTubeVideoPlayer class], + [GTLYouTubeVideoProcessingDetails class], + [GTLYouTubeVideoProcessingDetailsProcessingProgress class], + [GTLYouTubeVideoProjectDetails class], + [GTLYouTubeVideoRating class], + [GTLYouTubeVideoRecordingDetails class], + [GTLYouTubeVideoSnippet class], + [GTLYouTubeVideoStatistics class], + [GTLYouTubeVideoStatus class], + [GTLYouTubeVideoSuggestions class], + [GTLYouTubeVideoSuggestionsTagSuggestion class], + [GTLYouTubeVideoTopicDetails class], + [GTLYouTubeWatchSettings class] + ]; + return classes; +} +#endif // DEBUG + +- (instancetype)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/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTube.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTube.h similarity index 76% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTube.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTube.h index 0d9ac103f..05e8cf653 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTube.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTube.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2014 Google Inc. +/* Copyright (c) 2016 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -44,6 +44,9 @@ #import "GTLYouTubeActivityContentDetailsUpload.h" #import "GTLYouTubeActivityListResponse.h" #import "GTLYouTubeActivitySnippet.h" +#import "GTLYouTubeCaption.h" +#import "GTLYouTubeCaptionListResponse.h" +#import "GTLYouTubeCaptionSnippet.h" #import "GTLYouTubeCdnSettings.h" #import "GTLYouTubeChannel.h" #import "GTLYouTubeChannelAuditDetails.h" @@ -55,16 +58,29 @@ #import "GTLYouTubeChannelConversionPings.h" #import "GTLYouTubeChannelListResponse.h" #import "GTLYouTubeChannelLocalization.h" +#import "GTLYouTubeChannelProfileDetails.h" #import "GTLYouTubeChannelSection.h" #import "GTLYouTubeChannelSectionContentDetails.h" #import "GTLYouTubeChannelSectionListResponse.h" +#import "GTLYouTubeChannelSectionLocalization.h" #import "GTLYouTubeChannelSectionSnippet.h" +#import "GTLYouTubeChannelSectionTargeting.h" #import "GTLYouTubeChannelSettings.h" #import "GTLYouTubeChannelSnippet.h" #import "GTLYouTubeChannelStatistics.h" #import "GTLYouTubeChannelStatus.h" #import "GTLYouTubeChannelTopicDetails.h" +#import "GTLYouTubeComment.h" +#import "GTLYouTubeCommentListResponse.h" +#import "GTLYouTubeCommentSnippet.h" +#import "GTLYouTubeCommentThread.h" +#import "GTLYouTubeCommentThreadListResponse.h" +#import "GTLYouTubeCommentThreadReplies.h" +#import "GTLYouTubeCommentThreadSnippet.h" #import "GTLYouTubeContentRating.h" +#import "GTLYouTubeFanFundingEvent.h" +#import "GTLYouTubeFanFundingEventListResponse.h" +#import "GTLYouTubeFanFundingEventSnippet.h" #import "GTLYouTubeGeoPoint.h" #import "GTLYouTubeGuideCategory.h" #import "GTLYouTubeGuideCategoryListResponse.h" @@ -86,9 +102,26 @@ #import "GTLYouTubeLiveBroadcastContentDetails.h" #import "GTLYouTubeLiveBroadcastListResponse.h" #import "GTLYouTubeLiveBroadcastSnippet.h" +#import "GTLYouTubeLiveBroadcastStatistics.h" #import "GTLYouTubeLiveBroadcastStatus.h" +#import "GTLYouTubeLiveBroadcastTopic.h" +#import "GTLYouTubeLiveBroadcastTopicDetails.h" +#import "GTLYouTubeLiveBroadcastTopicSnippet.h" +#import "GTLYouTubeLiveChatBan.h" +#import "GTLYouTubeLiveChatBanSnippet.h" +#import "GTLYouTubeLiveChatFanFundingEventDetails.h" +#import "GTLYouTubeLiveChatMessage.h" +#import "GTLYouTubeLiveChatMessageAuthorDetails.h" +#import "GTLYouTubeLiveChatMessageListResponse.h" +#import "GTLYouTubeLiveChatMessageSnippet.h" +#import "GTLYouTubeLiveChatModerator.h" +#import "GTLYouTubeLiveChatModeratorListResponse.h" +#import "GTLYouTubeLiveChatModeratorSnippet.h" +#import "GTLYouTubeLiveChatTextMessageDetails.h" #import "GTLYouTubeLiveStream.h" +#import "GTLYouTubeLiveStreamConfigurationIssue.h" #import "GTLYouTubeLiveStreamContentDetails.h" +#import "GTLYouTubeLiveStreamHealthStatus.h" #import "GTLYouTubeLiveStreamListResponse.h" #import "GTLYouTubeLiveStreamSnippet.h" #import "GTLYouTubeLiveStreamStatus.h" @@ -104,6 +137,7 @@ #import "GTLYouTubePlaylistItemSnippet.h" #import "GTLYouTubePlaylistItemStatus.h" #import "GTLYouTubePlaylistListResponse.h" +#import "GTLYouTubePlaylistLocalization.h" #import "GTLYouTubePlaylistPlayer.h" #import "GTLYouTubePlaylistSnippet.h" #import "GTLYouTubePlaylistStatus.h" @@ -114,6 +148,9 @@ #import "GTLYouTubeSearchListResponse.h" #import "GTLYouTubeSearchResult.h" #import "GTLYouTubeSearchResultSnippet.h" +#import "GTLYouTubeSponsor.h" +#import "GTLYouTubeSponsorListResponse.h" +#import "GTLYouTubeSponsorSnippet.h" #import "GTLYouTubeSubscription.h" #import "GTLYouTubeSubscriptionContentDetails.h" #import "GTLYouTubeSubscriptionListResponse.h" @@ -124,20 +161,24 @@ #import "GTLYouTubeThumbnailSetResponse.h" #import "GTLYouTubeTokenPagination.h" #import "GTLYouTubeVideo.h" +#import "GTLYouTubeVideoAbuseReport.h" +#import "GTLYouTubeVideoAbuseReportReason.h" +#import "GTLYouTubeVideoAbuseReportReasonListResponse.h" +#import "GTLYouTubeVideoAbuseReportReasonSnippet.h" +#import "GTLYouTubeVideoAbuseReportSecondaryReason.h" #import "GTLYouTubeVideoAgeGating.h" #import "GTLYouTubeVideoCategory.h" #import "GTLYouTubeVideoCategoryListResponse.h" #import "GTLYouTubeVideoCategorySnippet.h" #import "GTLYouTubeVideoContentDetails.h" #import "GTLYouTubeVideoContentDetailsRegionRestriction.h" -#import "GTLYouTubeVideoConversionPing.h" -#import "GTLYouTubeVideoConversionPings.h" #import "GTLYouTubeVideoFileDetails.h" #import "GTLYouTubeVideoFileDetailsAudioStream.h" #import "GTLYouTubeVideoFileDetailsVideoStream.h" #import "GTLYouTubeVideoGetRatingResponse.h" #import "GTLYouTubeVideoListResponse.h" #import "GTLYouTubeVideoLiveStreamingDetails.h" +#import "GTLYouTubeVideoLocalization.h" #import "GTLYouTubeVideoMonetizationDetails.h" #import "GTLYouTubeVideoPlayer.h" #import "GTLYouTubeVideoProcessingDetails.h" diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeAccessPolicy.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeAccessPolicy.h similarity index 90% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeAccessPolicy.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeAccessPolicy.h index 09eee4a3c..73df98bcf 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeAccessPolicy.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeAccessPolicy.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -45,10 +45,10 @@ // The value of allowed indicates whether the access to the policy is allowed or // denied by default. -@property (retain) NSNumber *allowed; // boolValue +@property (nonatomic, retain) NSNumber *allowed; // boolValue // A list of region codes that identify countries where the default policy do // not apply. -@property (retain) NSArray *exception; // of NSString +@property (nonatomic, retain) NSArray *exception; // of NSString @end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeAccessPolicy.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeAccessPolicy.m similarity index 88% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeAccessPolicy.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeAccessPolicy.m index 7ee2d659d..f89e735a6 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeAccessPolicy.m +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeAccessPolicy.m @@ -1,4 +1,4 @@ -/* Copyright (c) 2013 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -39,9 +39,9 @@ @implementation GTLYouTubeAccessPolicy @dynamic allowed, exception; + (NSDictionary *)arrayPropertyToClassMap { - NSDictionary *map = - [NSDictionary dictionaryWithObject:[NSString class] - forKey:@"exception"]; + NSDictionary *map = @{ + @"exception" : [NSString class] + }; return map; } diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeActivity.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeActivity.h similarity index 88% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeActivity.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeActivity.h index f78641846..f22e25e4b 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeActivity.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeActivity.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -55,21 +55,21 @@ // 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; +@property (nonatomic, retain) GTLYouTubeActivityContentDetails *contentDetails; // Etag of this resource. -@property (copy) NSString *ETag; +@property (nonatomic, 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; +@property (nonatomic, copy) NSString *identifier; // Identifies what kind of resource this is. Value: the fixed string // "youtube#activity". -@property (copy) NSString *kind; +@property (nonatomic, copy) NSString *kind; // The snippet object contains basic details about the activity, including the // activity's type and group ID. -@property (retain) GTLYouTubeActivitySnippet *snippet; +@property (nonatomic, retain) GTLYouTubeActivitySnippet *snippet; @end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeActivity.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeActivity.m similarity index 89% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeActivity.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeActivity.m index 43ba1ad87..0858083ca 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeActivity.m +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeActivity.m @@ -1,4 +1,4 @@ -/* Copyright (c) 2012 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -42,11 +42,10 @@ @implementation GTLYouTubeActivity @dynamic contentDetails, ETag, identifier, kind, snippet; + (NSDictionary *)propertyToJSONKeyMap { - NSDictionary *map = - [NSDictionary dictionaryWithObjectsAndKeys: - @"etag", @"ETag", - @"id", @"identifier", - nil]; + NSDictionary *map = @{ + @"ETag" : @"etag", + @"identifier" : @"id" + }; return map; } diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetails.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetails.h similarity index 79% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetails.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetails.h index 327b8b29e..804689783 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetails.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetails.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -58,49 +58,49 @@ // 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; +@property (nonatomic, retain) GTLYouTubeActivityContentDetailsBulletin *bulletin; // The channelItem object contains details about a resource which was added to a // channel. This property is only present if the snippet.type is channelItem. -@property (retain) GTLYouTubeActivityContentDetailsChannelItem *channelItem; +@property (nonatomic, retain) GTLYouTubeActivityContentDetailsChannelItem *channelItem; // 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; +@property (nonatomic, 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; +@property (nonatomic, 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; +@property (nonatomic, 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; +@property (nonatomic, retain) GTLYouTubeActivityContentDetailsPlaylistItem *playlistItem; // The promotedItem object contains details about a resource which is being // promoted. This property is only present if the snippet.type is promotedItem. -@property (retain) GTLYouTubeActivityContentDetailsPromotedItem *promotedItem; +@property (nonatomic, retain) GTLYouTubeActivityContentDetailsPromotedItem *promotedItem; // The recommendation object contains information about a recommended resource. // This property is only present if the snippet.type is recommendation. -@property (retain) GTLYouTubeActivityContentDetailsRecommendation *recommendation; +@property (nonatomic, 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; +@property (nonatomic, 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; +@property (nonatomic, 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; +@property (nonatomic, retain) GTLYouTubeActivityContentDetailsUpload *upload; @end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetails.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetails.m similarity index 100% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetails.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetails.m diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsBulletin.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsBulletin.h similarity index 93% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsBulletin.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsBulletin.h index 45fe412be..4f96d36f3 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsBulletin.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsBulletin.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -47,6 +47,6 @@ // The resourceId object contains information that identifies the resource // associated with a bulletin post. -@property (retain) GTLYouTubeResourceId *resourceId; +@property (nonatomic, retain) GTLYouTubeResourceId *resourceId; @end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsBulletin.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsBulletin.m similarity index 100% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsBulletin.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsBulletin.m diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsChannelItem.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsChannelItem.h similarity index 94% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsChannelItem.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsChannelItem.h index 48a7e6a6e..31e6b7983 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsChannelItem.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsChannelItem.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -47,6 +47,6 @@ // The resourceId object contains information that identifies the resource that // was added to the channel. -@property (retain) GTLYouTubeResourceId *resourceId; +@property (nonatomic, retain) GTLYouTubeResourceId *resourceId; @end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsChannelItem.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsChannelItem.m similarity index 100% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsChannelItem.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsChannelItem.m diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsComment.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsComment.h similarity index 93% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsComment.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsComment.h index 0e60ddd3b..41a9fac9f 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsComment.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsComment.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -47,6 +47,6 @@ // The resourceId object contains information that identifies the resource // associated with the comment. -@property (retain) GTLYouTubeResourceId *resourceId; +@property (nonatomic, retain) GTLYouTubeResourceId *resourceId; @end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsComment.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsComment.m similarity index 100% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsComment.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsComment.m diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsFavorite.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsFavorite.h similarity index 94% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsFavorite.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsFavorite.h index adde23ac5..00e9984f1 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsFavorite.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsFavorite.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -47,6 +47,6 @@ // The resourceId object contains information that identifies the resource that // was marked as a favorite. -@property (retain) GTLYouTubeResourceId *resourceId; +@property (nonatomic, retain) GTLYouTubeResourceId *resourceId; @end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsFavorite.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsFavorite.m similarity index 100% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsFavorite.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsFavorite.m diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsLike.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsLike.h similarity index 93% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsLike.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsLike.h index 5aa16ebbf..8f3de0d4b 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsLike.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsLike.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -47,6 +47,6 @@ // The resourceId object contains information that identifies the rated // resource. -@property (retain) GTLYouTubeResourceId *resourceId; +@property (nonatomic, retain) GTLYouTubeResourceId *resourceId; @end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsLike.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsLike.m similarity index 100% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsLike.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsLike.m diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsPlaylistItem.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsPlaylistItem.h similarity index 89% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsPlaylistItem.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsPlaylistItem.h index f0c86e397..0de004761 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsPlaylistItem.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsPlaylistItem.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -46,13 +46,13 @@ @interface GTLYouTubeActivityContentDetailsPlaylistItem : GTLObject // The value that YouTube uses to uniquely identify the playlist. -@property (copy) NSString *playlistId; +@property (nonatomic, copy) NSString *playlistId; // ID of the item within the playlist. -@property (copy) NSString *playlistItemId; +@property (nonatomic, copy) NSString *playlistItemId; // The resourceId object contains information about the resource that was added // to the playlist. -@property (retain) GTLYouTubeResourceId *resourceId; +@property (nonatomic, retain) GTLYouTubeResourceId *resourceId; @end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsPlaylistItem.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsPlaylistItem.m similarity index 100% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsPlaylistItem.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsPlaylistItem.m diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsPromotedItem.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsPromotedItem.h similarity index 80% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsPromotedItem.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsPromotedItem.h index dff255c5d..1aec77131 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsPromotedItem.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsPromotedItem.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -44,41 +44,41 @@ @interface GTLYouTubeActivityContentDetailsPromotedItem : GTLObject // The URL the client should fetch to request a promoted item. -@property (copy) NSString *adTag; +@property (nonatomic, copy) NSString *adTag; // The URL the client should ping to indicate that the user clicked through on // this promoted item. -@property (copy) NSString *clickTrackingUrl; +@property (nonatomic, copy) NSString *clickTrackingUrl; // The URL the client should ping to indicate that the user was shown this // promoted item. -@property (copy) NSString *creativeViewUrl; +@property (nonatomic, copy) NSString *creativeViewUrl; // The type of call-to-action, a message to the user indicating action that can // be taken. -@property (copy) NSString *ctaType; +@property (nonatomic, copy) NSString *ctaType; // The custom call-to-action button text. If specified, it will override the // default button text for the cta_type. -@property (copy) NSString *customCtaButtonText; +@property (nonatomic, copy) NSString *customCtaButtonText; // The text description to accompany the promoted item. -@property (copy) NSString *descriptionText; +@property (nonatomic, copy) NSString *descriptionText; // The URL the client should direct the user to, if the user chooses to visit // the advertiser's website. -@property (copy) NSString *destinationUrl; +@property (nonatomic, copy) NSString *destinationUrl; // The list of forecasting URLs. The client should ping all of these URLs when a // promoted item is not available, to indicate that a promoted item could have // been shown. -@property (retain) NSArray *forecastingUrl; // of NSString +@property (nonatomic, retain) NSArray *forecastingUrl; // of NSString // The list of impression URLs. The client should ping all of these URLs to // indicate that the user was shown this promoted item. -@property (retain) NSArray *impressionUrl; // of NSString +@property (nonatomic, retain) NSArray *impressionUrl; // of NSString // The ID that YouTube uses to uniquely identify the promoted video. -@property (copy) NSString *videoId; +@property (nonatomic, copy) NSString *videoId; @end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsPromotedItem.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsPromotedItem.m similarity index 88% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsPromotedItem.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsPromotedItem.m index 0a24af27f..76dbceeb2 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsPromotedItem.m +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsPromotedItem.m @@ -1,4 +1,4 @@ -/* Copyright (c) 2013 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -41,11 +41,10 @@ @implementation GTLYouTubeActivityContentDetailsPromotedItem videoId; + (NSDictionary *)arrayPropertyToClassMap { - NSDictionary *map = - [NSDictionary dictionaryWithObjectsAndKeys: - [NSString class], @"forecastingUrl", - [NSString class], @"impressionUrl", - nil]; + NSDictionary *map = @{ + @"forecastingUrl" : [NSString class], + @"impressionUrl" : [NSString class] + }; return map; } diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsRecommendation.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsRecommendation.h similarity index 88% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsRecommendation.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsRecommendation.h index 0b9b19272..5df4b36ce 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsRecommendation.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsRecommendation.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -46,14 +46,14 @@ @interface GTLYouTubeActivityContentDetailsRecommendation : GTLObject // The reason that the resource is recommended to the user. -@property (copy) NSString *reason; +@property (nonatomic, copy) NSString *reason; // The resourceId object contains information that identifies the recommended // resource. -@property (retain) GTLYouTubeResourceId *resourceId; +@property (nonatomic, retain) GTLYouTubeResourceId *resourceId; // The seedResourceId object contains information about the resource that caused // the recommendation. -@property (retain) GTLYouTubeResourceId *seedResourceId; +@property (nonatomic, retain) GTLYouTubeResourceId *seedResourceId; @end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsRecommendation.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsRecommendation.m similarity index 100% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsRecommendation.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsRecommendation.m diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsSocial.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsSocial.h similarity index 85% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsSocial.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsSocial.h index 5024d0e60..74bebe3bf 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsSocial.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsSocial.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -46,19 +46,19 @@ @interface GTLYouTubeActivityContentDetailsSocial : GTLObject // The author of the social network post. -@property (copy) NSString *author; +@property (nonatomic, copy) NSString *author; // An image of the post's author. -@property (copy) NSString *imageUrl; +@property (nonatomic, copy) NSString *imageUrl; // The URL of the social network post. -@property (copy) NSString *referenceUrl; +@property (nonatomic, copy) NSString *referenceUrl; // The resourceId object encapsulates information that identifies the resource // associated with a social network post. -@property (retain) GTLYouTubeResourceId *resourceId; +@property (nonatomic, retain) GTLYouTubeResourceId *resourceId; // The name of the social network. -@property (copy) NSString *type; +@property (nonatomic, copy) NSString *type; @end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsSocial.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsSocial.m similarity index 100% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsSocial.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsSocial.m diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsSubscription.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsSubscription.h similarity index 94% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsSubscription.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsSubscription.h index 211cf7e02..b04421235 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsSubscription.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsSubscription.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -47,6 +47,6 @@ // The resourceId object contains information that identifies the resource that // the user subscribed to. -@property (retain) GTLYouTubeResourceId *resourceId; +@property (nonatomic, retain) GTLYouTubeResourceId *resourceId; @end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsSubscription.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsSubscription.m similarity index 100% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsSubscription.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsSubscription.m diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsUpload.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsUpload.h similarity index 94% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsUpload.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsUpload.h index b64962e8c..82fc22ceb 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsUpload.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsUpload.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -44,6 +44,6 @@ @interface GTLYouTubeActivityContentDetailsUpload : GTLObject // The ID that YouTube uses to uniquely identify the uploaded video. -@property (copy) NSString *videoId; +@property (nonatomic, copy) NSString *videoId; @end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsUpload.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsUpload.m similarity index 100% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsUpload.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeActivityContentDetailsUpload.m diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeActivityListResponse.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeActivityListResponse.h similarity index 79% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeActivityListResponse.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeActivityListResponse.h index 65e4a0928..9864e6900 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeActivityListResponse.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeActivityListResponse.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -49,31 +49,31 @@ @interface GTLYouTubeActivityListResponse : GTLCollectionObject // Etag of this resource. -@property (copy) NSString *ETag; +@property (nonatomic, copy) NSString *ETag; // Serialized EventId of the request which produced this response. -@property (copy) NSString *eventId; +@property (nonatomic, copy) NSString *eventId; // A list of activities, or events, that match the request criteria. -@property (retain) NSArray *items; // of GTLYouTubeActivity +@property (nonatomic, retain) NSArray *items; // of GTLYouTubeActivity // Identifies what kind of resource this is. Value: the fixed string // "youtube#activityListResponse". -@property (copy) NSString *kind; +@property (nonatomic, 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; +@property (nonatomic, copy) NSString *nextPageToken; -@property (retain) GTLYouTubePageInfo *pageInfo; +@property (nonatomic, 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; +@property (nonatomic, copy) NSString *prevPageToken; -@property (retain) GTLYouTubeTokenPagination *tokenPagination; +@property (nonatomic, retain) GTLYouTubeTokenPagination *tokenPagination; // The visitorId identifies the visitor. -@property (copy) NSString *visitorId; +@property (nonatomic, copy) NSString *visitorId; @end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeActivityListResponse.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeActivityListResponse.m similarity index 85% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeActivityListResponse.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeActivityListResponse.m index 2a20a89e7..110bf743c 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeActivityListResponse.m +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeActivityListResponse.m @@ -1,4 +1,4 @@ -/* Copyright (c) 2013 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -44,16 +44,16 @@ @implementation GTLYouTubeActivityListResponse tokenPagination, visitorId; + (NSDictionary *)propertyToJSONKeyMap { - NSDictionary *map = - [NSDictionary dictionaryWithObject:@"etag" - forKey:@"ETag"]; + NSDictionary *map = @{ + @"ETag" : @"etag" + }; return map; } + (NSDictionary *)arrayPropertyToClassMap { - NSDictionary *map = - [NSDictionary dictionaryWithObject:[GTLYouTubeActivity class] - forKey:@"items"]; + NSDictionary *map = @{ + @"items" : [GTLYouTubeActivity class] + }; return map; } diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeActivitySnippet.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeActivitySnippet.h similarity index 85% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeActivitySnippet.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeActivitySnippet.h index 1615912d2..089f27a7a 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeActivitySnippet.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeActivitySnippet.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -48,14 +48,14 @@ // The ID that YouTube uses to uniquely identify the channel associated with the // activity. -@property (copy) NSString *channelId; +@property (nonatomic, copy) NSString *channelId; // Channel title for the channel responsible for this activity -@property (copy) NSString *channelTitle; +@property (nonatomic, copy) NSString *channelTitle; // The description of the resource primarily associated with the activity. // Remapped to 'descriptionProperty' to avoid NSObject's 'description'. -@property (copy) NSString *descriptionProperty; +@property (nonatomic, 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 @@ -63,22 +63,22 @@ // 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; +@property (nonatomic, copy) NSString *groupId; // The date and time that the video was uploaded. The value is specified in ISO // 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. -@property (retain) GTLDateTime *publishedAt; +@property (nonatomic, 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) GTLYouTubeThumbnailDetails *thumbnails; +@property (nonatomic, retain) GTLYouTubeThumbnailDetails *thumbnails; // The title of the resource primarily associated with the activity. -@property (copy) NSString *title; +@property (nonatomic, copy) NSString *title; // The type of activity that the resource describes. -@property (copy) NSString *type; +@property (nonatomic, copy) NSString *type; @end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeActivitySnippet.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeActivitySnippet.m similarity index 89% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeActivitySnippet.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeActivitySnippet.m index d54465aeb..51d05a5a8 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeActivitySnippet.m +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeActivitySnippet.m @@ -1,4 +1,4 @@ -/* Copyright (c) 2013 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -42,9 +42,9 @@ @implementation GTLYouTubeActivitySnippet thumbnails, title, type; + (NSDictionary *)propertyToJSONKeyMap { - NSDictionary *map = - [NSDictionary dictionaryWithObject:@"description" - forKey:@"descriptionProperty"]; + NSDictionary *map = @{ + @"descriptionProperty" : @"description" + }; return map; } diff --git a/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeCaption.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeCaption.h new file mode 100644 index 000000000..8c402bd35 --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeCaption.h @@ -0,0 +1,63 @@ +/* Copyright (c) 2015 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeCaption.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube Data API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube/v3 +// Classes: +// GTLYouTubeCaption (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLYouTubeCaptionSnippet; + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeCaption +// + +// A caption resource represents a YouTube caption track. A caption track is +// associated with exactly one YouTube video. + +@interface GTLYouTubeCaption : GTLObject + +// Etag of this resource. +@property (nonatomic, copy) NSString *ETag; + +// The ID that YouTube uses to uniquely identify the caption track. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (nonatomic, copy) NSString *identifier; + +// Identifies what kind of resource this is. Value: the fixed string +// "youtube#caption". +@property (nonatomic, copy) NSString *kind; + +// The snippet object contains basic details about the caption. +@property (nonatomic, retain) GTLYouTubeCaptionSnippet *snippet; + +@end diff --git a/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeCaption.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeCaption.m new file mode 100644 index 000000000..9479e0331 --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeCaption.m @@ -0,0 +1,55 @@ +/* Copyright (c) 2015 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeCaption.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube Data API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube/v3 +// Classes: +// GTLYouTubeCaption (0 custom class methods, 4 custom properties) + +#import "GTLYouTubeCaption.h" + +#import "GTLYouTubeCaptionSnippet.h" + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeCaption +// + +@implementation GTLYouTubeCaption +@dynamic ETag, identifier, kind, snippet; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = @{ + @"ETag" : @"etag", + @"identifier" : @"id" + }; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"youtube#caption"]; +} + +@end diff --git a/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeCaptionListResponse.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeCaptionListResponse.h new file mode 100644 index 000000000..4f5ce04bc --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeCaptionListResponse.h @@ -0,0 +1,65 @@ +/* Copyright (c) 2015 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeCaptionListResponse.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube Data API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube/v3 +// Classes: +// GTLYouTubeCaptionListResponse (0 custom class methods, 5 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLYouTubeCaption; + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeCaptionListResponse +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLYouTubeCaptionListResponse : GTLCollectionObject + +// Etag of this resource. +@property (nonatomic, copy) NSString *ETag; + +// Serialized EventId of the request which produced this response. +@property (nonatomic, copy) NSString *eventId; + +// A list of captions that match the request criteria. +@property (nonatomic, retain) NSArray *items; // of GTLYouTubeCaption + +// Identifies what kind of resource this is. Value: the fixed string +// "youtube#captionListResponse". +@property (nonatomic, copy) NSString *kind; + +// The visitorId identifies the visitor. +@property (nonatomic, copy) NSString *visitorId; + +@end diff --git a/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeCaptionListResponse.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeCaptionListResponse.m new file mode 100644 index 000000000..e7deac2b0 --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeCaptionListResponse.m @@ -0,0 +1,61 @@ +/* Copyright (c) 2015 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeCaptionListResponse.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube Data API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube/v3 +// Classes: +// GTLYouTubeCaptionListResponse (0 custom class methods, 5 custom properties) + +#import "GTLYouTubeCaptionListResponse.h" + +#import "GTLYouTubeCaption.h" + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeCaptionListResponse +// + +@implementation GTLYouTubeCaptionListResponse +@dynamic ETag, eventId, items, kind, visitorId; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = @{ + @"ETag" : @"etag" + }; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = @{ + @"items" : [GTLYouTubeCaption class] + }; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"youtube#captionListResponse"]; +} + +@end diff --git a/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeCaptionSnippet.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeCaptionSnippet.h new file mode 100644 index 000000000..37ccfa82b --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeCaptionSnippet.h @@ -0,0 +1,100 @@ +/* Copyright (c) 2015 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeCaptionSnippet.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube Data API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube/v3 +// Classes: +// GTLYouTubeCaptionSnippet (0 custom class methods, 13 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeCaptionSnippet +// + +// Basic details about a caption track, such as its language and name. + +@interface GTLYouTubeCaptionSnippet : GTLObject + +// The type of audio track associated with the caption track. +@property (nonatomic, copy) NSString *audioTrackType; + +// The reason that YouTube failed to process the caption track. This property is +// only present if the state property's value is failed. +@property (nonatomic, copy) NSString *failureReason; + +// Indicates whether YouTube synchronized the caption track to the audio track +// in the video. The value will be true if a sync was explicitly requested when +// the caption track was uploaded. For example, when calling the captions.insert +// or captions.update methods, you can set the sync parameter to true to +// instruct YouTube to sync the uploaded track to the video. If the value is +// false, YouTube uses the time codes in the uploaded caption track to determine +// when to display captions. +@property (nonatomic, retain) NSNumber *isAutoSynced; // boolValue + +// Indicates whether the track contains closed captions for the deaf and hard of +// hearing. The default value is false. +@property (nonatomic, retain) NSNumber *isCC; // boolValue + +// Indicates whether the caption track is a draft. If the value is true, then +// the track is not publicly visible. The default value is false. +@property (nonatomic, retain) NSNumber *isDraft; // boolValue + +// Indicates whether caption track is formatted for "easy reader," meaning it is +// at a third-grade level for language learners. The default value is false. +@property (nonatomic, retain) NSNumber *isEasyReader; // boolValue + +// Indicates whether the caption track uses large text for the vision-impaired. +// The default value is false. +@property (nonatomic, retain) NSNumber *isLarge; // boolValue + +// The language of the caption track. The property value is a BCP-47 language +// tag. +@property (nonatomic, copy) NSString *language; + +// The date and time when the caption track was last updated. The value is +// specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. +@property (nonatomic, retain) GTLDateTime *lastUpdated; + +// The name of the caption track. The name is intended to be visible to the user +// as an option during playback. +@property (nonatomic, copy) NSString *name; + +// The caption track's status. +@property (nonatomic, copy) NSString *status; + +// The caption track's type. +@property (nonatomic, copy) NSString *trackKind; + +// The ID that YouTube uses to uniquely identify the video associated with the +// caption track. +@property (nonatomic, copy) NSString *videoId; + +@end diff --git a/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeCaptionSnippet.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeCaptionSnippet.m new file mode 100644 index 000000000..4d8e2bee5 --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeCaptionSnippet.m @@ -0,0 +1,42 @@ +/* Copyright (c) 2015 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeCaptionSnippet.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube Data API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube/v3 +// Classes: +// GTLYouTubeCaptionSnippet (0 custom class methods, 13 custom properties) + +#import "GTLYouTubeCaptionSnippet.h" + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeCaptionSnippet +// + +@implementation GTLYouTubeCaptionSnippet +@dynamic audioTrackType, failureReason, isAutoSynced, isCC, isDraft, + isEasyReader, isLarge, language, lastUpdated, name, status, trackKind, + videoId; +@end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeCdnSettings.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeCdnSettings.h similarity index 88% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeCdnSettings.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeCdnSettings.h index 6b5010ff8..107f2ab01 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeCdnSettings.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeCdnSettings.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -46,13 +46,13 @@ @interface GTLYouTubeCdnSettings : GTLObject // The format of the video stream that you are sending to Youtube. -@property (copy) NSString *format; +@property (nonatomic, copy) NSString *format; // The ingestionInfo object contains information that YouTube provides that you // need to transmit your RTMP or HTTP stream to YouTube. -@property (retain) GTLYouTubeIngestionInfo *ingestionInfo; +@property (nonatomic, retain) GTLYouTubeIngestionInfo *ingestionInfo; // The method or protocol used to transmit the video stream. -@property (copy) NSString *ingestionType; +@property (nonatomic, copy) NSString *ingestionType; @end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeCdnSettings.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeCdnSettings.m similarity index 100% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeCdnSettings.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeCdnSettings.m diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannel.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannel.h similarity index 78% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannel.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannel.h index 3708527c7..98b22e1ef 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannel.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannel.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2014 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -59,56 +59,56 @@ // The auditionDetails object encapsulates channel data that is relevant for // YouTube Partners during the audition process. -@property (retain) GTLYouTubeChannelAuditDetails *auditDetails; +@property (nonatomic, retain) GTLYouTubeChannelAuditDetails *auditDetails; // The brandingSettings object encapsulates information about the branding of // the channel. -@property (retain) GTLYouTubeChannelBrandingSettings *brandingSettings; +@property (nonatomic, retain) GTLYouTubeChannelBrandingSettings *brandingSettings; // The contentDetails object encapsulates information about the channel's // content. -@property (retain) GTLYouTubeChannelContentDetails *contentDetails; +@property (nonatomic, retain) GTLYouTubeChannelContentDetails *contentDetails; // The contentOwnerDetails object encapsulates channel data that is relevant for // YouTube Partners linked with the channel. -@property (retain) GTLYouTubeChannelContentOwnerDetails *contentOwnerDetails; +@property (nonatomic, retain) GTLYouTubeChannelContentOwnerDetails *contentOwnerDetails; // The conversionPings object encapsulates information about conversion pings // that need to be respected by the channel. -@property (retain) GTLYouTubeChannelConversionPings *conversionPings; +@property (nonatomic, retain) GTLYouTubeChannelConversionPings *conversionPings; // Etag of this resource. -@property (copy) NSString *ETag; +@property (nonatomic, 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; +@property (nonatomic, copy) NSString *identifier; // The invideoPromotion object encapsulates information about promotion campaign // associated with the channel. -@property (retain) GTLYouTubeInvideoPromotion *invideoPromotion; +@property (nonatomic, retain) GTLYouTubeInvideoPromotion *invideoPromotion; // Identifies what kind of resource this is. Value: the fixed string // "youtube#channel". -@property (copy) NSString *kind; +@property (nonatomic, copy) NSString *kind; // Localizations for different languages -@property (retain) GTLYouTubeChannelLocalizations *localizations; +@property (nonatomic, retain) GTLYouTubeChannelLocalizations *localizations; // The snippet object contains basic details about the channel, such as its // title, description, and thumbnail images. -@property (retain) GTLYouTubeChannelSnippet *snippet; +@property (nonatomic, retain) GTLYouTubeChannelSnippet *snippet; // The statistics object encapsulates statistics for the channel. -@property (retain) GTLYouTubeChannelStatistics *statistics; +@property (nonatomic, retain) GTLYouTubeChannelStatistics *statistics; // The status object encapsulates information about the privacy status of the // channel. -@property (retain) GTLYouTubeChannelStatus *status; +@property (nonatomic, retain) GTLYouTubeChannelStatus *status; // The topicDetails object encapsulates information about Freebase topics // associated with the channel. -@property (retain) GTLYouTubeChannelTopicDetails *topicDetails; +@property (nonatomic, retain) GTLYouTubeChannelTopicDetails *topicDetails; @end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannel.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannel.m similarity index 93% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannel.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannel.m index a1b6173b0..bfa458968 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannel.m +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannel.m @@ -1,4 +1,4 @@ -/* Copyright (c) 2014 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -54,11 +54,10 @@ @implementation GTLYouTubeChannel localizations, snippet, statistics, status, topicDetails; + (NSDictionary *)propertyToJSONKeyMap { - NSDictionary *map = - [NSDictionary dictionaryWithObjectsAndKeys: - @"etag", @"ETag", - @"id", @"identifier", - nil]; + NSDictionary *map = @{ + @"ETag" : @"etag", + @"identifier" : @"id" + }; return map; } diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelAuditDetails.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelAuditDetails.h similarity index 84% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelAuditDetails.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelAuditDetails.h index 6d32f0022..600502cbe 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelAuditDetails.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelAuditDetails.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -45,19 +45,19 @@ @interface GTLYouTubeChannelAuditDetails : GTLObject // Whether or not the channel respects the community guidelines. -@property (retain) NSNumber *communityGuidelinesGoodStanding; // boolValue +@property (nonatomic, retain) NSNumber *communityGuidelinesGoodStanding; // boolValue // Whether or not the channel has any unresolved claims. -@property (retain) NSNumber *contentIdClaimsGoodStanding; // boolValue +@property (nonatomic, retain) NSNumber *contentIdClaimsGoodStanding; // boolValue // Whether or not the channel has any copyright strikes. -@property (retain) NSNumber *copyrightStrikesGoodStanding; // boolValue +@property (nonatomic, retain) NSNumber *copyrightStrikesGoodStanding; // boolValue // Describes the general state of the channel. This field will always show if // there are any issues whatsoever with the channel. Currently this field // represents the result of the logical and operation over the community // guidelines good standing, the copyright strikes good standing and the content // ID claims good standing, but this may change in the future. -@property (retain) NSNumber *overallGoodStanding; // boolValue +@property (nonatomic, retain) NSNumber *overallGoodStanding; // boolValue @end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelAuditDetails.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelAuditDetails.m similarity index 100% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelAuditDetails.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelAuditDetails.m diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelBannerResource.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelBannerResource.h similarity index 90% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelBannerResource.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelBannerResource.h index 15817dd0f..eb78294e0 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelBannerResource.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelBannerResource.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -44,13 +44,13 @@ @interface GTLYouTubeChannelBannerResource : GTLObject // Etag of this resource. -@property (copy) NSString *ETag; +@property (nonatomic, copy) NSString *ETag; // Identifies what kind of resource this is. Value: the fixed string // "youtube#channelBannerResource". -@property (copy) NSString *kind; +@property (nonatomic, copy) NSString *kind; // The URL of this banner image. -@property (copy) NSString *url; +@property (nonatomic, copy) NSString *url; @end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelBannerResource.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelBannerResource.m similarity index 90% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelBannerResource.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelBannerResource.m index 76f2b79e7..f82819ec5 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelBannerResource.m +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelBannerResource.m @@ -1,4 +1,4 @@ -/* Copyright (c) 2013 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -39,9 +39,9 @@ @implementation GTLYouTubeChannelBannerResource @dynamic ETag, kind, url; + (NSDictionary *)propertyToJSONKeyMap { - NSDictionary *map = - [NSDictionary dictionaryWithObject:@"etag" - forKey:@"ETag"]; + NSDictionary *map = @{ + @"ETag" : @"etag" + }; return map; } diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelBrandingSettings.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelBrandingSettings.h similarity index 84% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelBrandingSettings.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelBrandingSettings.h index 4f84af182..90db45bb3 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelBrandingSettings.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelBrandingSettings.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -49,15 +49,15 @@ @interface GTLYouTubeChannelBrandingSettings : GTLObject // Branding properties for the channel view. -@property (retain) GTLYouTubeChannelSettings *channel; +@property (nonatomic, retain) GTLYouTubeChannelSettings *channel; // Additional experimental branding properties. -@property (retain) NSArray *hints; // of GTLYouTubePropertyValue +@property (nonatomic, retain) NSArray *hints; // of GTLYouTubePropertyValue // Branding properties for branding images. -@property (retain) GTLYouTubeImageSettings *image; +@property (nonatomic, retain) GTLYouTubeImageSettings *image; // Branding properties for the watch page. -@property (retain) GTLYouTubeWatchSettings *watch; +@property (nonatomic, retain) GTLYouTubeWatchSettings *watch; @end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelBrandingSettings.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelBrandingSettings.m similarity index 89% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelBrandingSettings.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelBrandingSettings.m index 7069edf9f..cbeb4bf3f 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelBrandingSettings.m +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelBrandingSettings.m @@ -1,4 +1,4 @@ -/* Copyright (c) 2013 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -44,9 +44,9 @@ @implementation GTLYouTubeChannelBrandingSettings @dynamic channel, hints, image, watch; + (NSDictionary *)arrayPropertyToClassMap { - NSDictionary *map = - [NSDictionary dictionaryWithObject:[GTLYouTubePropertyValue class] - forKey:@"hints"]; + NSDictionary *map = @{ + @"hints" : [GTLYouTubePropertyValue class] + }; return map; } diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelContentDetails.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelContentDetails.h similarity index 86% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelContentDetails.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelContentDetails.h index 4a9ff3435..44823f416 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelContentDetails.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelContentDetails.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -48,9 +48,9 @@ // The googlePlusUserId object identifies the Google+ profile ID associated with // this channel. -@property (copy) NSString *googlePlusUserId; +@property (nonatomic, copy) NSString *googlePlusUserId; -@property (retain) GTLYouTubeChannelContentDetailsRelatedPlaylists *relatedPlaylists; +@property (nonatomic, retain) GTLYouTubeChannelContentDetailsRelatedPlaylists *relatedPlaylists; @end @@ -64,26 +64,26 @@ // 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; +@property (nonatomic, 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; +@property (nonatomic, 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; +@property (nonatomic, 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; +@property (nonatomic, copy) NSString *watchHistory; // The ID of the playlist that contains 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; +@property (nonatomic, copy) NSString *watchLater; @end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelContentDetails.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelContentDetails.m similarity index 100% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelContentDetails.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelContentDetails.m diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelContentOwnerDetails.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelContentOwnerDetails.h similarity index 92% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelContentOwnerDetails.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelContentOwnerDetails.h index d46f6f0ba..06c26a48d 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelContentOwnerDetails.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelContentOwnerDetails.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2014 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -45,10 +45,10 @@ @interface GTLYouTubeChannelContentOwnerDetails : GTLObject // The ID of the content owner linked to the channel. -@property (copy) NSString *contentOwner; +@property (nonatomic, copy) NSString *contentOwner; // The date and time of when the channel was linked to the content owner. The // value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. -@property (retain) GTLDateTime *timeLinked; +@property (nonatomic, retain) GTLDateTime *timeLinked; @end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelContentOwnerDetails.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelContentOwnerDetails.m similarity index 100% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelContentOwnerDetails.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelContentOwnerDetails.m diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelConversionPing.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelConversionPing.h similarity index 93% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelConversionPing.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelConversionPing.h index 8b8e4d736..1291e0dda 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelConversionPing.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelConversionPing.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -46,7 +46,7 @@ @interface GTLYouTubeChannelConversionPing : GTLObject // Defines the context of the ping. -@property (copy) NSString *context; +@property (nonatomic, copy) NSString *context; // The url (without the schema) that the player shall send the ping to. It's at // caller's descretion to decide which schema to use (http vs https) Example of @@ -55,6 +55,6 @@ // cview%3Butuid%3DGISQtTNGYqaYl4sKxoVvKA&labe=default The caller must append // biscotti authentication (ms param in case of mobile, for example) to this // ping. -@property (copy) NSString *conversionUrl; +@property (nonatomic, copy) NSString *conversionUrl; @end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelConversionPing.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelConversionPing.m similarity index 100% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelConversionPing.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelConversionPing.m diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelConversionPings.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelConversionPings.h similarity index 93% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelConversionPings.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelConversionPings.h index d9e0330a7..de881fded 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelConversionPings.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelConversionPings.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -49,6 +49,6 @@ // Pings that the app shall fire (authenticated by biscotti cookie). Each ping // has a context, in which the app must fire the ping, and a url identifying the // ping. -@property (retain) NSArray *pings; // of GTLYouTubeChannelConversionPing +@property (nonatomic, retain) NSArray *pings; // of GTLYouTubeChannelConversionPing @end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelConversionPings.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelConversionPings.m similarity index 88% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelConversionPings.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelConversionPings.m index f25cf9d89..e5865afaf 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelConversionPings.m +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelConversionPings.m @@ -1,4 +1,4 @@ -/* Copyright (c) 2013 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -41,9 +41,9 @@ @implementation GTLYouTubeChannelConversionPings @dynamic pings; + (NSDictionary *)arrayPropertyToClassMap { - NSDictionary *map = - [NSDictionary dictionaryWithObject:[GTLYouTubeChannelConversionPing class] - forKey:@"pings"]; + NSDictionary *map = @{ + @"pings" : [GTLYouTubeChannelConversionPing class] + }; return map; } diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelListResponse.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelListResponse.h similarity index 79% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelListResponse.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelListResponse.h index 5a7354c63..63aaf4138 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelListResponse.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelListResponse.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -49,31 +49,31 @@ @interface GTLYouTubeChannelListResponse : GTLCollectionObject // Etag of this resource. -@property (copy) NSString *ETag; +@property (nonatomic, copy) NSString *ETag; // Serialized EventId of the request which produced this response. -@property (copy) NSString *eventId; +@property (nonatomic, copy) NSString *eventId; // A list of channels that match the request criteria. -@property (retain) NSArray *items; // of GTLYouTubeChannel +@property (nonatomic, retain) NSArray *items; // of GTLYouTubeChannel // Identifies what kind of resource this is. Value: the fixed string // "youtube#channelListResponse". -@property (copy) NSString *kind; +@property (nonatomic, 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; +@property (nonatomic, copy) NSString *nextPageToken; -@property (retain) GTLYouTubePageInfo *pageInfo; +@property (nonatomic, 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; +@property (nonatomic, copy) NSString *prevPageToken; -@property (retain) GTLYouTubeTokenPagination *tokenPagination; +@property (nonatomic, retain) GTLYouTubeTokenPagination *tokenPagination; // The visitorId identifies the visitor. -@property (copy) NSString *visitorId; +@property (nonatomic, copy) NSString *visitorId; @end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelListResponse.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelListResponse.m similarity index 85% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelListResponse.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelListResponse.m index f72dcd9be..c958d00cb 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelListResponse.m +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelListResponse.m @@ -1,4 +1,4 @@ -/* Copyright (c) 2013 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -44,16 +44,16 @@ @implementation GTLYouTubeChannelListResponse tokenPagination, visitorId; + (NSDictionary *)propertyToJSONKeyMap { - NSDictionary *map = - [NSDictionary dictionaryWithObject:@"etag" - forKey:@"ETag"]; + NSDictionary *map = @{ + @"ETag" : @"etag" + }; return map; } + (NSDictionary *)arrayPropertyToClassMap { - NSDictionary *map = - [NSDictionary dictionaryWithObject:[GTLYouTubeChannel class] - forKey:@"items"]; + NSDictionary *map = @{ + @"items" : [GTLYouTubeChannel class] + }; return map; } diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelLocalization.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelLocalization.h similarity index 88% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelLocalization.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelLocalization.h index c6cbb2588..4bc3c9369 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelLocalization.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelLocalization.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2014 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -45,9 +45,9 @@ // The localized strings for channel's description. // Remapped to 'descriptionProperty' to avoid NSObject's 'description'. -@property (copy) NSString *descriptionProperty; +@property (nonatomic, copy) NSString *descriptionProperty; -// The localized strings for channel's title, read-only. -@property (copy) NSString *title; +// The localized strings for channel's title. +@property (nonatomic, copy) NSString *title; @end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelLocalization.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelLocalization.m similarity index 88% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelLocalization.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelLocalization.m index 6757758f5..45f9955e1 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelLocalization.m +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelLocalization.m @@ -1,4 +1,4 @@ -/* Copyright (c) 2014 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -39,9 +39,9 @@ @implementation GTLYouTubeChannelLocalization @dynamic descriptionProperty, title; + (NSDictionary *)propertyToJSONKeyMap { - NSDictionary *map = - [NSDictionary dictionaryWithObject:@"description" - forKey:@"descriptionProperty"]; + NSDictionary *map = @{ + @"descriptionProperty" : @"description" + }; return map; } diff --git a/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelProfileDetails.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelProfileDetails.h new file mode 100644 index 000000000..c5d83277c --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelProfileDetails.h @@ -0,0 +1,56 @@ +/* Copyright (c) 2016 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeChannelProfileDetails.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube Data API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube/v3 +// Classes: +// GTLYouTubeChannelProfileDetails (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeChannelProfileDetails +// + +@interface GTLYouTubeChannelProfileDetails : GTLObject + +// The YouTube channel ID. +@property (nonatomic, copy) NSString *channelId; + +// The channel's URL. +@property (nonatomic, copy) NSString *channelUrl; + +// The channel's display name. +@property (nonatomic, copy) NSString *displayName; + +// The channels's avatar URL. +@property (nonatomic, copy) NSString *profileImageUrl; + +@end diff --git a/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelProfileDetails.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelProfileDetails.m new file mode 100644 index 000000000..780276e86 --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelProfileDetails.m @@ -0,0 +1,40 @@ +/* Copyright (c) 2016 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeChannelProfileDetails.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube Data API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube/v3 +// Classes: +// GTLYouTubeChannelProfileDetails (0 custom class methods, 4 custom properties) + +#import "GTLYouTubeChannelProfileDetails.h" + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeChannelProfileDetails +// + +@implementation GTLYouTubeChannelProfileDetails +@dynamic channelId, channelUrl, displayName, profileImageUrl; +@end diff --git a/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelSection.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelSection.h new file mode 100644 index 000000000..9fa2327fe --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelSection.h @@ -0,0 +1,90 @@ +/* Copyright (c) 2015 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeChannelSection.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube Data API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube/v3 +// Classes: +// GTLYouTubeChannelSection (0 custom class methods, 7 custom properties) +// GTLYouTubeChannelSectionLocalizations (0 custom class methods, 0 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLYouTubeChannelSectionContentDetails; +@class GTLYouTubeChannelSectionLocalization; +@class GTLYouTubeChannelSectionLocalizations; +@class GTLYouTubeChannelSectionSnippet; +@class GTLYouTubeChannelSectionTargeting; + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeChannelSection +// + +@interface GTLYouTubeChannelSection : GTLObject + +// The contentDetails object contains details about the channel section content, +// such as a list of playlists or channels featured in the section. +@property (nonatomic, retain) GTLYouTubeChannelSectionContentDetails *contentDetails; + +// Etag of this resource. +@property (nonatomic, copy) NSString *ETag; + +// The ID that YouTube uses to uniquely identify the channel section. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (nonatomic, copy) NSString *identifier; + +// Identifies what kind of resource this is. Value: the fixed string +// "youtube#channelSection". +@property (nonatomic, copy) NSString *kind; + +// Localizations for different languages +@property (nonatomic, retain) GTLYouTubeChannelSectionLocalizations *localizations; + +// The snippet object contains basic details about the channel section, such as +// its type, style and title. +@property (nonatomic, retain) GTLYouTubeChannelSectionSnippet *snippet; + +// The targeting object contains basic targeting settings about the channel +// section. +@property (nonatomic, retain) GTLYouTubeChannelSectionTargeting *targeting; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeChannelSectionLocalizations +// + +@interface GTLYouTubeChannelSectionLocalizations : GTLObject +// This object is documented as having more properties that are +// GTLYouTubeChannelSectionLocalization. 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/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelSection.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelSection.m similarity index 65% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelSection.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelSection.m index d2f3bd674..94be1c2c6 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelSection.m +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelSection.m @@ -1,4 +1,4 @@ -/* Copyright (c) 2014 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,12 +26,15 @@ // Documentation: // https://developers.google.com/youtube/v3 // Classes: -// GTLYouTubeChannelSection (0 custom class methods, 5 custom properties) +// GTLYouTubeChannelSection (0 custom class methods, 7 custom properties) +// GTLYouTubeChannelSectionLocalizations (0 custom class methods, 0 custom properties) #import "GTLYouTubeChannelSection.h" #import "GTLYouTubeChannelSectionContentDetails.h" +#import "GTLYouTubeChannelSectionLocalization.h" #import "GTLYouTubeChannelSectionSnippet.h" +#import "GTLYouTubeChannelSectionTargeting.h" // ---------------------------------------------------------------------------- // @@ -39,14 +42,14 @@ // @implementation GTLYouTubeChannelSection -@dynamic contentDetails, ETag, identifier, kind, snippet; +@dynamic contentDetails, ETag, identifier, kind, localizations, snippet, + targeting; + (NSDictionary *)propertyToJSONKeyMap { - NSDictionary *map = - [NSDictionary dictionaryWithObjectsAndKeys: - @"etag", @"ETag", - @"id", @"identifier", - nil]; + NSDictionary *map = @{ + @"ETag" : @"etag", + @"identifier" : @"id" + }; return map; } @@ -55,3 +58,17 @@ + (void)load { } @end + + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeChannelSectionLocalizations +// + +@implementation GTLYouTubeChannelSectionLocalizations + ++ (Class)classForAdditionalProperties { + return [GTLYouTubeChannelSectionLocalization class]; +} + +@end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelSectionContentDetails.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelSectionContentDetails.h similarity index 90% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelSectionContentDetails.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelSectionContentDetails.h index d7d2cc947..3affc43ed 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelSectionContentDetails.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelSectionContentDetails.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2014 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -44,10 +44,10 @@ @interface GTLYouTubeChannelSectionContentDetails : GTLObject // The channel ids for type multiple_channels. -@property (retain) NSArray *channels; // of NSString +@property (nonatomic, retain) NSArray *channels; // of NSString // The playlist ids for type single_playlist and multiple_playlists. For // singlePlaylist, only one playlistId is allowed. -@property (retain) NSArray *playlists; // of NSString +@property (nonatomic, retain) NSArray *playlists; // of NSString @end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelSectionContentDetails.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelSectionContentDetails.m similarity index 87% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelSectionContentDetails.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelSectionContentDetails.m index 650321eec..fca3c74d3 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelSectionContentDetails.m +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelSectionContentDetails.m @@ -1,4 +1,4 @@ -/* Copyright (c) 2014 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -39,11 +39,10 @@ @implementation GTLYouTubeChannelSectionContentDetails @dynamic channels, playlists; + (NSDictionary *)arrayPropertyToClassMap { - NSDictionary *map = - [NSDictionary dictionaryWithObjectsAndKeys: - [NSString class], @"channels", - [NSString class], @"playlists", - nil]; + NSDictionary *map = @{ + @"channels" : [NSString class], + @"playlists" : [NSString class] + }; return map; } diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelSectionListResponse.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelSectionListResponse.h similarity index 86% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelSectionListResponse.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelSectionListResponse.h index 5565383ec..170b2232c 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelSectionListResponse.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelSectionListResponse.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2014 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -47,19 +47,19 @@ @interface GTLYouTubeChannelSectionListResponse : GTLCollectionObject // Etag of this resource. -@property (copy) NSString *ETag; +@property (nonatomic, copy) NSString *ETag; // Serialized EventId of the request which produced this response. -@property (copy) NSString *eventId; +@property (nonatomic, copy) NSString *eventId; // A list of ChannelSections that match the request criteria. -@property (retain) NSArray *items; // of GTLYouTubeChannelSection +@property (nonatomic, retain) NSArray *items; // of GTLYouTubeChannelSection // Identifies what kind of resource this is. Value: the fixed string // "youtube#channelSectionListResponse". -@property (copy) NSString *kind; +@property (nonatomic, copy) NSString *kind; // The visitorId identifies the visitor. -@property (copy) NSString *visitorId; +@property (nonatomic, copy) NSString *visitorId; @end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelSectionListResponse.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelSectionListResponse.m similarity index 84% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelSectionListResponse.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelSectionListResponse.m index 545a93c33..fbc0a5727 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelSectionListResponse.m +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelSectionListResponse.m @@ -1,4 +1,4 @@ -/* Copyright (c) 2014 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -41,16 +41,16 @@ @implementation GTLYouTubeChannelSectionListResponse @dynamic ETag, eventId, items, kind, visitorId; + (NSDictionary *)propertyToJSONKeyMap { - NSDictionary *map = - [NSDictionary dictionaryWithObject:@"etag" - forKey:@"ETag"]; + NSDictionary *map = @{ + @"ETag" : @"etag" + }; return map; } + (NSDictionary *)arrayPropertyToClassMap { - NSDictionary *map = - [NSDictionary dictionaryWithObject:[GTLYouTubeChannelSection class] - forKey:@"items"]; + NSDictionary *map = @{ + @"items" : [GTLYouTubeChannelSection class] + }; return map; } diff --git a/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelSectionLocalization.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelSectionLocalization.h new file mode 100644 index 000000000..834cdaf01 --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelSectionLocalization.h @@ -0,0 +1,49 @@ +/* Copyright (c) 2015 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeChannelSectionLocalization.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube Data API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube/v3 +// Classes: +// GTLYouTubeChannelSectionLocalization (0 custom class methods, 1 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeChannelSectionLocalization +// + +// ChannelSection localization setting + +@interface GTLYouTubeChannelSectionLocalization : GTLObject + +// The localized strings for channel section's title. +@property (nonatomic, copy) NSString *title; + +@end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeVideoConversionPing.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelSectionLocalization.m similarity index 75% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeVideoConversionPing.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelSectionLocalization.m index b1939f62e..7783c99af 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeVideoConversionPing.m +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelSectionLocalization.m @@ -1,4 +1,4 @@ -/* Copyright (c) 2013 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ */ // -// GTLYouTubeVideoConversionPing.m +// GTLYouTubeChannelSectionLocalization.m // // ---------------------------------------------------------------------------- @@ -26,15 +26,15 @@ // Documentation: // https://developers.google.com/youtube/v3 // Classes: -// GTLYouTubeVideoConversionPing (0 custom class methods, 2 custom properties) +// GTLYouTubeChannelSectionLocalization (0 custom class methods, 1 custom properties) -#import "GTLYouTubeVideoConversionPing.h" +#import "GTLYouTubeChannelSectionLocalization.h" // ---------------------------------------------------------------------------- // -// GTLYouTubeVideoConversionPing +// GTLYouTubeChannelSectionLocalization // -@implementation GTLYouTubeVideoConversionPing -@dynamic context, conversionUrl; +@implementation GTLYouTubeChannelSectionLocalization +@dynamic title; @end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelSectionSnippet.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelSectionSnippet.h similarity index 58% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelSectionSnippet.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelSectionSnippet.h index 7c1c123aa..449a58079 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelSectionSnippet.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelSectionSnippet.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2014 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ // Documentation: // https://developers.google.com/youtube/v3 // Classes: -// GTLYouTubeChannelSectionSnippet (0 custom class methods, 5 custom properties) +// GTLYouTubeChannelSectionSnippet (0 custom class methods, 7 custom properties) #if GTL_BUILT_AS_FRAMEWORK #import "GTL/GTLObject.h" @@ -34,29 +34,37 @@ #import "GTLObject.h" #endif +@class GTLYouTubeChannelSectionLocalization; + // ---------------------------------------------------------------------------- // // GTLYouTubeChannelSectionSnippet // -// Basic details about a channelsection, including title, style and position. +// Basic details about a channel section, including title, style and position. @interface GTLYouTubeChannelSectionSnippet : GTLObject // The ID that YouTube uses to uniquely identify the channel that published the -// channelSection. -@property (copy) NSString *channelId; +// channel section. +@property (nonatomic, copy) NSString *channelId; + +// The language of the channel section's default title and description. +@property (nonatomic, copy) NSString *defaultLanguage; + +// Localized title, read-only. +@property (nonatomic, retain) GTLYouTubeChannelSectionLocalization *localized; -// The position of the channelSection in the channel. -@property (retain) NSNumber *position; // unsignedIntValue +// The position of the channel section in the channel. +@property (nonatomic, retain) NSNumber *position; // unsignedIntValue -// The style of the channelSection. -@property (copy) NSString *style; +// The style of the channel section. +@property (nonatomic, copy) NSString *style; -// The channelSection's title for multiple_playlists and multiple_channels. -@property (copy) NSString *title; +// The channel section's title for multiple_playlists and multiple_channels. +@property (nonatomic, copy) NSString *title; -// The type of the channelSection. -@property (copy) NSString *type; +// The type of the channel section. +@property (nonatomic, copy) NSString *type; @end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelSectionSnippet.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelSectionSnippet.m similarity index 83% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelSectionSnippet.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelSectionSnippet.m index 57bfd5008..6af48daff 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelSectionSnippet.m +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelSectionSnippet.m @@ -1,4 +1,4 @@ -/* Copyright (c) 2014 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,15 +26,17 @@ // Documentation: // https://developers.google.com/youtube/v3 // Classes: -// GTLYouTubeChannelSectionSnippet (0 custom class methods, 5 custom properties) +// GTLYouTubeChannelSectionSnippet (0 custom class methods, 7 custom properties) #import "GTLYouTubeChannelSectionSnippet.h" +#import "GTLYouTubeChannelSectionLocalization.h" + // ---------------------------------------------------------------------------- // // GTLYouTubeChannelSectionSnippet // @implementation GTLYouTubeChannelSectionSnippet -@dynamic channelId, position, style, title, type; +@dynamic channelId, defaultLanguage, localized, position, style, title, type; @end diff --git a/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelSectionTargeting.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelSectionTargeting.h new file mode 100644 index 000000000..c4031925e --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelSectionTargeting.h @@ -0,0 +1,55 @@ +/* Copyright (c) 2015 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeChannelSectionTargeting.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube Data API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube/v3 +// Classes: +// GTLYouTubeChannelSectionTargeting (0 custom class methods, 3 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeChannelSectionTargeting +// + +// ChannelSection targeting setting. + +@interface GTLYouTubeChannelSectionTargeting : GTLObject + +// The country the channel section is targeting. +@property (nonatomic, retain) NSArray *countries; // of NSString + +// The language the channel section is targeting. +@property (nonatomic, retain) NSArray *languages; // of NSString + +// The region the channel section is targeting. +@property (nonatomic, retain) NSArray *regions; // of NSString + +@end diff --git a/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelSectionTargeting.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelSectionTargeting.m new file mode 100644 index 000000000..08c46abfa --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelSectionTargeting.m @@ -0,0 +1,50 @@ +/* Copyright (c) 2015 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeChannelSectionTargeting.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube Data API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube/v3 +// Classes: +// GTLYouTubeChannelSectionTargeting (0 custom class methods, 3 custom properties) + +#import "GTLYouTubeChannelSectionTargeting.h" + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeChannelSectionTargeting +// + +@implementation GTLYouTubeChannelSectionTargeting +@dynamic countries, languages, regions; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = @{ + @"countries" : [NSString class], + @"languages" : [NSString class], + @"regions" : [NSString class] + }; + return map; +} + +@end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelSettings.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelSettings.h similarity index 68% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelSettings.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelSettings.h index 6865edced..95b9eb8b6 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelSettings.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelSettings.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2014 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ // Documentation: // https://developers.google.com/youtube/v3 // Classes: -// GTLYouTubeChannelSettings (0 custom class methods, 13 custom properties) +// GTLYouTubeChannelSettings (0 custom class methods, 14 custom properties) #if GTL_BUILT_AS_FRAMEWORK #import "GTL/GTLObject.h" @@ -42,45 +42,49 @@ // Branding properties for the channel view. @interface GTLYouTubeChannelSettings : GTLObject -@property (copy) NSString *defaultLanguage; + +// The country of the channel. +@property (nonatomic, copy) NSString *country; + +@property (nonatomic, copy) NSString *defaultLanguage; // Which content tab users should see when viewing the channel. -@property (copy) NSString *defaultTab; +@property (nonatomic, copy) NSString *defaultTab; // Specifies the channel description. // Remapped to 'descriptionProperty' to avoid NSObject's 'description'. -@property (copy) NSString *descriptionProperty; +@property (nonatomic, copy) NSString *descriptionProperty; // Title for the featured channels tab. -@property (copy) NSString *featuredChannelsTitle; +@property (nonatomic, copy) NSString *featuredChannelsTitle; // The list of featured channels. -@property (retain) NSArray *featuredChannelsUrls; // of NSString +@property (nonatomic, retain) NSArray *featuredChannelsUrls; // of NSString // Lists keywords associated with the channel, comma-separated. -@property (copy) NSString *keywords; +@property (nonatomic, copy) NSString *keywords; // Whether user-submitted comments left on the channel page need to be approved // by the channel owner to be publicly visible. -@property (retain) NSNumber *moderateComments; // boolValue +@property (nonatomic, retain) NSNumber *moderateComments; // boolValue // A prominent color that can be rendered on this channel page. -@property (copy) NSString *profileColor; +@property (nonatomic, copy) NSString *profileColor; // Whether the tab to browse the videos should be displayed. -@property (retain) NSNumber *showBrowseView; // boolValue +@property (nonatomic, retain) NSNumber *showBrowseView; // boolValue // Whether related channels should be proposed. -@property (retain) NSNumber *showRelatedChannels; // boolValue +@property (nonatomic, retain) NSNumber *showRelatedChannels; // boolValue // Specifies the channel title. -@property (copy) NSString *title; +@property (nonatomic, copy) NSString *title; // The ID for a Google Analytics account to track and measure traffic to the // channels. -@property (copy) NSString *trackingAnalyticsAccountId; +@property (nonatomic, copy) NSString *trackingAnalyticsAccountId; // The trailer of the channel, for users that are not subscribers. -@property (copy) NSString *unsubscribedTrailer; +@property (nonatomic, copy) NSString *unsubscribedTrailer; @end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelSettings.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelSettings.m similarity index 77% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelSettings.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelSettings.m index bb9ff8393..4efaf8fe5 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelSettings.m +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelSettings.m @@ -1,4 +1,4 @@ -/* Copyright (c) 2014 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ // Documentation: // https://developers.google.com/youtube/v3 // Classes: -// GTLYouTubeChannelSettings (0 custom class methods, 13 custom properties) +// GTLYouTubeChannelSettings (0 custom class methods, 14 custom properties) #import "GTLYouTubeChannelSettings.h" @@ -36,22 +36,22 @@ // @implementation GTLYouTubeChannelSettings -@dynamic defaultLanguage, defaultTab, descriptionProperty, +@dynamic country, defaultLanguage, defaultTab, descriptionProperty, featuredChannelsTitle, featuredChannelsUrls, keywords, moderateComments, profileColor, showBrowseView, showRelatedChannels, title, trackingAnalyticsAccountId, unsubscribedTrailer; + (NSDictionary *)propertyToJSONKeyMap { - NSDictionary *map = - [NSDictionary dictionaryWithObject:@"description" - forKey:@"descriptionProperty"]; + NSDictionary *map = @{ + @"descriptionProperty" : @"description" + }; return map; } + (NSDictionary *)arrayPropertyToClassMap { - NSDictionary *map = - [NSDictionary dictionaryWithObject:[NSString class] - forKey:@"featuredChannelsUrls"]; + NSDictionary *map = @{ + @"featuredChannelsUrls" : [NSString class] + }; return map; } diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelSnippet.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelSnippet.h similarity index 75% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelSnippet.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelSnippet.h index 04d7d9560..d5217a521 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelSnippet.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelSnippet.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2014 Google Inc. +/* Copyright (c) 2016 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ // Documentation: // https://developers.google.com/youtube/v3 // Classes: -// GTLYouTubeChannelSnippet (0 custom class methods, 6 custom properties) +// GTLYouTubeChannelSnippet (0 custom class methods, 8 custom properties) #if GTL_BUILT_AS_FRAMEWORK #import "GTL/GTLObject.h" @@ -43,29 +43,36 @@ // // Basic details about a channel, including title, description and thumbnails. +// Next available id: 15. @interface GTLYouTubeChannelSnippet : GTLObject +// The country of the channel. +@property (nonatomic, copy) NSString *country; + +// The custom url of the channel. +@property (nonatomic, copy) NSString *customUrl; + // The language of the channel's default title and description. -@property (copy) NSString *defaultLanguage; +@property (nonatomic, copy) NSString *defaultLanguage; // The description of the channel. // Remapped to 'descriptionProperty' to avoid NSObject's 'description'. -@property (copy) NSString *descriptionProperty; +@property (nonatomic, copy) NSString *descriptionProperty; // Localized title and description, read-only. -@property (retain) GTLYouTubeChannelLocalization *localized; +@property (nonatomic, retain) GTLYouTubeChannelLocalization *localized; // 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; +@property (nonatomic, 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) GTLYouTubeThumbnailDetails *thumbnails; +@property (nonatomic, retain) GTLYouTubeThumbnailDetails *thumbnails; // The channel's title. -@property (copy) NSString *title; +@property (nonatomic, copy) NSString *title; @end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelSnippet.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelSnippet.m similarity index 79% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelSnippet.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelSnippet.m index e7062f243..0af9693dc 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelSnippet.m +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelSnippet.m @@ -1,4 +1,4 @@ -/* Copyright (c) 2014 Google Inc. +/* Copyright (c) 2016 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ // Documentation: // https://developers.google.com/youtube/v3 // Classes: -// GTLYouTubeChannelSnippet (0 custom class methods, 6 custom properties) +// GTLYouTubeChannelSnippet (0 custom class methods, 8 custom properties) #import "GTLYouTubeChannelSnippet.h" @@ -39,13 +39,13 @@ // @implementation GTLYouTubeChannelSnippet -@dynamic defaultLanguage, descriptionProperty, localized, publishedAt, - thumbnails, title; +@dynamic country, customUrl, defaultLanguage, descriptionProperty, localized, + publishedAt, thumbnails, title; + (NSDictionary *)propertyToJSONKeyMap { - NSDictionary *map = - [NSDictionary dictionaryWithObject:@"description" - forKey:@"descriptionProperty"]; + NSDictionary *map = @{ + @"descriptionProperty" : @"description" + }; return map; } diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelStatistics.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelStatistics.h similarity index 79% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelStatistics.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelStatistics.h index 117850ee0..6cc301461 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelStatistics.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelStatistics.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -45,18 +45,18 @@ @interface GTLYouTubeChannelStatistics : GTLObject // The number of comments for the channel. -@property (retain) NSNumber *commentCount; // unsignedLongLongValue +@property (nonatomic, retain) NSNumber *commentCount; // unsignedLongLongValue // Whether or not the number of subscribers is shown for this user. -@property (retain) NSNumber *hiddenSubscriberCount; // boolValue +@property (nonatomic, retain) NSNumber *hiddenSubscriberCount; // boolValue // The number of subscribers that the channel has. -@property (retain) NSNumber *subscriberCount; // unsignedLongLongValue +@property (nonatomic, retain) NSNumber *subscriberCount; // unsignedLongLongValue // The number of videos uploaded to the channel. -@property (retain) NSNumber *videoCount; // unsignedLongLongValue +@property (nonatomic, retain) NSNumber *videoCount; // unsignedLongLongValue // The number of times the channel has been viewed. -@property (retain) NSNumber *viewCount; // unsignedLongLongValue +@property (nonatomic, retain) NSNumber *viewCount; // unsignedLongLongValue @end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelStatistics.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelStatistics.m similarity index 100% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelStatistics.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelStatistics.m diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelStatus.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelStatus.h similarity index 88% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelStatus.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelStatus.h index 7853e0fd8..0699b85c7 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelStatus.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelStatus.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2014 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -45,12 +45,12 @@ // If true, then the user is linked to either a YouTube username or G+ account. // Otherwise, the user doesn't have a public YouTube identity. -@property (retain) NSNumber *isLinked; // boolValue +@property (nonatomic, retain) NSNumber *isLinked; // boolValue // The long uploads status of this channel. See -@property (copy) NSString *longUploadsStatus; +@property (nonatomic, copy) NSString *longUploadsStatus; // Privacy status of the channel. -@property (copy) NSString *privacyStatus; +@property (nonatomic, copy) NSString *privacyStatus; @end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelStatus.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelStatus.m similarity index 100% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelStatus.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelStatus.m diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelTopicDetails.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelTopicDetails.h similarity index 93% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelTopicDetails.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelTopicDetails.h index 2747937c0..78502302d 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelTopicDetails.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelTopicDetails.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2012 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -45,6 +45,6 @@ // 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 +@property (nonatomic, retain) NSArray *topicIds; // of NSString @end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelTopicDetails.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelTopicDetails.m similarity index 88% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelTopicDetails.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelTopicDetails.m index 003f036a1..4361be720 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelTopicDetails.m +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeChannelTopicDetails.m @@ -1,4 +1,4 @@ -/* Copyright (c) 2012 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -39,9 +39,9 @@ @implementation GTLYouTubeChannelTopicDetails @dynamic topicIds; + (NSDictionary *)arrayPropertyToClassMap { - NSDictionary *map = - [NSDictionary dictionaryWithObject:[NSString class] - forKey:@"topicIds"]; + NSDictionary *map = @{ + @"topicIds" : [NSString class] + }; return map; } diff --git a/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeComment.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeComment.h new file mode 100644 index 000000000..272d19f79 --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeComment.h @@ -0,0 +1,62 @@ +/* Copyright (c) 2015 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeComment.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube Data API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube/v3 +// Classes: +// GTLYouTubeComment (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLYouTubeCommentSnippet; + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeComment +// + +// A comment represents a single YouTube comment. + +@interface GTLYouTubeComment : GTLObject + +// Etag of this resource. +@property (nonatomic, copy) NSString *ETag; + +// The ID that YouTube uses to uniquely identify the comment. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (nonatomic, copy) NSString *identifier; + +// Identifies what kind of resource this is. Value: the fixed string +// "youtube#comment". +@property (nonatomic, copy) NSString *kind; + +// The snippet object contains basic details about the comment. +@property (nonatomic, retain) GTLYouTubeCommentSnippet *snippet; + +@end diff --git a/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeComment.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeComment.m new file mode 100644 index 000000000..4f01dde16 --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeComment.m @@ -0,0 +1,55 @@ +/* Copyright (c) 2015 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeComment.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube Data API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube/v3 +// Classes: +// GTLYouTubeComment (0 custom class methods, 4 custom properties) + +#import "GTLYouTubeComment.h" + +#import "GTLYouTubeCommentSnippet.h" + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeComment +// + +@implementation GTLYouTubeComment +@dynamic ETag, identifier, kind, snippet; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = @{ + @"ETag" : @"etag", + @"identifier" : @"id" + }; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"youtube#comment"]; +} + +@end diff --git a/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeCommentListResponse.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeCommentListResponse.h new file mode 100644 index 000000000..6d5875920 --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeCommentListResponse.h @@ -0,0 +1,74 @@ +/* Copyright (c) 2015 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeCommentListResponse.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube Data API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube/v3 +// Classes: +// GTLYouTubeCommentListResponse (0 custom class methods, 8 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLYouTubeComment; +@class GTLYouTubePageInfo; +@class GTLYouTubeTokenPagination; + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeCommentListResponse +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLYouTubeCommentListResponse : GTLCollectionObject + +// Etag of this resource. +@property (nonatomic, copy) NSString *ETag; + +// Serialized EventId of the request which produced this response. +@property (nonatomic, copy) NSString *eventId; + +// A list of comments that match the request criteria. +@property (nonatomic, retain) NSArray *items; // of GTLYouTubeComment + +// Identifies what kind of resource this is. Value: the fixed string +// "youtube#commentListResponse". +@property (nonatomic, 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 (nonatomic, copy) NSString *nextPageToken; + +@property (nonatomic, retain) GTLYouTubePageInfo *pageInfo; +@property (nonatomic, retain) GTLYouTubeTokenPagination *tokenPagination; + +// The visitorId identifies the visitor. +@property (nonatomic, copy) NSString *visitorId; + +@end diff --git a/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeCommentListResponse.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeCommentListResponse.m new file mode 100644 index 000000000..c4bdad7d7 --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeCommentListResponse.m @@ -0,0 +1,64 @@ +/* Copyright (c) 2015 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeCommentListResponse.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube Data API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube/v3 +// Classes: +// GTLYouTubeCommentListResponse (0 custom class methods, 8 custom properties) + +#import "GTLYouTubeCommentListResponse.h" + +#import "GTLYouTubeComment.h" +#import "GTLYouTubePageInfo.h" +#import "GTLYouTubeTokenPagination.h" + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeCommentListResponse +// + +@implementation GTLYouTubeCommentListResponse +@dynamic ETag, eventId, items, kind, nextPageToken, pageInfo, tokenPagination, + visitorId; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = @{ + @"ETag" : @"etag" + }; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = @{ + @"items" : [GTLYouTubeComment class] + }; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"youtube#commentListResponse"]; +} + +@end diff --git a/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeCommentSnippet.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeCommentSnippet.h new file mode 100644 index 000000000..7fd4350b7 --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeCommentSnippet.h @@ -0,0 +1,106 @@ +/* Copyright (c) 2016 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeCommentSnippet.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube Data API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube/v3 +// Classes: +// GTLYouTubeCommentSnippet (0 custom class methods, 16 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeCommentSnippet +// + +// Basic details about a comment, such as its author and text. + +@interface GTLYouTubeCommentSnippet : GTLObject + +// The id of the author's YouTube channel, if any. +@property (nonatomic, retain) id authorChannelId; + +// Link to the author's YouTube channel, if any. +@property (nonatomic, copy) NSString *authorChannelUrl; + +// The name of the user who posted the comment. +@property (nonatomic, copy) NSString *authorDisplayName; + +// Link to the author's Google+ profile, if any. +@property (nonatomic, copy) NSString *authorGoogleplusProfileUrl; + +// The URL for the avatar of the user who posted the comment. +@property (nonatomic, copy) NSString *authorProfileImageUrl; + +// Whether the current viewer can rate this comment. +@property (nonatomic, retain) NSNumber *canRate; // boolValue + +// The id of the corresponding YouTube channel. In case of a channel comment +// this is the channel the comment refers to. In case of a video comment it's +// the video's channel. +@property (nonatomic, copy) NSString *channelId; + +// The total number of likes this comment has received. +@property (nonatomic, retain) NSNumber *likeCount; // unsignedIntValue + +// The comment's moderation status. Will not be set if the comments were +// requested through the id filter. +@property (nonatomic, copy) NSString *moderationStatus; + +// The unique id of the parent comment, only set for replies. +@property (nonatomic, copy) NSString *parentId; + +// The date and time when the comment was orignally published. The value is +// specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. +@property (nonatomic, retain) GTLDateTime *publishedAt; + +// The comment's text. The format is either plain text or HTML dependent on what +// has been requested. Even the plain text representation may differ from the +// text originally posted in that it may replace video links with video titles +// etc. +@property (nonatomic, copy) NSString *textDisplay; + +// The comment's original raw text as initially posted or last updated. The +// original text will only be returned if it is accessible to the viewer, which +// is only guaranteed if the viewer is the comment's author. +@property (nonatomic, copy) NSString *textOriginal; + +// The date and time when was last updated . The value is specified in ISO 8601 +// (YYYY-MM-DDThh:mm:ss.sZ) format. +@property (nonatomic, retain) GTLDateTime *updatedAt; + +// The ID of the video the comment refers to, if any. +@property (nonatomic, copy) NSString *videoId; + +// The rating the viewer has given to this comment. For the time being this will +// never return RATE_TYPE_DISLIKE and instead return RATE_TYPE_NONE. This may +// change in the future. +@property (nonatomic, copy) NSString *viewerRating; + +@end diff --git a/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeCommentSnippet.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeCommentSnippet.m new file mode 100644 index 000000000..1c73305d4 --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeCommentSnippet.m @@ -0,0 +1,43 @@ +/* Copyright (c) 2016 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeCommentSnippet.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube Data API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube/v3 +// Classes: +// GTLYouTubeCommentSnippet (0 custom class methods, 16 custom properties) + +#import "GTLYouTubeCommentSnippet.h" + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeCommentSnippet +// + +@implementation GTLYouTubeCommentSnippet +@dynamic authorChannelId, authorChannelUrl, authorDisplayName, + authorGoogleplusProfileUrl, authorProfileImageUrl, canRate, channelId, + likeCount, moderationStatus, parentId, publishedAt, textDisplay, + textOriginal, updatedAt, videoId, viewerRating; +@end diff --git a/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeCommentThread.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeCommentThread.h new file mode 100644 index 000000000..0f058d1e4 --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeCommentThread.h @@ -0,0 +1,70 @@ +/* Copyright (c) 2015 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeCommentThread.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube Data API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube/v3 +// Classes: +// GTLYouTubeCommentThread (0 custom class methods, 5 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLYouTubeCommentThreadReplies; +@class GTLYouTubeCommentThreadSnippet; + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeCommentThread +// + +// A comment thread represents information that applies to a top level comment +// and all its replies. It can also include the top level comment itself and +// some of the replies. + +@interface GTLYouTubeCommentThread : GTLObject + +// Etag of this resource. +@property (nonatomic, copy) NSString *ETag; + +// The ID that YouTube uses to uniquely identify the comment thread. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (nonatomic, copy) NSString *identifier; + +// Identifies what kind of resource this is. Value: the fixed string +// "youtube#commentThread". +@property (nonatomic, copy) NSString *kind; + +// The replies object contains a limited number of replies (if any) to the top +// level comment found in the snippet. +@property (nonatomic, retain) GTLYouTubeCommentThreadReplies *replies; + +// The snippet object contains basic details about the comment thread and also +// the top level comment. +@property (nonatomic, retain) GTLYouTubeCommentThreadSnippet *snippet; + +@end diff --git a/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeCommentThread.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeCommentThread.m new file mode 100644 index 000000000..f94c54154 --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeCommentThread.m @@ -0,0 +1,56 @@ +/* Copyright (c) 2015 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeCommentThread.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube Data API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube/v3 +// Classes: +// GTLYouTubeCommentThread (0 custom class methods, 5 custom properties) + +#import "GTLYouTubeCommentThread.h" + +#import "GTLYouTubeCommentThreadReplies.h" +#import "GTLYouTubeCommentThreadSnippet.h" + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeCommentThread +// + +@implementation GTLYouTubeCommentThread +@dynamic ETag, identifier, kind, replies, snippet; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = @{ + @"ETag" : @"etag", + @"identifier" : @"id" + }; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"youtube#commentThread"]; +} + +@end diff --git a/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeCommentThreadListResponse.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeCommentThreadListResponse.h new file mode 100644 index 000000000..8470f44d3 --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeCommentThreadListResponse.h @@ -0,0 +1,74 @@ +/* Copyright (c) 2015 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeCommentThreadListResponse.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube Data API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube/v3 +// Classes: +// GTLYouTubeCommentThreadListResponse (0 custom class methods, 8 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLYouTubeCommentThread; +@class GTLYouTubePageInfo; +@class GTLYouTubeTokenPagination; + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeCommentThreadListResponse +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLYouTubeCommentThreadListResponse : GTLCollectionObject + +// Etag of this resource. +@property (nonatomic, copy) NSString *ETag; + +// Serialized EventId of the request which produced this response. +@property (nonatomic, copy) NSString *eventId; + +// A list of comment threads that match the request criteria. +@property (nonatomic, retain) NSArray *items; // of GTLYouTubeCommentThread + +// Identifies what kind of resource this is. Value: the fixed string +// "youtube#commentThreadListResponse". +@property (nonatomic, 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 (nonatomic, copy) NSString *nextPageToken; + +@property (nonatomic, retain) GTLYouTubePageInfo *pageInfo; +@property (nonatomic, retain) GTLYouTubeTokenPagination *tokenPagination; + +// The visitorId identifies the visitor. +@property (nonatomic, copy) NSString *visitorId; + +@end diff --git a/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeCommentThreadListResponse.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeCommentThreadListResponse.m new file mode 100644 index 000000000..b852c6594 --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeCommentThreadListResponse.m @@ -0,0 +1,64 @@ +/* Copyright (c) 2015 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeCommentThreadListResponse.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube Data API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube/v3 +// Classes: +// GTLYouTubeCommentThreadListResponse (0 custom class methods, 8 custom properties) + +#import "GTLYouTubeCommentThreadListResponse.h" + +#import "GTLYouTubeCommentThread.h" +#import "GTLYouTubePageInfo.h" +#import "GTLYouTubeTokenPagination.h" + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeCommentThreadListResponse +// + +@implementation GTLYouTubeCommentThreadListResponse +@dynamic ETag, eventId, items, kind, nextPageToken, pageInfo, tokenPagination, + visitorId; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = @{ + @"ETag" : @"etag" + }; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = @{ + @"items" : [GTLYouTubeCommentThread class] + }; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"youtube#commentThreadListResponse"]; +} + +@end diff --git a/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeCommentThreadReplies.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeCommentThreadReplies.h new file mode 100644 index 000000000..ada080b0d --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeCommentThreadReplies.h @@ -0,0 +1,53 @@ +/* Copyright (c) 2015 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeCommentThreadReplies.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube Data API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube/v3 +// Classes: +// GTLYouTubeCommentThreadReplies (0 custom class methods, 1 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLYouTubeComment; + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeCommentThreadReplies +// + +// Comments written in (direct or indirect) reply to the top level comment. + +@interface GTLYouTubeCommentThreadReplies : GTLObject + +// A limited number of replies. Unless the number of replies returned equals +// total_reply_count in the snippet the returned replies are only a subset of +// the total number of replies. +@property (nonatomic, retain) NSArray *comments; // of GTLYouTubeComment + +@end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeVideoConversionPings.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeCommentThreadReplies.m similarity index 69% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeVideoConversionPings.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeCommentThreadReplies.m index 95accb770..9ba94eb55 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeVideoConversionPings.m +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeCommentThreadReplies.m @@ -1,4 +1,4 @@ -/* Copyright (c) 2013 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ */ // -// GTLYouTubeVideoConversionPings.m +// GTLYouTubeCommentThreadReplies.m // // ---------------------------------------------------------------------------- @@ -26,24 +26,24 @@ // Documentation: // https://developers.google.com/youtube/v3 // Classes: -// GTLYouTubeVideoConversionPings (0 custom class methods, 1 custom properties) +// GTLYouTubeCommentThreadReplies (0 custom class methods, 1 custom properties) -#import "GTLYouTubeVideoConversionPings.h" +#import "GTLYouTubeCommentThreadReplies.h" -#import "GTLYouTubeVideoConversionPing.h" +#import "GTLYouTubeComment.h" // ---------------------------------------------------------------------------- // -// GTLYouTubeVideoConversionPings +// GTLYouTubeCommentThreadReplies // -@implementation GTLYouTubeVideoConversionPings -@dynamic pings; +@implementation GTLYouTubeCommentThreadReplies +@dynamic comments; + (NSDictionary *)arrayPropertyToClassMap { - NSDictionary *map = - [NSDictionary dictionaryWithObject:[GTLYouTubeVideoConversionPing class] - forKey:@"pings"]; + NSDictionary *map = @{ + @"comments" : [GTLYouTubeComment class] + }; return map; } diff --git a/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeCommentThreadSnippet.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeCommentThreadSnippet.h new file mode 100644 index 000000000..aa1888a8f --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeCommentThreadSnippet.h @@ -0,0 +1,71 @@ +/* Copyright (c) 2015 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeCommentThreadSnippet.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube Data API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube/v3 +// Classes: +// GTLYouTubeCommentThreadSnippet (0 custom class methods, 6 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLYouTubeComment; + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeCommentThreadSnippet +// + +// Basic details about a comment thread. + +@interface GTLYouTubeCommentThreadSnippet : GTLObject + +// Whether the current viewer of the thread can reply to it. This is viewer +// specific - other viewers may see a different value for this field. +@property (nonatomic, retain) NSNumber *canReply; // boolValue + +// The YouTube channel the comments in the thread refer to or the channel with +// the video the comments refer to. If video_id isn't set the comments refer to +// the channel itself. +@property (nonatomic, copy) NSString *channelId; + +// Whether the thread (and therefore all its comments) is visible to all YouTube +// users. +@property (nonatomic, retain) NSNumber *isPublic; // boolValue + +// The top level comment of this thread. +@property (nonatomic, retain) GTLYouTubeComment *topLevelComment; + +// The total number of replies (not including the top level comment). +@property (nonatomic, retain) NSNumber *totalReplyCount; // unsignedIntValue + +// The ID of the video the comments refer to, if any. No video_id implies a +// channel discussion comment. +@property (nonatomic, copy) NSString *videoId; + +@end diff --git a/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeCommentThreadSnippet.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeCommentThreadSnippet.m new file mode 100644 index 000000000..b5aba685e --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeCommentThreadSnippet.m @@ -0,0 +1,43 @@ +/* Copyright (c) 2015 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeCommentThreadSnippet.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube Data API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube/v3 +// Classes: +// GTLYouTubeCommentThreadSnippet (0 custom class methods, 6 custom properties) + +#import "GTLYouTubeCommentThreadSnippet.h" + +#import "GTLYouTubeComment.h" + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeCommentThreadSnippet +// + +@implementation GTLYouTubeCommentThreadSnippet +@dynamic canReply, channelId, isPublic, topLevelComment, totalReplyCount, + videoId; +@end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeConstants.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeConstants.h similarity index 83% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeConstants.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeConstants.h index 6a447c351..41c67a3d9 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeConstants.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeConstants.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2014 Google Inc. +/* Copyright (c) 2016 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -37,6 +37,8 @@ // Authorization scope // Manage your YouTube account GTL_EXTERN NSString * const kGTLAuthScopeYouTube; // "https://www.googleapis.com/auth/youtube" +// Manage your YouTube account +GTL_EXTERN NSString * const kGTLAuthScopeYouTubeForceSsl; // "https://www.googleapis.com/auth/youtube.force-ssl" // View your YouTube account GTL_EXTERN NSString * const kGTLAuthScopeYouTubeReadonly; // "https://www.googleapis.com/auth/youtube.readonly" // Manage your YouTube videos @@ -56,6 +58,11 @@ GTL_EXTERN NSString * const kGTLYouTubeBroadcastStatusLive; // "live" GTL_EXTERN NSString * const kGTLYouTubeBroadcastStatusTesting; // "testing" GTL_EXTERN NSString * const kGTLYouTubeBroadcastStatusUpcoming; // "upcoming" +// GTLQueryYouTube - BroadcastType +GTL_EXTERN NSString * const kGTLYouTubeBroadcastTypeAll; // "all" +GTL_EXTERN NSString * const kGTLYouTubeBroadcastTypeEvent; // "event" +GTL_EXTERN NSString * const kGTLYouTubeBroadcastTypePersistent; // "persistent" + // GTLQueryYouTube - ChannelType GTL_EXTERN NSString * const kGTLYouTubeChannelTypeAny; // "any" GTL_EXTERN NSString * const kGTLYouTubeChannelTypeShow; // "show" @@ -68,6 +75,16 @@ GTL_EXTERN NSString * const kGTLYouTubeEventTypeCompleted; // "completed" GTL_EXTERN NSString * const kGTLYouTubeEventTypeLive; // "live" GTL_EXTERN NSString * const kGTLYouTubeEventTypeUpcoming; // "upcoming" +// GTLQueryYouTube - Filter +GTL_EXTERN NSString * const kGTLYouTubeFilterAll; // "all" +GTL_EXTERN NSString * const kGTLYouTubeFilterNewest; // "newest" + +// GTLQueryYouTube - ModerationStatus +GTL_EXTERN NSString * const kGTLYouTubeModerationStatusHeldForReview; // "heldForReview" +GTL_EXTERN NSString * const kGTLYouTubeModerationStatusLikelySpam; // "likelySpam" +GTL_EXTERN NSString * const kGTLYouTubeModerationStatusPublished; // "published" +GTL_EXTERN NSString * const kGTLYouTubeModerationStatusRejected; // "rejected" + // GTLQueryYouTube - MyRating GTL_EXTERN NSString * const kGTLYouTubeMyRatingDislike; // "dislike" GTL_EXTERN NSString * const kGTLYouTubeMyRatingLike; // "like" @@ -77,6 +94,7 @@ 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 kGTLYouTubeOrderTime; // "time" GTL_EXTERN NSString * const kGTLYouTubeOrderTitle; // "title" GTL_EXTERN NSString * const kGTLYouTubeOrderUnread; // "unread" GTL_EXTERN NSString * const kGTLYouTubeOrderVideoCount; // "videoCount" @@ -92,6 +110,17 @@ GTL_EXTERN NSString * const kGTLYouTubeSafeSearchModerate; // "moderate" GTL_EXTERN NSString * const kGTLYouTubeSafeSearchNone; // "none" GTL_EXTERN NSString * const kGTLYouTubeSafeSearchStrict; // "strict" +// GTLQueryYouTube - TextFormat +GTL_EXTERN NSString * const kGTLYouTubeTextFormatHtml; // "html" +GTL_EXTERN NSString * const kGTLYouTubeTextFormatPlainText; // "plainText" + +// GTLQueryYouTube - Tfmt +GTL_EXTERN NSString * const kGTLYouTubeTfmtSbv; // "sbv" +GTL_EXTERN NSString * const kGTLYouTubeTfmtScc; // "scc" +GTL_EXTERN NSString * const kGTLYouTubeTfmtSrt; // "srt" +GTL_EXTERN NSString * const kGTLYouTubeTfmtTtml; // "ttml" +GTL_EXTERN NSString * const kGTLYouTubeTfmtVtt; // "vtt" + // GTLQueryYouTube - VideoCaption GTL_EXTERN NSString * const kGTLYouTubeVideoCaptionAny; // "any" GTL_EXTERN NSString * const kGTLYouTubeVideoCaptionClosedCaption; // "closedCaption" @@ -160,6 +189,27 @@ GTL_EXTERN NSString * const kGTLYouTubeActivitySnippet_Type_Social; // "social" GTL_EXTERN NSString * const kGTLYouTubeActivitySnippet_Type_Subscription; // "subscription" GTL_EXTERN NSString * const kGTLYouTubeActivitySnippet_Type_Upload; // "upload" +// GTLYouTubeCaptionSnippet - AudioTrackType +GTL_EXTERN NSString * const kGTLYouTubeCaptionSnippet_AudioTrackType_Commentary; // "commentary" +GTL_EXTERN NSString * const kGTLYouTubeCaptionSnippet_AudioTrackType_Descriptive; // "descriptive" +GTL_EXTERN NSString * const kGTLYouTubeCaptionSnippet_AudioTrackType_Primary; // "primary" +GTL_EXTERN NSString * const kGTLYouTubeCaptionSnippet_AudioTrackType_Unknown; // "unknown" + +// GTLYouTubeCaptionSnippet - FailureReason +GTL_EXTERN NSString * const kGTLYouTubeCaptionSnippet_FailureReason_ProcessingFailed; // "processingFailed" +GTL_EXTERN NSString * const kGTLYouTubeCaptionSnippet_FailureReason_UnknownFormat; // "unknownFormat" +GTL_EXTERN NSString * const kGTLYouTubeCaptionSnippet_FailureReason_UnsupportedFormat; // "unsupportedFormat" + +// GTLYouTubeCaptionSnippet - Status +GTL_EXTERN NSString * const kGTLYouTubeCaptionSnippet_Status_Failed; // "failed" +GTL_EXTERN NSString * const kGTLYouTubeCaptionSnippet_Status_Serving; // "serving" +GTL_EXTERN NSString * const kGTLYouTubeCaptionSnippet_Status_Syncing; // "syncing" + +// GTLYouTubeCaptionSnippet - TrackKind +GTL_EXTERN NSString * const kGTLYouTubeCaptionSnippet_TrackKind_Asr; // "ASR" +GTL_EXTERN NSString * const kGTLYouTubeCaptionSnippet_TrackKind_Forced; // "forced" +GTL_EXTERN NSString * const kGTLYouTubeCaptionSnippet_TrackKind_Standard; // "standard" + // GTLYouTubeCdnSettings - IngestionType GTL_EXTERN NSString * const kGTLYouTubeCdnSettings_IngestionType_Dash; // "dash" GTL_EXTERN NSString * const kGTLYouTubeCdnSettings_IngestionType_Rtmp; // "rtmp" @@ -204,6 +254,18 @@ GTL_EXTERN NSString * const kGTLYouTubeChannelStatus_PrivacyStatus_Private; // GTL_EXTERN NSString * const kGTLYouTubeChannelStatus_PrivacyStatus_Public; // "public" GTL_EXTERN NSString * const kGTLYouTubeChannelStatus_PrivacyStatus_Unlisted; // "unlisted" +// GTLYouTubeCommentSnippet - ModerationStatus +GTL_EXTERN NSString * const kGTLYouTubeCommentSnippet_ModerationStatus_HeldForReview; // "heldForReview" +GTL_EXTERN NSString * const kGTLYouTubeCommentSnippet_ModerationStatus_LikelySpam; // "likelySpam" +GTL_EXTERN NSString * const kGTLYouTubeCommentSnippet_ModerationStatus_Published; // "published" +GTL_EXTERN NSString * const kGTLYouTubeCommentSnippet_ModerationStatus_Rejected; // "rejected" + +// GTLYouTubeCommentSnippet - ViewerRating +GTL_EXTERN NSString * const kGTLYouTubeCommentSnippet_ViewerRating_Dislike; // "dislike" +GTL_EXTERN NSString * const kGTLYouTubeCommentSnippet_ViewerRating_Like; // "like" +GTL_EXTERN NSString * const kGTLYouTubeCommentSnippet_ViewerRating_None; // "none" +GTL_EXTERN NSString * const kGTLYouTubeCommentSnippet_ViewerRating_Unspecified; // "unspecified" + // GTLYouTubeContentRating - AcbRating GTL_EXTERN NSString * const kGTLYouTubeContentRating_AcbRating_AcbC; // "acbC" GTL_EXTERN NSString * const kGTLYouTubeContentRating_AcbRating_AcbE; // "acbE" @@ -333,12 +395,22 @@ GTL_EXTERN NSString * const kGTLYouTubeContentRating_CnaRating_Cna18plus; // "c GTL_EXTERN NSString * const kGTLYouTubeContentRating_CnaRating_CnaAp; // "cnaAp" GTL_EXTERN NSString * const kGTLYouTubeContentRating_CnaRating_CnaUnrated; // "cnaUnrated" +// GTLYouTubeContentRating - CncRating +GTL_EXTERN NSString * const kGTLYouTubeContentRating_CncRating_Cnc10; // "cnc10" +GTL_EXTERN NSString * const kGTLYouTubeContentRating_CncRating_Cnc12; // "cnc12" +GTL_EXTERN NSString * const kGTLYouTubeContentRating_CncRating_Cnc16; // "cnc16" +GTL_EXTERN NSString * const kGTLYouTubeContentRating_CncRating_Cnc18; // "cnc18" +GTL_EXTERN NSString * const kGTLYouTubeContentRating_CncRating_CncE; // "cncE" +GTL_EXTERN NSString * const kGTLYouTubeContentRating_CncRating_CncT; // "cncT" +GTL_EXTERN NSString * const kGTLYouTubeContentRating_CncRating_CncUnrated; // "cncUnrated" + // GTLYouTubeContentRating - CsaRating GTL_EXTERN NSString * const kGTLYouTubeContentRating_CsaRating_Csa10; // "csa10" GTL_EXTERN NSString * const kGTLYouTubeContentRating_CsaRating_Csa12; // "csa12" GTL_EXTERN NSString * const kGTLYouTubeContentRating_CsaRating_Csa16; // "csa16" GTL_EXTERN NSString * const kGTLYouTubeContentRating_CsaRating_Csa18; // "csa18" GTL_EXTERN NSString * const kGTLYouTubeContentRating_CsaRating_CsaInterdiction; // "csaInterdiction" +GTL_EXTERN NSString * const kGTLYouTubeContentRating_CsaRating_CsaT; // "csaT" GTL_EXTERN NSString * const kGTLYouTubeContentRating_CsaRating_CsaUnrated; // "csaUnrated" // GTLYouTubeContentRating - CscfRating @@ -346,7 +418,9 @@ GTL_EXTERN NSString * const kGTLYouTubeContentRating_CscfRating_Cscf12; // "csc GTL_EXTERN NSString * const kGTLYouTubeContentRating_CscfRating_Cscf16; // "cscf16" GTL_EXTERN NSString * const kGTLYouTubeContentRating_CscfRating_Cscf18; // "cscf18" GTL_EXTERN NSString * const kGTLYouTubeContentRating_CscfRating_Cscf6; // "cscf6" +GTL_EXTERN NSString * const kGTLYouTubeContentRating_CscfRating_Cscf9; // "cscf9" GTL_EXTERN NSString * const kGTLYouTubeContentRating_CscfRating_CscfA; // "cscfA" +GTL_EXTERN NSString * const kGTLYouTubeContentRating_CscfRating_CscfAl; // "cscfAl" GTL_EXTERN NSString * const kGTLYouTubeContentRating_CscfRating_CscfUnrated; // "cscfUnrated" // GTLYouTubeContentRating - CzfilmRating @@ -379,6 +453,17 @@ GTL_EXTERN NSString * const kGTLYouTubeContentRating_DjctqRatingReasons_DjctqSex GTL_EXTERN NSString * const kGTLYouTubeContentRating_DjctqRatingReasons_DjctqSexualContent; // "djctqSexualContent" GTL_EXTERN NSString * const kGTLYouTubeContentRating_DjctqRatingReasons_DjctqViolence; // "djctqViolence" +// GTLYouTubeContentRating - EcbmctRating +GTL_EXTERN NSString * const kGTLYouTubeContentRating_EcbmctRating_Ecbmct13a; // "ecbmct13a" +GTL_EXTERN NSString * const kGTLYouTubeContentRating_EcbmctRating_Ecbmct13plus; // "ecbmct13plus" +GTL_EXTERN NSString * const kGTLYouTubeContentRating_EcbmctRating_Ecbmct15a; // "ecbmct15a" +GTL_EXTERN NSString * const kGTLYouTubeContentRating_EcbmctRating_Ecbmct15plus; // "ecbmct15plus" +GTL_EXTERN NSString * const kGTLYouTubeContentRating_EcbmctRating_Ecbmct18plus; // "ecbmct18plus" +GTL_EXTERN NSString * const kGTLYouTubeContentRating_EcbmctRating_Ecbmct7a; // "ecbmct7a" +GTL_EXTERN NSString * const kGTLYouTubeContentRating_EcbmctRating_Ecbmct7plus; // "ecbmct7plus" +GTL_EXTERN NSString * const kGTLYouTubeContentRating_EcbmctRating_EcbmctG; // "ecbmctG" +GTL_EXTERN NSString * const kGTLYouTubeContentRating_EcbmctRating_EcbmctUnrated; // "ecbmctUnrated" + // GTLYouTubeContentRating - EefilmRating GTL_EXTERN NSString * const kGTLYouTubeContentRating_EefilmRating_EefilmK12; // "eefilmK12" GTL_EXTERN NSString * const kGTLYouTubeContentRating_EefilmRating_EefilmK14; // "eefilmK14" @@ -410,11 +495,13 @@ GTL_EXTERN NSString * const kGTLYouTubeContentRating_FcbmRating_Fcbm18pl; // "f GTL_EXTERN NSString * const kGTLYouTubeContentRating_FcbmRating_Fcbm18sg; // "fcbm18sg" GTL_EXTERN NSString * const kGTLYouTubeContentRating_FcbmRating_Fcbm18sx; // "fcbm18sx" GTL_EXTERN NSString * const kGTLYouTubeContentRating_FcbmRating_FcbmP13; // "fcbmP13" +GTL_EXTERN NSString * const kGTLYouTubeContentRating_FcbmRating_FcbmPg13; // "fcbmPg13" GTL_EXTERN NSString * const kGTLYouTubeContentRating_FcbmRating_FcbmU; // "fcbmU" GTL_EXTERN NSString * const kGTLYouTubeContentRating_FcbmRating_FcbmUnrated; // "fcbmUnrated" // GTLYouTubeContentRating - FcoRating GTL_EXTERN NSString * const kGTLYouTubeContentRating_FcoRating_FcoI; // "fcoI" +GTL_EXTERN NSString * const kGTLYouTubeContentRating_FcoRating_FcoIi; // "fcoIi" GTL_EXTERN NSString * const kGTLYouTubeContentRating_FcoRating_FcoIia; // "fcoIia" GTL_EXTERN NSString * const kGTLYouTubeContentRating_FcoRating_FcoIib; // "fcoIib" GTL_EXTERN NSString * const kGTLYouTubeContentRating_FcoRating_FcoIii; // "fcoIii" @@ -430,6 +517,7 @@ GTL_EXTERN NSString * const kGTLYouTubeContentRating_FmocRating_FmocU; // "fmoc GTL_EXTERN NSString * const kGTLYouTubeContentRating_FmocRating_FmocUnrated; // "fmocUnrated" // GTLYouTubeContentRating - FpbRating +GTL_EXTERN NSString * const kGTLYouTubeContentRating_FpbRating_Fpb10; // "fpb10" GTL_EXTERN NSString * const kGTLYouTubeContentRating_FpbRating_Fpb1012Pg; // "fpb1012Pg" GTL_EXTERN NSString * const kGTLYouTubeContentRating_FpbRating_Fpb13; // "fpb13" GTL_EXTERN NSString * const kGTLYouTubeContentRating_FpbRating_Fpb16; // "fpb16" @@ -468,7 +556,10 @@ GTL_EXTERN NSString * const kGTLYouTubeContentRating_IcaaRating_IcaaX; // "icaa // GTLYouTubeContentRating - IfcoRating GTL_EXTERN NSString * const kGTLYouTubeContentRating_IfcoRating_Ifco12; // "ifco12" +GTL_EXTERN NSString * const kGTLYouTubeContentRating_IfcoRating_Ifco12a; // "ifco12a" GTL_EXTERN NSString * const kGTLYouTubeContentRating_IfcoRating_Ifco15; // "ifco15" +GTL_EXTERN NSString * const kGTLYouTubeContentRating_IfcoRating_Ifco15a; // "ifco15a" +GTL_EXTERN NSString * const kGTLYouTubeContentRating_IfcoRating_Ifco16; // "ifco16" GTL_EXTERN NSString * const kGTLYouTubeContentRating_IfcoRating_Ifco18; // "ifco18" GTL_EXTERN NSString * const kGTLYouTubeContentRating_IfcoRating_IfcoG; // "ifcoG" GTL_EXTERN NSString * const kGTLYouTubeContentRating_IfcoRating_IfcoPg; // "ifcoPg" @@ -499,6 +590,7 @@ GTL_EXTERN NSString * const kGTLYouTubeContentRating_KfcbRating_KfcbUnrated; // // GTLYouTubeContentRating - KijkwijzerRating GTL_EXTERN NSString * const kGTLYouTubeContentRating_KijkwijzerRating_Kijkwijzer12; // "kijkwijzer12" GTL_EXTERN NSString * const kGTLYouTubeContentRating_KijkwijzerRating_Kijkwijzer16; // "kijkwijzer16" +GTL_EXTERN NSString * const kGTLYouTubeContentRating_KijkwijzerRating_Kijkwijzer18; // "kijkwijzer18" GTL_EXTERN NSString * const kGTLYouTubeContentRating_KijkwijzerRating_Kijkwijzer6; // "kijkwijzer6" GTL_EXTERN NSString * const kGTLYouTubeContentRating_KijkwijzerRating_Kijkwijzer9; // "kijkwijzer9" GTL_EXTERN NSString * const kGTLYouTubeContentRating_KijkwijzerRating_KijkwijzerAl; // "kijkwijzerAl" @@ -513,6 +605,9 @@ GTL_EXTERN NSString * const kGTLYouTubeContentRating_KmrbRating_KmrbTeenr; // " GTL_EXTERN NSString * const kGTLYouTubeContentRating_KmrbRating_KmrbUnrated; // "kmrbUnrated" // GTLYouTubeContentRating - LsfRating +GTL_EXTERN NSString * const kGTLYouTubeContentRating_LsfRating_Lsf13; // "lsf13" +GTL_EXTERN NSString * const kGTLYouTubeContentRating_LsfRating_Lsf17; // "lsf17" +GTL_EXTERN NSString * const kGTLYouTubeContentRating_LsfRating_Lsf21; // "lsf21" GTL_EXTERN NSString * const kGTLYouTubeContentRating_LsfRating_LsfA; // "lsfA" GTL_EXTERN NSString * const kGTLYouTubeContentRating_LsfRating_LsfBo; // "lsfBo" GTL_EXTERN NSString * const kGTLYouTubeContentRating_LsfRating_LsfD; // "lsfD" @@ -549,9 +644,12 @@ GTL_EXTERN NSString * const kGTLYouTubeContentRating_MdaRating_MdaUnrated; // " // GTLYouTubeContentRating - MedietilsynetRating GTL_EXTERN NSString * const kGTLYouTubeContentRating_MedietilsynetRating_Medietilsynet11; // "medietilsynet11" +GTL_EXTERN NSString * const kGTLYouTubeContentRating_MedietilsynetRating_Medietilsynet12; // "medietilsynet12" GTL_EXTERN NSString * const kGTLYouTubeContentRating_MedietilsynetRating_Medietilsynet15; // "medietilsynet15" GTL_EXTERN NSString * const kGTLYouTubeContentRating_MedietilsynetRating_Medietilsynet18; // "medietilsynet18" +GTL_EXTERN NSString * const kGTLYouTubeContentRating_MedietilsynetRating_Medietilsynet6; // "medietilsynet6" GTL_EXTERN NSString * const kGTLYouTubeContentRating_MedietilsynetRating_Medietilsynet7; // "medietilsynet7" +GTL_EXTERN NSString * const kGTLYouTubeContentRating_MedietilsynetRating_Medietilsynet9; // "medietilsynet9" GTL_EXTERN NSString * const kGTLYouTubeContentRating_MedietilsynetRating_MedietilsynetA; // "medietilsynetA" GTL_EXTERN NSString * const kGTLYouTubeContentRating_MedietilsynetRating_MedietilsynetUnrated; // "medietilsynetUnrated" @@ -758,6 +856,11 @@ GTL_EXTERN NSString * const kGTLYouTubeInvideoPosition_Type_Corner; // "corner" GTL_EXTERN NSString * const kGTLYouTubeInvideoTiming_Type_OffsetFromEnd; // "offsetFromEnd" GTL_EXTERN NSString * const kGTLYouTubeInvideoTiming_Type_OffsetFromStart; // "offsetFromStart" +// GTLYouTubeLiveBroadcastContentDetails - ClosedCaptionsType +GTL_EXTERN NSString * const kGTLYouTubeLiveBroadcastContentDetails_ClosedCaptionsType_ClosedCaptionsDisabled; // "closedCaptionsDisabled" +GTL_EXTERN NSString * const kGTLYouTubeLiveBroadcastContentDetails_ClosedCaptionsType_ClosedCaptionsEmbedded; // "closedCaptionsEmbedded" +GTL_EXTERN NSString * const kGTLYouTubeLiveBroadcastContentDetails_ClosedCaptionsType_ClosedCaptionsHttpPost; // "closedCaptionsHttpPost" + // GTLYouTubeLiveBroadcastStatus - LifeCycleStatus GTL_EXTERN NSString * const kGTLYouTubeLiveBroadcastStatus_LifeCycleStatus_Abandoned; // "abandoned" GTL_EXTERN NSString * const kGTLYouTubeLiveBroadcastStatus_LifeCycleStatus_Complete; // "complete" @@ -786,6 +889,69 @@ GTL_EXTERN NSString * const kGTLYouTubeLiveBroadcastStatus_RecordingStatus_NotRe GTL_EXTERN NSString * const kGTLYouTubeLiveBroadcastStatus_RecordingStatus_Recorded; // "recorded" GTL_EXTERN NSString * const kGTLYouTubeLiveBroadcastStatus_RecordingStatus_Recording; // "recording" +// GTLYouTubeLiveBroadcastTopic - Type +GTL_EXTERN NSString * const kGTLYouTubeLiveBroadcastTopic_Type_VideoGame; // "videoGame" + +// GTLYouTubeLiveChatBanSnippet - Type +GTL_EXTERN NSString * const kGTLYouTubeLiveChatBanSnippet_Type_Permanent; // "permanent" +GTL_EXTERN NSString * const kGTLYouTubeLiveChatBanSnippet_Type_Temporary; // "temporary" + +// GTLYouTubeLiveChatMessageSnippet - Type +GTL_EXTERN NSString * const kGTLYouTubeLiveChatMessageSnippet_Type_ChatEndedEvent; // "chatEndedEvent" +GTL_EXTERN NSString * const kGTLYouTubeLiveChatMessageSnippet_Type_FanFundingEvent; // "fanFundingEvent" +GTL_EXTERN NSString * const kGTLYouTubeLiveChatMessageSnippet_Type_NewSponsorEvent; // "newSponsorEvent" +GTL_EXTERN NSString * const kGTLYouTubeLiveChatMessageSnippet_Type_SponsorOnlyModeEndedEvent; // "sponsorOnlyModeEndedEvent" +GTL_EXTERN NSString * const kGTLYouTubeLiveChatMessageSnippet_Type_SponsorOnlyModeStartedEvent; // "sponsorOnlyModeStartedEvent" +GTL_EXTERN NSString * const kGTLYouTubeLiveChatMessageSnippet_Type_TextMessageEvent; // "textMessageEvent" +GTL_EXTERN NSString * const kGTLYouTubeLiveChatMessageSnippet_Type_Tombstone; // "tombstone" + +// GTLYouTubeLiveStreamConfigurationIssue - Severity +GTL_EXTERN NSString * const kGTLYouTubeLiveStreamConfigurationIssue_Severity_Error; // "error" +GTL_EXTERN NSString * const kGTLYouTubeLiveStreamConfigurationIssue_Severity_Info; // "info" +GTL_EXTERN NSString * const kGTLYouTubeLiveStreamConfigurationIssue_Severity_Warning; // "warning" + +// GTLYouTubeLiveStreamConfigurationIssue - Type +GTL_EXTERN NSString * const kGTLYouTubeLiveStreamConfigurationIssue_Type_AudioBitrateHigh; // "audioBitrateHigh" +GTL_EXTERN NSString * const kGTLYouTubeLiveStreamConfigurationIssue_Type_AudioBitrateLow; // "audioBitrateLow" +GTL_EXTERN NSString * const kGTLYouTubeLiveStreamConfigurationIssue_Type_AudioBitrateMismatch; // "audioBitrateMismatch" +GTL_EXTERN NSString * const kGTLYouTubeLiveStreamConfigurationIssue_Type_AudioCodec; // "audioCodec" +GTL_EXTERN NSString * const kGTLYouTubeLiveStreamConfigurationIssue_Type_AudioCodecMismatch; // "audioCodecMismatch" +GTL_EXTERN NSString * const kGTLYouTubeLiveStreamConfigurationIssue_Type_AudioSampleRate; // "audioSampleRate" +GTL_EXTERN NSString * const kGTLYouTubeLiveStreamConfigurationIssue_Type_AudioSampleRateMismatch; // "audioSampleRateMismatch" +GTL_EXTERN NSString * const kGTLYouTubeLiveStreamConfigurationIssue_Type_AudioStereoMismatch; // "audioStereoMismatch" +GTL_EXTERN NSString * const kGTLYouTubeLiveStreamConfigurationIssue_Type_AudioTooManyChannels; // "audioTooManyChannels" +GTL_EXTERN NSString * const kGTLYouTubeLiveStreamConfigurationIssue_Type_BadContainer; // "badContainer" +GTL_EXTERN NSString * const kGTLYouTubeLiveStreamConfigurationIssue_Type_BitrateHigh; // "bitrateHigh" +GTL_EXTERN NSString * const kGTLYouTubeLiveStreamConfigurationIssue_Type_BitrateLow; // "bitrateLow" +GTL_EXTERN NSString * const kGTLYouTubeLiveStreamConfigurationIssue_Type_FrameRateHigh; // "frameRateHigh" +GTL_EXTERN NSString * const kGTLYouTubeLiveStreamConfigurationIssue_Type_FramerateMismatch; // "framerateMismatch" +GTL_EXTERN NSString * const kGTLYouTubeLiveStreamConfigurationIssue_Type_GopMismatch; // "gopMismatch" +GTL_EXTERN NSString * const kGTLYouTubeLiveStreamConfigurationIssue_Type_GopSizeLong; // "gopSizeLong" +GTL_EXTERN NSString * const kGTLYouTubeLiveStreamConfigurationIssue_Type_GopSizeOver; // "gopSizeOver" +GTL_EXTERN NSString * const kGTLYouTubeLiveStreamConfigurationIssue_Type_GopSizeShort; // "gopSizeShort" +GTL_EXTERN NSString * const kGTLYouTubeLiveStreamConfigurationIssue_Type_InterlacedVideo; // "interlacedVideo" +GTL_EXTERN NSString * const kGTLYouTubeLiveStreamConfigurationIssue_Type_MultipleAudioStreams; // "multipleAudioStreams" +GTL_EXTERN NSString * const kGTLYouTubeLiveStreamConfigurationIssue_Type_MultipleVideoStreams; // "multipleVideoStreams" +GTL_EXTERN NSString * const kGTLYouTubeLiveStreamConfigurationIssue_Type_NoAudioStream; // "noAudioStream" +GTL_EXTERN NSString * const kGTLYouTubeLiveStreamConfigurationIssue_Type_NoVideoStream; // "noVideoStream" +GTL_EXTERN NSString * const kGTLYouTubeLiveStreamConfigurationIssue_Type_OpenGop; // "openGop" +GTL_EXTERN NSString * const kGTLYouTubeLiveStreamConfigurationIssue_Type_ResolutionMismatch; // "resolutionMismatch" +GTL_EXTERN NSString * const kGTLYouTubeLiveStreamConfigurationIssue_Type_VideoBitrateMismatch; // "videoBitrateMismatch" +GTL_EXTERN NSString * const kGTLYouTubeLiveStreamConfigurationIssue_Type_VideoCodec; // "videoCodec" +GTL_EXTERN NSString * const kGTLYouTubeLiveStreamConfigurationIssue_Type_VideoCodecMismatch; // "videoCodecMismatch" +GTL_EXTERN NSString * const kGTLYouTubeLiveStreamConfigurationIssue_Type_VideoIngestionStarved; // "videoIngestionStarved" +GTL_EXTERN NSString * const kGTLYouTubeLiveStreamConfigurationIssue_Type_VideoInterlaceMismatch; // "videoInterlaceMismatch" +GTL_EXTERN NSString * const kGTLYouTubeLiveStreamConfigurationIssue_Type_VideoProfileMismatch; // "videoProfileMismatch" +GTL_EXTERN NSString * const kGTLYouTubeLiveStreamConfigurationIssue_Type_VideoResolutionSuboptimal; // "videoResolutionSuboptimal" +GTL_EXTERN NSString * const kGTLYouTubeLiveStreamConfigurationIssue_Type_VideoResolutionUnsupported; // "videoResolutionUnsupported" + +// GTLYouTubeLiveStreamHealthStatus - Status +GTL_EXTERN NSString * const kGTLYouTubeLiveStreamHealthStatus_Status_Bad; // "bad" +GTL_EXTERN NSString * const kGTLYouTubeLiveStreamHealthStatus_Status_Good; // "good" +GTL_EXTERN NSString * const kGTLYouTubeLiveStreamHealthStatus_Status_NoData; // "noData" +GTL_EXTERN NSString * const kGTLYouTubeLiveStreamHealthStatus_Status_Ok; // "ok" +GTL_EXTERN NSString * const kGTLYouTubeLiveStreamHealthStatus_Status_Revoked; // "revoked" + // GTLYouTubeLiveStreamStatus - StreamStatus GTL_EXTERN NSString * const kGTLYouTubeLiveStreamStatus_StreamStatus_Active; // "active" GTL_EXTERN NSString * const kGTLYouTubeLiveStreamStatus_StreamStatus_Created; // "created" @@ -831,12 +997,6 @@ GTL_EXTERN NSString * const kGTLYouTubeVideoContentDetails_Caption_True; // "tr GTL_EXTERN NSString * const kGTLYouTubeVideoContentDetails_Definition_Hd; // "hd" GTL_EXTERN NSString * const kGTLYouTubeVideoContentDetails_Definition_Sd; // "sd" -// GTLYouTubeVideoConversionPing - Context -GTL_EXTERN NSString * const kGTLYouTubeVideoConversionPing_Context_Comment; // "comment" -GTL_EXTERN NSString * const kGTLYouTubeVideoConversionPing_Context_Dislike; // "dislike" -GTL_EXTERN NSString * const kGTLYouTubeVideoConversionPing_Context_Like; // "like" -GTL_EXTERN NSString * const kGTLYouTubeVideoConversionPing_Context_Share; // "share" - // GTLYouTubeVideoFileDetails - FileType GTL_EXTERN NSString * const kGTLYouTubeVideoFileDetails_FileType_Archive; // "archive" GTL_EXTERN NSString * const kGTLYouTubeVideoFileDetails_FileType_Audio; // "audio" @@ -898,6 +1058,7 @@ GTL_EXTERN NSString * const kGTLYouTubeVideoStatus_RejectionReason_Claim; // "c GTL_EXTERN NSString * const kGTLYouTubeVideoStatus_RejectionReason_Copyright; // "copyright" GTL_EXTERN NSString * const kGTLYouTubeVideoStatus_RejectionReason_Duplicate; // "duplicate" GTL_EXTERN NSString * const kGTLYouTubeVideoStatus_RejectionReason_Inappropriate; // "inappropriate" +GTL_EXTERN NSString * const kGTLYouTubeVideoStatus_RejectionReason_Legal; // "legal" GTL_EXTERN NSString * const kGTLYouTubeVideoStatus_RejectionReason_Length; // "length" GTL_EXTERN NSString * const kGTLYouTubeVideoStatus_RejectionReason_TermsOfUse; // "termsOfUse" GTL_EXTERN NSString * const kGTLYouTubeVideoStatus_RejectionReason_Trademark; // "trademark" diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeConstants.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeConstants.m similarity index 83% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeConstants.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeConstants.m index 008b086e1..856708f35 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeConstants.m +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeConstants.m @@ -1,4 +1,4 @@ -/* Copyright (c) 2014 Google Inc. +/* Copyright (c) 2016 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -30,6 +30,7 @@ // Authorization scope NSString * const kGTLAuthScopeYouTube = @"https://www.googleapis.com/auth/youtube"; +NSString * const kGTLAuthScopeYouTubeForceSsl = @"https://www.googleapis.com/auth/youtube.force-ssl"; 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"; @@ -44,6 +45,11 @@ NSString * const kGTLYouTubeBroadcastStatusTesting = @"testing"; NSString * const kGTLYouTubeBroadcastStatusUpcoming = @"upcoming"; +// GTLQueryYouTube - BroadcastType +NSString * const kGTLYouTubeBroadcastTypeAll = @"all"; +NSString * const kGTLYouTubeBroadcastTypeEvent = @"event"; +NSString * const kGTLYouTubeBroadcastTypePersistent = @"persistent"; + // GTLQueryYouTube - ChannelType NSString * const kGTLYouTubeChannelTypeAny = @"any"; NSString * const kGTLYouTubeChannelTypeShow = @"show"; @@ -56,6 +62,16 @@ NSString * const kGTLYouTubeEventTypeLive = @"live"; NSString * const kGTLYouTubeEventTypeUpcoming = @"upcoming"; +// GTLQueryYouTube - Filter +NSString * const kGTLYouTubeFilterAll = @"all"; +NSString * const kGTLYouTubeFilterNewest = @"newest"; + +// GTLQueryYouTube - ModerationStatus +NSString * const kGTLYouTubeModerationStatusHeldForReview = @"heldForReview"; +NSString * const kGTLYouTubeModerationStatusLikelySpam = @"likelySpam"; +NSString * const kGTLYouTubeModerationStatusPublished = @"published"; +NSString * const kGTLYouTubeModerationStatusRejected = @"rejected"; + // GTLQueryYouTube - MyRating NSString * const kGTLYouTubeMyRatingDislike = @"dislike"; NSString * const kGTLYouTubeMyRatingLike = @"like"; @@ -65,6 +81,7 @@ NSString * const kGTLYouTubeOrderDate = @"date"; NSString * const kGTLYouTubeOrderRating = @"rating"; NSString * const kGTLYouTubeOrderRelevance = @"relevance"; +NSString * const kGTLYouTubeOrderTime = @"time"; NSString * const kGTLYouTubeOrderTitle = @"title"; NSString * const kGTLYouTubeOrderUnread = @"unread"; NSString * const kGTLYouTubeOrderVideoCount = @"videoCount"; @@ -80,6 +97,17 @@ NSString * const kGTLYouTubeSafeSearchNone = @"none"; NSString * const kGTLYouTubeSafeSearchStrict = @"strict"; +// GTLQueryYouTube - TextFormat +NSString * const kGTLYouTubeTextFormatHtml = @"html"; +NSString * const kGTLYouTubeTextFormatPlainText = @"plainText"; + +// GTLQueryYouTube - Tfmt +NSString * const kGTLYouTubeTfmtSbv = @"sbv"; +NSString * const kGTLYouTubeTfmtScc = @"scc"; +NSString * const kGTLYouTubeTfmtSrt = @"srt"; +NSString * const kGTLYouTubeTfmtTtml = @"ttml"; +NSString * const kGTLYouTubeTfmtVtt = @"vtt"; + // GTLQueryYouTube - VideoCaption NSString * const kGTLYouTubeVideoCaptionAny = @"any"; NSString * const kGTLYouTubeVideoCaptionClosedCaption = @"closedCaption"; @@ -148,6 +176,27 @@ NSString * const kGTLYouTubeActivitySnippet_Type_Subscription = @"subscription"; NSString * const kGTLYouTubeActivitySnippet_Type_Upload = @"upload"; +// GTLYouTubeCaptionSnippet - AudioTrackType +NSString * const kGTLYouTubeCaptionSnippet_AudioTrackType_Commentary = @"commentary"; +NSString * const kGTLYouTubeCaptionSnippet_AudioTrackType_Descriptive = @"descriptive"; +NSString * const kGTLYouTubeCaptionSnippet_AudioTrackType_Primary = @"primary"; +NSString * const kGTLYouTubeCaptionSnippet_AudioTrackType_Unknown = @"unknown"; + +// GTLYouTubeCaptionSnippet - FailureReason +NSString * const kGTLYouTubeCaptionSnippet_FailureReason_ProcessingFailed = @"processingFailed"; +NSString * const kGTLYouTubeCaptionSnippet_FailureReason_UnknownFormat = @"unknownFormat"; +NSString * const kGTLYouTubeCaptionSnippet_FailureReason_UnsupportedFormat = @"unsupportedFormat"; + +// GTLYouTubeCaptionSnippet - Status +NSString * const kGTLYouTubeCaptionSnippet_Status_Failed = @"failed"; +NSString * const kGTLYouTubeCaptionSnippet_Status_Serving = @"serving"; +NSString * const kGTLYouTubeCaptionSnippet_Status_Syncing = @"syncing"; + +// GTLYouTubeCaptionSnippet - TrackKind +NSString * const kGTLYouTubeCaptionSnippet_TrackKind_Asr = @"ASR"; +NSString * const kGTLYouTubeCaptionSnippet_TrackKind_Forced = @"forced"; +NSString * const kGTLYouTubeCaptionSnippet_TrackKind_Standard = @"standard"; + // GTLYouTubeCdnSettings - IngestionType NSString * const kGTLYouTubeCdnSettings_IngestionType_Dash = @"dash"; NSString * const kGTLYouTubeCdnSettings_IngestionType_Rtmp = @"rtmp"; @@ -192,6 +241,18 @@ NSString * const kGTLYouTubeChannelStatus_PrivacyStatus_Public = @"public"; NSString * const kGTLYouTubeChannelStatus_PrivacyStatus_Unlisted = @"unlisted"; +// GTLYouTubeCommentSnippet - ModerationStatus +NSString * const kGTLYouTubeCommentSnippet_ModerationStatus_HeldForReview = @"heldForReview"; +NSString * const kGTLYouTubeCommentSnippet_ModerationStatus_LikelySpam = @"likelySpam"; +NSString * const kGTLYouTubeCommentSnippet_ModerationStatus_Published = @"published"; +NSString * const kGTLYouTubeCommentSnippet_ModerationStatus_Rejected = @"rejected"; + +// GTLYouTubeCommentSnippet - ViewerRating +NSString * const kGTLYouTubeCommentSnippet_ViewerRating_Dislike = @"dislike"; +NSString * const kGTLYouTubeCommentSnippet_ViewerRating_Like = @"like"; +NSString * const kGTLYouTubeCommentSnippet_ViewerRating_None = @"none"; +NSString * const kGTLYouTubeCommentSnippet_ViewerRating_Unspecified = @"unspecified"; + // GTLYouTubeContentRating - AcbRating NSString * const kGTLYouTubeContentRating_AcbRating_AcbC = @"acbC"; NSString * const kGTLYouTubeContentRating_AcbRating_AcbE = @"acbE"; @@ -321,12 +382,22 @@ NSString * const kGTLYouTubeContentRating_CnaRating_CnaAp = @"cnaAp"; NSString * const kGTLYouTubeContentRating_CnaRating_CnaUnrated = @"cnaUnrated"; +// GTLYouTubeContentRating - CncRating +NSString * const kGTLYouTubeContentRating_CncRating_Cnc10 = @"cnc10"; +NSString * const kGTLYouTubeContentRating_CncRating_Cnc12 = @"cnc12"; +NSString * const kGTLYouTubeContentRating_CncRating_Cnc16 = @"cnc16"; +NSString * const kGTLYouTubeContentRating_CncRating_Cnc18 = @"cnc18"; +NSString * const kGTLYouTubeContentRating_CncRating_CncE = @"cncE"; +NSString * const kGTLYouTubeContentRating_CncRating_CncT = @"cncT"; +NSString * const kGTLYouTubeContentRating_CncRating_CncUnrated = @"cncUnrated"; + // GTLYouTubeContentRating - CsaRating NSString * const kGTLYouTubeContentRating_CsaRating_Csa10 = @"csa10"; NSString * const kGTLYouTubeContentRating_CsaRating_Csa12 = @"csa12"; NSString * const kGTLYouTubeContentRating_CsaRating_Csa16 = @"csa16"; NSString * const kGTLYouTubeContentRating_CsaRating_Csa18 = @"csa18"; NSString * const kGTLYouTubeContentRating_CsaRating_CsaInterdiction = @"csaInterdiction"; +NSString * const kGTLYouTubeContentRating_CsaRating_CsaT = @"csaT"; NSString * const kGTLYouTubeContentRating_CsaRating_CsaUnrated = @"csaUnrated"; // GTLYouTubeContentRating - CscfRating @@ -334,7 +405,9 @@ NSString * const kGTLYouTubeContentRating_CscfRating_Cscf16 = @"cscf16"; NSString * const kGTLYouTubeContentRating_CscfRating_Cscf18 = @"cscf18"; NSString * const kGTLYouTubeContentRating_CscfRating_Cscf6 = @"cscf6"; +NSString * const kGTLYouTubeContentRating_CscfRating_Cscf9 = @"cscf9"; NSString * const kGTLYouTubeContentRating_CscfRating_CscfA = @"cscfA"; +NSString * const kGTLYouTubeContentRating_CscfRating_CscfAl = @"cscfAl"; NSString * const kGTLYouTubeContentRating_CscfRating_CscfUnrated = @"cscfUnrated"; // GTLYouTubeContentRating - CzfilmRating @@ -367,6 +440,17 @@ NSString * const kGTLYouTubeContentRating_DjctqRatingReasons_DjctqSexualContent = @"djctqSexualContent"; NSString * const kGTLYouTubeContentRating_DjctqRatingReasons_DjctqViolence = @"djctqViolence"; +// GTLYouTubeContentRating - EcbmctRating +NSString * const kGTLYouTubeContentRating_EcbmctRating_Ecbmct13a = @"ecbmct13a"; +NSString * const kGTLYouTubeContentRating_EcbmctRating_Ecbmct13plus = @"ecbmct13plus"; +NSString * const kGTLYouTubeContentRating_EcbmctRating_Ecbmct15a = @"ecbmct15a"; +NSString * const kGTLYouTubeContentRating_EcbmctRating_Ecbmct15plus = @"ecbmct15plus"; +NSString * const kGTLYouTubeContentRating_EcbmctRating_Ecbmct18plus = @"ecbmct18plus"; +NSString * const kGTLYouTubeContentRating_EcbmctRating_Ecbmct7a = @"ecbmct7a"; +NSString * const kGTLYouTubeContentRating_EcbmctRating_Ecbmct7plus = @"ecbmct7plus"; +NSString * const kGTLYouTubeContentRating_EcbmctRating_EcbmctG = @"ecbmctG"; +NSString * const kGTLYouTubeContentRating_EcbmctRating_EcbmctUnrated = @"ecbmctUnrated"; + // GTLYouTubeContentRating - EefilmRating NSString * const kGTLYouTubeContentRating_EefilmRating_EefilmK12 = @"eefilmK12"; NSString * const kGTLYouTubeContentRating_EefilmRating_EefilmK14 = @"eefilmK14"; @@ -398,11 +482,13 @@ NSString * const kGTLYouTubeContentRating_FcbmRating_Fcbm18sg = @"fcbm18sg"; NSString * const kGTLYouTubeContentRating_FcbmRating_Fcbm18sx = @"fcbm18sx"; NSString * const kGTLYouTubeContentRating_FcbmRating_FcbmP13 = @"fcbmP13"; +NSString * const kGTLYouTubeContentRating_FcbmRating_FcbmPg13 = @"fcbmPg13"; NSString * const kGTLYouTubeContentRating_FcbmRating_FcbmU = @"fcbmU"; NSString * const kGTLYouTubeContentRating_FcbmRating_FcbmUnrated = @"fcbmUnrated"; // GTLYouTubeContentRating - FcoRating NSString * const kGTLYouTubeContentRating_FcoRating_FcoI = @"fcoI"; +NSString * const kGTLYouTubeContentRating_FcoRating_FcoIi = @"fcoIi"; NSString * const kGTLYouTubeContentRating_FcoRating_FcoIia = @"fcoIia"; NSString * const kGTLYouTubeContentRating_FcoRating_FcoIib = @"fcoIib"; NSString * const kGTLYouTubeContentRating_FcoRating_FcoIii = @"fcoIii"; @@ -418,6 +504,7 @@ NSString * const kGTLYouTubeContentRating_FmocRating_FmocUnrated = @"fmocUnrated"; // GTLYouTubeContentRating - FpbRating +NSString * const kGTLYouTubeContentRating_FpbRating_Fpb10 = @"fpb10"; NSString * const kGTLYouTubeContentRating_FpbRating_Fpb1012Pg = @"fpb1012Pg"; NSString * const kGTLYouTubeContentRating_FpbRating_Fpb13 = @"fpb13"; NSString * const kGTLYouTubeContentRating_FpbRating_Fpb16 = @"fpb16"; @@ -456,7 +543,10 @@ // GTLYouTubeContentRating - IfcoRating NSString * const kGTLYouTubeContentRating_IfcoRating_Ifco12 = @"ifco12"; +NSString * const kGTLYouTubeContentRating_IfcoRating_Ifco12a = @"ifco12a"; NSString * const kGTLYouTubeContentRating_IfcoRating_Ifco15 = @"ifco15"; +NSString * const kGTLYouTubeContentRating_IfcoRating_Ifco15a = @"ifco15a"; +NSString * const kGTLYouTubeContentRating_IfcoRating_Ifco16 = @"ifco16"; NSString * const kGTLYouTubeContentRating_IfcoRating_Ifco18 = @"ifco18"; NSString * const kGTLYouTubeContentRating_IfcoRating_IfcoG = @"ifcoG"; NSString * const kGTLYouTubeContentRating_IfcoRating_IfcoPg = @"ifcoPg"; @@ -487,6 +577,7 @@ // GTLYouTubeContentRating - KijkwijzerRating NSString * const kGTLYouTubeContentRating_KijkwijzerRating_Kijkwijzer12 = @"kijkwijzer12"; NSString * const kGTLYouTubeContentRating_KijkwijzerRating_Kijkwijzer16 = @"kijkwijzer16"; +NSString * const kGTLYouTubeContentRating_KijkwijzerRating_Kijkwijzer18 = @"kijkwijzer18"; NSString * const kGTLYouTubeContentRating_KijkwijzerRating_Kijkwijzer6 = @"kijkwijzer6"; NSString * const kGTLYouTubeContentRating_KijkwijzerRating_Kijkwijzer9 = @"kijkwijzer9"; NSString * const kGTLYouTubeContentRating_KijkwijzerRating_KijkwijzerAl = @"kijkwijzerAl"; @@ -501,6 +592,9 @@ NSString * const kGTLYouTubeContentRating_KmrbRating_KmrbUnrated = @"kmrbUnrated"; // GTLYouTubeContentRating - LsfRating +NSString * const kGTLYouTubeContentRating_LsfRating_Lsf13 = @"lsf13"; +NSString * const kGTLYouTubeContentRating_LsfRating_Lsf17 = @"lsf17"; +NSString * const kGTLYouTubeContentRating_LsfRating_Lsf21 = @"lsf21"; NSString * const kGTLYouTubeContentRating_LsfRating_LsfA = @"lsfA"; NSString * const kGTLYouTubeContentRating_LsfRating_LsfBo = @"lsfBo"; NSString * const kGTLYouTubeContentRating_LsfRating_LsfD = @"lsfD"; @@ -537,9 +631,12 @@ // GTLYouTubeContentRating - MedietilsynetRating NSString * const kGTLYouTubeContentRating_MedietilsynetRating_Medietilsynet11 = @"medietilsynet11"; +NSString * const kGTLYouTubeContentRating_MedietilsynetRating_Medietilsynet12 = @"medietilsynet12"; NSString * const kGTLYouTubeContentRating_MedietilsynetRating_Medietilsynet15 = @"medietilsynet15"; NSString * const kGTLYouTubeContentRating_MedietilsynetRating_Medietilsynet18 = @"medietilsynet18"; +NSString * const kGTLYouTubeContentRating_MedietilsynetRating_Medietilsynet6 = @"medietilsynet6"; NSString * const kGTLYouTubeContentRating_MedietilsynetRating_Medietilsynet7 = @"medietilsynet7"; +NSString * const kGTLYouTubeContentRating_MedietilsynetRating_Medietilsynet9 = @"medietilsynet9"; NSString * const kGTLYouTubeContentRating_MedietilsynetRating_MedietilsynetA = @"medietilsynetA"; NSString * const kGTLYouTubeContentRating_MedietilsynetRating_MedietilsynetUnrated = @"medietilsynetUnrated"; @@ -746,6 +843,11 @@ NSString * const kGTLYouTubeInvideoTiming_Type_OffsetFromEnd = @"offsetFromEnd"; NSString * const kGTLYouTubeInvideoTiming_Type_OffsetFromStart = @"offsetFromStart"; +// GTLYouTubeLiveBroadcastContentDetails - ClosedCaptionsType +NSString * const kGTLYouTubeLiveBroadcastContentDetails_ClosedCaptionsType_ClosedCaptionsDisabled = @"closedCaptionsDisabled"; +NSString * const kGTLYouTubeLiveBroadcastContentDetails_ClosedCaptionsType_ClosedCaptionsEmbedded = @"closedCaptionsEmbedded"; +NSString * const kGTLYouTubeLiveBroadcastContentDetails_ClosedCaptionsType_ClosedCaptionsHttpPost = @"closedCaptionsHttpPost"; + // GTLYouTubeLiveBroadcastStatus - LifeCycleStatus NSString * const kGTLYouTubeLiveBroadcastStatus_LifeCycleStatus_Abandoned = @"abandoned"; NSString * const kGTLYouTubeLiveBroadcastStatus_LifeCycleStatus_Complete = @"complete"; @@ -774,6 +876,69 @@ NSString * const kGTLYouTubeLiveBroadcastStatus_RecordingStatus_Recorded = @"recorded"; NSString * const kGTLYouTubeLiveBroadcastStatus_RecordingStatus_Recording = @"recording"; +// GTLYouTubeLiveBroadcastTopic - Type +NSString * const kGTLYouTubeLiveBroadcastTopic_Type_VideoGame = @"videoGame"; + +// GTLYouTubeLiveChatBanSnippet - Type +NSString * const kGTLYouTubeLiveChatBanSnippet_Type_Permanent = @"permanent"; +NSString * const kGTLYouTubeLiveChatBanSnippet_Type_Temporary = @"temporary"; + +// GTLYouTubeLiveChatMessageSnippet - Type +NSString * const kGTLYouTubeLiveChatMessageSnippet_Type_ChatEndedEvent = @"chatEndedEvent"; +NSString * const kGTLYouTubeLiveChatMessageSnippet_Type_FanFundingEvent = @"fanFundingEvent"; +NSString * const kGTLYouTubeLiveChatMessageSnippet_Type_NewSponsorEvent = @"newSponsorEvent"; +NSString * const kGTLYouTubeLiveChatMessageSnippet_Type_SponsorOnlyModeEndedEvent = @"sponsorOnlyModeEndedEvent"; +NSString * const kGTLYouTubeLiveChatMessageSnippet_Type_SponsorOnlyModeStartedEvent = @"sponsorOnlyModeStartedEvent"; +NSString * const kGTLYouTubeLiveChatMessageSnippet_Type_TextMessageEvent = @"textMessageEvent"; +NSString * const kGTLYouTubeLiveChatMessageSnippet_Type_Tombstone = @"tombstone"; + +// GTLYouTubeLiveStreamConfigurationIssue - Severity +NSString * const kGTLYouTubeLiveStreamConfigurationIssue_Severity_Error = @"error"; +NSString * const kGTLYouTubeLiveStreamConfigurationIssue_Severity_Info = @"info"; +NSString * const kGTLYouTubeLiveStreamConfigurationIssue_Severity_Warning = @"warning"; + +// GTLYouTubeLiveStreamConfigurationIssue - Type +NSString * const kGTLYouTubeLiveStreamConfigurationIssue_Type_AudioBitrateHigh = @"audioBitrateHigh"; +NSString * const kGTLYouTubeLiveStreamConfigurationIssue_Type_AudioBitrateLow = @"audioBitrateLow"; +NSString * const kGTLYouTubeLiveStreamConfigurationIssue_Type_AudioBitrateMismatch = @"audioBitrateMismatch"; +NSString * const kGTLYouTubeLiveStreamConfigurationIssue_Type_AudioCodec = @"audioCodec"; +NSString * const kGTLYouTubeLiveStreamConfigurationIssue_Type_AudioCodecMismatch = @"audioCodecMismatch"; +NSString * const kGTLYouTubeLiveStreamConfigurationIssue_Type_AudioSampleRate = @"audioSampleRate"; +NSString * const kGTLYouTubeLiveStreamConfigurationIssue_Type_AudioSampleRateMismatch = @"audioSampleRateMismatch"; +NSString * const kGTLYouTubeLiveStreamConfigurationIssue_Type_AudioStereoMismatch = @"audioStereoMismatch"; +NSString * const kGTLYouTubeLiveStreamConfigurationIssue_Type_AudioTooManyChannels = @"audioTooManyChannels"; +NSString * const kGTLYouTubeLiveStreamConfigurationIssue_Type_BadContainer = @"badContainer"; +NSString * const kGTLYouTubeLiveStreamConfigurationIssue_Type_BitrateHigh = @"bitrateHigh"; +NSString * const kGTLYouTubeLiveStreamConfigurationIssue_Type_BitrateLow = @"bitrateLow"; +NSString * const kGTLYouTubeLiveStreamConfigurationIssue_Type_FrameRateHigh = @"frameRateHigh"; +NSString * const kGTLYouTubeLiveStreamConfigurationIssue_Type_FramerateMismatch = @"framerateMismatch"; +NSString * const kGTLYouTubeLiveStreamConfigurationIssue_Type_GopMismatch = @"gopMismatch"; +NSString * const kGTLYouTubeLiveStreamConfigurationIssue_Type_GopSizeLong = @"gopSizeLong"; +NSString * const kGTLYouTubeLiveStreamConfigurationIssue_Type_GopSizeOver = @"gopSizeOver"; +NSString * const kGTLYouTubeLiveStreamConfigurationIssue_Type_GopSizeShort = @"gopSizeShort"; +NSString * const kGTLYouTubeLiveStreamConfigurationIssue_Type_InterlacedVideo = @"interlacedVideo"; +NSString * const kGTLYouTubeLiveStreamConfigurationIssue_Type_MultipleAudioStreams = @"multipleAudioStreams"; +NSString * const kGTLYouTubeLiveStreamConfigurationIssue_Type_MultipleVideoStreams = @"multipleVideoStreams"; +NSString * const kGTLYouTubeLiveStreamConfigurationIssue_Type_NoAudioStream = @"noAudioStream"; +NSString * const kGTLYouTubeLiveStreamConfigurationIssue_Type_NoVideoStream = @"noVideoStream"; +NSString * const kGTLYouTubeLiveStreamConfigurationIssue_Type_OpenGop = @"openGop"; +NSString * const kGTLYouTubeLiveStreamConfigurationIssue_Type_ResolutionMismatch = @"resolutionMismatch"; +NSString * const kGTLYouTubeLiveStreamConfigurationIssue_Type_VideoBitrateMismatch = @"videoBitrateMismatch"; +NSString * const kGTLYouTubeLiveStreamConfigurationIssue_Type_VideoCodec = @"videoCodec"; +NSString * const kGTLYouTubeLiveStreamConfigurationIssue_Type_VideoCodecMismatch = @"videoCodecMismatch"; +NSString * const kGTLYouTubeLiveStreamConfigurationIssue_Type_VideoIngestionStarved = @"videoIngestionStarved"; +NSString * const kGTLYouTubeLiveStreamConfigurationIssue_Type_VideoInterlaceMismatch = @"videoInterlaceMismatch"; +NSString * const kGTLYouTubeLiveStreamConfigurationIssue_Type_VideoProfileMismatch = @"videoProfileMismatch"; +NSString * const kGTLYouTubeLiveStreamConfigurationIssue_Type_VideoResolutionSuboptimal = @"videoResolutionSuboptimal"; +NSString * const kGTLYouTubeLiveStreamConfigurationIssue_Type_VideoResolutionUnsupported = @"videoResolutionUnsupported"; + +// GTLYouTubeLiveStreamHealthStatus - Status +NSString * const kGTLYouTubeLiveStreamHealthStatus_Status_Bad = @"bad"; +NSString * const kGTLYouTubeLiveStreamHealthStatus_Status_Good = @"good"; +NSString * const kGTLYouTubeLiveStreamHealthStatus_Status_NoData = @"noData"; +NSString * const kGTLYouTubeLiveStreamHealthStatus_Status_Ok = @"ok"; +NSString * const kGTLYouTubeLiveStreamHealthStatus_Status_Revoked = @"revoked"; + // GTLYouTubeLiveStreamStatus - StreamStatus NSString * const kGTLYouTubeLiveStreamStatus_StreamStatus_Active = @"active"; NSString * const kGTLYouTubeLiveStreamStatus_StreamStatus_Created = @"created"; @@ -819,12 +984,6 @@ NSString * const kGTLYouTubeVideoContentDetails_Definition_Hd = @"hd"; NSString * const kGTLYouTubeVideoContentDetails_Definition_Sd = @"sd"; -// GTLYouTubeVideoConversionPing - Context -NSString * const kGTLYouTubeVideoConversionPing_Context_Comment = @"comment"; -NSString * const kGTLYouTubeVideoConversionPing_Context_Dislike = @"dislike"; -NSString * const kGTLYouTubeVideoConversionPing_Context_Like = @"like"; -NSString * const kGTLYouTubeVideoConversionPing_Context_Share = @"share"; - // GTLYouTubeVideoFileDetails - FileType NSString * const kGTLYouTubeVideoFileDetails_FileType_Archive = @"archive"; NSString * const kGTLYouTubeVideoFileDetails_FileType_Audio = @"audio"; @@ -886,6 +1045,7 @@ NSString * const kGTLYouTubeVideoStatus_RejectionReason_Copyright = @"copyright"; NSString * const kGTLYouTubeVideoStatus_RejectionReason_Duplicate = @"duplicate"; NSString * const kGTLYouTubeVideoStatus_RejectionReason_Inappropriate = @"inappropriate"; +NSString * const kGTLYouTubeVideoStatus_RejectionReason_Legal = @"legal"; NSString * const kGTLYouTubeVideoStatus_RejectionReason_Length = @"length"; NSString * const kGTLYouTubeVideoStatus_RejectionReason_TermsOfUse = @"termsOfUse"; NSString * const kGTLYouTubeVideoStatus_RejectionReason_Trademark = @"trademark"; diff --git a/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeContentRating.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeContentRating.h new file mode 100644 index 000000000..65cade3fd --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeContentRating.h @@ -0,0 +1,277 @@ +/* Copyright (c) 2016 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeContentRating.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube Data API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube/v3 +// Classes: +// GTLYouTubeContentRating (0 custom class methods, 66 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeContentRating +// + +// Ratings schemes. The country-specific ratings are mostly for movies and +// shows. NEXT_ID: 67 + +@interface GTLYouTubeContentRating : GTLObject + +// The video's Australian Classification Board (ACB) or Australian +// Communications and Media Authority (ACMA) rating. ACMA ratings are used to +// classify children's television programming. +@property (nonatomic, copy) NSString *acbRating; + +// The video's rating from Italy's Autorità per le Garanzie nelle Comunicazioni +// (AGCOM). +@property (nonatomic, copy) NSString *agcomRating; + +// The video's Anatel (Asociación Nacional de Televisión) rating for Chilean +// television. +@property (nonatomic, copy) NSString *anatelRating; + +// The video's British Board of Film Classification (BBFC) rating. +@property (nonatomic, copy) NSString *bbfcRating; + +// The video's rating from Thailand's Board of Film and Video Censors. +@property (nonatomic, copy) NSString *bfvcRating; + +// The video's rating from the Austrian Board of Media Classification +// (Bundesministerium für Unterricht, Kunst und Kultur). +@property (nonatomic, copy) NSString *bmukkRating; + +// The video's rating from the Canadian Radio-Television and Telecommunications +// Commission (CRTC) for Canadian French-language broadcasts. For more +// information, see the Canadian Broadcast Standards Council website. +@property (nonatomic, copy) NSString *catvfrRating; + +// Rating system for Canadian TV - Canadian TV Classification System The video's +// rating from the Canadian Radio-Television and Telecommunications Commission +// (CRTC) for Canadian English-language broadcasts. For more information, see +// the Canadian Broadcast Standards Council website. +@property (nonatomic, copy) NSString *catvRating; + +// The video's Central Board of Film Certification (CBFC - India) rating. +@property (nonatomic, copy) NSString *cbfcRating; + +// The video's Consejo de Calificación Cinematográfica (Chile) rating. +@property (nonatomic, copy) NSString *cccRating; + +// The video's rating from Portugal's Comissão de Classificação de Espect´culos. +@property (nonatomic, copy) NSString *cceRating; + +// The video's rating in Switzerland. +@property (nonatomic, copy) NSString *chfilmRating; + +// The video's Canadian Home Video Rating System (CHVRS) rating. +@property (nonatomic, copy) NSString *chvrsRating; + +// The video's rating from the Commission de Contrôle des Films (Belgium). +@property (nonatomic, copy) NSString *cicfRating; + +// The video's rating from Romania's CONSILIUL NATIONAL AL AUDIOVIZUALULUI +// (CNA). +@property (nonatomic, copy) NSString *cnaRating; + +// Rating system in France - Commission de classification cinematographique +@property (nonatomic, copy) NSString *cncRating; + +// The video's rating from France's Conseil supérieur de l?audiovisuel, which +// rates broadcast content. +@property (nonatomic, copy) NSString *csaRating; + +// The video's rating from Luxembourg's Commission de surveillance de la +// classification des films (CSCF). +@property (nonatomic, copy) NSString *cscfRating; + +// The video's rating in the Czech Republic. +@property (nonatomic, copy) NSString *czfilmRating; + +// The video's Departamento de Justiça, Classificação, Qualificação e Títulos +// (DJCQT - Brazil) rating. +@property (nonatomic, copy) NSString *djctqRating; + +// Reasons that explain why the video received its DJCQT (Brazil) rating. +@property (nonatomic, retain) NSArray *djctqRatingReasons; // of NSString + +// Rating system in Turkey - Evaluation and Classification Board of the Ministry +// of Culture and Tourism +@property (nonatomic, copy) NSString *ecbmctRating; + +// The video's rating in Estonia. +@property (nonatomic, copy) NSString *eefilmRating; + +// The video's rating in Egypt. +@property (nonatomic, copy) NSString *egfilmRating; + +// The video's Eirin (映倫) rating. Eirin is the Japanese rating system. +@property (nonatomic, copy) NSString *eirinRating; + +// The video's rating from Malaysia's Film Censorship Board. +@property (nonatomic, copy) NSString *fcbmRating; + +// The video's rating from Hong Kong's Office for Film, Newspaper and Article +// Administration. +@property (nonatomic, copy) NSString *fcoRating; + +// This property has been deprecated. Use the +// contentDetails.contentRating.cncRating instead. +@property (nonatomic, copy) NSString *fmocRating; + +// The video's rating from South Africa's Film and Publication Board. +@property (nonatomic, copy) NSString *fpbRating; + +// The video's Freiwillige Selbstkontrolle der Filmwirtschaft (FSK - Germany) +// rating. +@property (nonatomic, copy) NSString *fskRating; + +// The video's rating in Greece. +@property (nonatomic, copy) NSString *grfilmRating; + +// The video's Instituto de la Cinematografía y de las Artes Audiovisuales (ICAA +// - Spain) rating. +@property (nonatomic, copy) NSString *icaaRating; + +// The video's Irish Film Classification Office (IFCO - Ireland) rating. See the +// IFCO website for more information. +@property (nonatomic, copy) NSString *ifcoRating; + +// The video's rating in Israel. +@property (nonatomic, copy) NSString *ilfilmRating; + +// The video's INCAA (Instituto Nacional de Cine y Artes Audiovisuales - +// Argentina) rating. +@property (nonatomic, copy) NSString *incaaRating; + +// The video's rating from the Kenya Film Classification Board. +@property (nonatomic, copy) NSString *kfcbRating; + +// voor de Classificatie van Audiovisuele Media (Netherlands). +@property (nonatomic, copy) NSString *kijkwijzerRating; + +// The video's Korea Media Rating Board (영상물등급위원회) rating. The KMRB rates videos +// in South Korea. +@property (nonatomic, copy) NSString *kmrbRating; + +// The video's rating from Indonesia's Lembaga Sensor Film. +@property (nonatomic, copy) NSString *lsfRating; + +// The video's rating from Malta's Film Age-Classification Board. +@property (nonatomic, copy) NSString *mccaaRating; + +// The video's rating from the Danish Film Institute's (Det Danske Filminstitut) +// Media Council for Children and Young People. +@property (nonatomic, copy) NSString *mccypRating; + +// The video's rating from Singapore's Media Development Authority (MDA) and, +// specifically, it's Board of Film Censors (BFC). +@property (nonatomic, copy) NSString *mdaRating; + +// The video's rating from Medietilsynet, the Norwegian Media Authority. +@property (nonatomic, copy) NSString *medietilsynetRating; + +// The video's rating from Finland's Kansallinen Audiovisuaalinen Instituutti +// (National Audiovisual Institute). +@property (nonatomic, copy) NSString *mekuRating; + +// The video's rating from the Ministero dei Beni e delle Attività Culturali e +// del Turismo (Italy). +@property (nonatomic, copy) NSString *mibacRating; + +// The video's Ministerio de Cultura (Colombia) rating. +@property (nonatomic, copy) NSString *mocRating; + +// The video's rating from Taiwan's Ministry of Culture (文化部). +@property (nonatomic, copy) NSString *moctwRating; + +// The video's Motion Picture Association of America (MPAA) rating. +@property (nonatomic, copy) NSString *mpaaRating; + +// The video's rating from the Movie and Television Review and Classification +// Board (Philippines). +@property (nonatomic, copy) NSString *mtrcbRating; + +// The video's rating in Poland. +@property (nonatomic, copy) NSString *nbcplRating; + +// The video's rating from the Maldives National Bureau of Classification. +@property (nonatomic, copy) NSString *nbcRating; + +// The video's rating from the Bulgarian National Film Center. +@property (nonatomic, copy) NSString *nfrcRating; + +// The video's rating from Nigeria's National Film and Video Censors Board. +@property (nonatomic, copy) NSString *nfvcbRating; + +// The video's rating from the Nacionãlais Kino centrs (National Film Centre of +// Latvia). +@property (nonatomic, copy) NSString *nkclvRating; + +// The video's Office of Film and Literature Classification (OFLC - New Zealand) +// rating. +@property (nonatomic, copy) NSString *oflcRating; + +// The video's rating in Peru. +@property (nonatomic, copy) NSString *pefilmRating; + +// The video's rating from the Hungarian Nemzeti Filmiroda, the Rating Committee +// of the National Office of Film. +@property (nonatomic, copy) NSString *rcnofRating; + +// The video's rating in Venezuela. +@property (nonatomic, copy) NSString *resorteviolenciaRating; + +// The video's General Directorate of Radio, Television and Cinematography +// (Mexico) rating. +@property (nonatomic, copy) NSString *rtcRating; + +// The video's rating from Ireland's Raidió Teilifís Éireann. +@property (nonatomic, copy) NSString *rteRating; + +// The video's National Film Registry of the Russian Federation (MKRF - Russia) +// rating. +@property (nonatomic, copy) NSString *russiaRating; + +// The video's rating in Slovakia. +@property (nonatomic, copy) NSString *skfilmRating; + +// The video's rating in Iceland. +@property (nonatomic, copy) NSString *smaisRating; + +// The video's rating from Statens medieråd (Sweden's National Media Council). +@property (nonatomic, copy) NSString *smsaRating; + +// The video's TV Parental Guidelines (TVPG) rating. +@property (nonatomic, copy) NSString *tvpgRating; + +// A rating that YouTube uses to identify age-restricted content. +@property (nonatomic, copy) NSString *ytRating; + +@end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeContentRating.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeContentRating.m similarity index 65% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeContentRating.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeContentRating.m index 18cfa4a41..cc480a3ff 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeContentRating.m +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeContentRating.m @@ -1,4 +1,4 @@ -/* Copyright (c) 2014 Google Inc. +/* Copyright (c) 2016 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ // Documentation: // https://developers.google.com/youtube/v3 // Classes: -// GTLYouTubeContentRating (0 custom class methods, 64 custom properties) +// GTLYouTubeContentRating (0 custom class methods, 66 custom properties) #import "GTLYouTubeContentRating.h" @@ -38,22 +38,22 @@ @implementation GTLYouTubeContentRating @dynamic acbRating, agcomRating, anatelRating, bbfcRating, bfvcRating, bmukkRating, catvfrRating, catvRating, cbfcRating, cccRating, - cceRating, chfilmRating, chvrsRating, cicfRating, cnaRating, csaRating, - cscfRating, czfilmRating, djctqRating, djctqRatingReasons, - eefilmRating, egfilmRating, eirinRating, fcbmRating, fcoRating, - fmocRating, fpbRating, fskRating, grfilmRating, icaaRating, ifcoRating, - ilfilmRating, incaaRating, kfcbRating, kijkwijzerRating, kmrbRating, - lsfRating, mccaaRating, mccypRating, mdaRating, medietilsynetRating, - mekuRating, mibacRating, mocRating, moctwRating, mpaaRating, - mtrcbRating, nbcplRating, nbcRating, nfrcRating, nfvcbRating, - nkclvRating, oflcRating, pefilmRating, rcnofRating, + cceRating, chfilmRating, chvrsRating, cicfRating, cnaRating, cncRating, + csaRating, cscfRating, czfilmRating, djctqRating, djctqRatingReasons, + ecbmctRating, eefilmRating, egfilmRating, eirinRating, fcbmRating, + fcoRating, fmocRating, fpbRating, fskRating, grfilmRating, icaaRating, + ifcoRating, ilfilmRating, incaaRating, kfcbRating, kijkwijzerRating, + kmrbRating, lsfRating, mccaaRating, mccypRating, mdaRating, + medietilsynetRating, mekuRating, mibacRating, mocRating, moctwRating, + mpaaRating, mtrcbRating, nbcplRating, nbcRating, nfrcRating, + nfvcbRating, nkclvRating, oflcRating, pefilmRating, rcnofRating, resorteviolenciaRating, rtcRating, rteRating, russiaRating, skfilmRating, smaisRating, smsaRating, tvpgRating, ytRating; + (NSDictionary *)arrayPropertyToClassMap { - NSDictionary *map = - [NSDictionary dictionaryWithObject:[NSString class] - forKey:@"djctqRatingReasons"]; + NSDictionary *map = @{ + @"djctqRatingReasons" : [NSString class] + }; return map; } diff --git a/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeFanFundingEvent.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeFanFundingEvent.h new file mode 100644 index 000000000..531b5904c --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeFanFundingEvent.h @@ -0,0 +1,64 @@ +/* Copyright (c) 2016 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeFanFundingEvent.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube Data API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube/v3 +// Classes: +// GTLYouTubeFanFundingEvent (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLYouTubeFanFundingEventSnippet; + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeFanFundingEvent +// + +// A fanFundingEvent resource represents a fan funding event on a YouTube +// channel. Fan funding events occur when a user gives one-time monetary support +// to the channel owner. + +@interface GTLYouTubeFanFundingEvent : GTLObject + +// Etag of this resource. +@property (nonatomic, copy) NSString *ETag; + +// The ID that YouTube assigns to uniquely identify the fan funding event. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (nonatomic, copy) NSString *identifier; + +// Identifies what kind of resource this is. Value: the fixed string +// "youtube#fanFundingEvent". +@property (nonatomic, copy) NSString *kind; + +// The snippet object contains basic details about the fan funding event. +@property (nonatomic, retain) GTLYouTubeFanFundingEventSnippet *snippet; + +@end diff --git a/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeFanFundingEvent.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeFanFundingEvent.m new file mode 100644 index 000000000..74ab59e88 --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeFanFundingEvent.m @@ -0,0 +1,55 @@ +/* Copyright (c) 2016 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeFanFundingEvent.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube Data API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube/v3 +// Classes: +// GTLYouTubeFanFundingEvent (0 custom class methods, 4 custom properties) + +#import "GTLYouTubeFanFundingEvent.h" + +#import "GTLYouTubeFanFundingEventSnippet.h" + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeFanFundingEvent +// + +@implementation GTLYouTubeFanFundingEvent +@dynamic ETag, identifier, kind, snippet; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = @{ + @"ETag" : @"etag", + @"identifier" : @"id" + }; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"youtube#fanFundingEvent"]; +} + +@end diff --git a/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeFanFundingEventListResponse.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeFanFundingEventListResponse.h new file mode 100644 index 000000000..b2b4af752 --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeFanFundingEventListResponse.h @@ -0,0 +1,74 @@ +/* Copyright (c) 2016 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeFanFundingEventListResponse.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube Data API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube/v3 +// Classes: +// GTLYouTubeFanFundingEventListResponse (0 custom class methods, 8 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLYouTubeFanFundingEvent; +@class GTLYouTubePageInfo; +@class GTLYouTubeTokenPagination; + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeFanFundingEventListResponse +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLYouTubeFanFundingEventListResponse : GTLCollectionObject + +// Etag of this resource. +@property (nonatomic, copy) NSString *ETag; + +// Serialized EventId of the request which produced this response. +@property (nonatomic, copy) NSString *eventId; + +// A list of fan funding events that match the request criteria. +@property (nonatomic, retain) NSArray *items; // of GTLYouTubeFanFundingEvent + +// Identifies what kind of resource this is. Value: the fixed string +// "youtube#fanFundingEventListResponse". +@property (nonatomic, 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 (nonatomic, copy) NSString *nextPageToken; + +@property (nonatomic, retain) GTLYouTubePageInfo *pageInfo; +@property (nonatomic, retain) GTLYouTubeTokenPagination *tokenPagination; + +// The visitorId identifies the visitor. +@property (nonatomic, copy) NSString *visitorId; + +@end diff --git a/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeFanFundingEventListResponse.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeFanFundingEventListResponse.m new file mode 100644 index 000000000..1f764d1f9 --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeFanFundingEventListResponse.m @@ -0,0 +1,64 @@ +/* Copyright (c) 2016 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeFanFundingEventListResponse.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube Data API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube/v3 +// Classes: +// GTLYouTubeFanFundingEventListResponse (0 custom class methods, 8 custom properties) + +#import "GTLYouTubeFanFundingEventListResponse.h" + +#import "GTLYouTubeFanFundingEvent.h" +#import "GTLYouTubePageInfo.h" +#import "GTLYouTubeTokenPagination.h" + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeFanFundingEventListResponse +// + +@implementation GTLYouTubeFanFundingEventListResponse +@dynamic ETag, eventId, items, kind, nextPageToken, pageInfo, tokenPagination, + visitorId; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = @{ + @"ETag" : @"etag" + }; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = @{ + @"items" : [GTLYouTubeFanFundingEvent class] + }; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"youtube#fanFundingEventListResponse"]; +} + +@end diff --git a/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeFanFundingEventSnippet.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeFanFundingEventSnippet.h new file mode 100644 index 000000000..f76589334 --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeFanFundingEventSnippet.h @@ -0,0 +1,70 @@ +/* Copyright (c) 2016 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeFanFundingEventSnippet.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube Data API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube/v3 +// Classes: +// GTLYouTubeFanFundingEventSnippet (0 custom class methods, 7 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLYouTubeChannelProfileDetails; + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeFanFundingEventSnippet +// + +@interface GTLYouTubeFanFundingEventSnippet : GTLObject + +// The amount of funding in micros of fund_currency. e.g., 1 is represented +@property (nonatomic, retain) NSNumber *amountMicros; // unsignedLongLongValue + +// Channel id where the funding event occurred. +@property (nonatomic, copy) NSString *channelId; + +// The text contents of the comment left by the user. +@property (nonatomic, copy) NSString *commentText; + +// The date and time when the funding occurred. The value is specified in ISO +// 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. +@property (nonatomic, retain) GTLDateTime *createdAt; + +// The currency in which the fund was made. ISO 4217. +@property (nonatomic, copy) NSString *currency; + +// A rendered string that displays the fund amount and currency (e.g., "$1.00"). +// The string is rendered for the given language. +@property (nonatomic, copy) NSString *displayString; + +// Details about the supporter. Only filled if the event was made public by the +// user. +@property (nonatomic, retain) GTLYouTubeChannelProfileDetails *supporterDetails; + +@end diff --git a/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeFanFundingEventSnippet.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeFanFundingEventSnippet.m new file mode 100644 index 000000000..5f8037436 --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeFanFundingEventSnippet.m @@ -0,0 +1,43 @@ +/* Copyright (c) 2016 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeFanFundingEventSnippet.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube Data API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube/v3 +// Classes: +// GTLYouTubeFanFundingEventSnippet (0 custom class methods, 7 custom properties) + +#import "GTLYouTubeFanFundingEventSnippet.h" + +#import "GTLYouTubeChannelProfileDetails.h" + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeFanFundingEventSnippet +// + +@implementation GTLYouTubeFanFundingEventSnippet +@dynamic amountMicros, channelId, commentText, createdAt, currency, + displayString, supporterDetails; +@end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeGeoPoint.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeGeoPoint.h similarity index 85% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeGeoPoint.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeGeoPoint.h index 045a17680..0de278006 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeGeoPoint.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeGeoPoint.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -44,12 +44,12 @@ @interface GTLYouTubeGeoPoint : GTLObject // Altitude above the reference ellipsoid, in meters. -@property (retain) NSNumber *altitude; // doubleValue +@property (nonatomic, retain) NSNumber *altitude; // doubleValue // Latitude in degrees. -@property (retain) NSNumber *latitude; // doubleValue +@property (nonatomic, retain) NSNumber *latitude; // doubleValue // Longitude in degrees. -@property (retain) NSNumber *longitude; // doubleValue +@property (nonatomic, retain) NSNumber *longitude; // doubleValue @end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeGeoPoint.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeGeoPoint.m similarity index 100% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeGeoPoint.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeGeoPoint.m diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeGuideCategory.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeGuideCategory.h similarity index 89% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeGuideCategory.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeGuideCategory.h index 1084c90b2..b5feb87e9 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeGuideCategory.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeGuideCategory.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -50,18 +50,18 @@ @interface GTLYouTubeGuideCategory : GTLObject // Etag of this resource. -@property (copy) NSString *ETag; +@property (nonatomic, 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; +@property (nonatomic, copy) NSString *identifier; // Identifies what kind of resource this is. Value: the fixed string // "youtube#guideCategory". -@property (copy) NSString *kind; +@property (nonatomic, copy) NSString *kind; // The snippet object contains basic details about the category, such as its // title. -@property (retain) GTLYouTubeGuideCategorySnippet *snippet; +@property (nonatomic, retain) GTLYouTubeGuideCategorySnippet *snippet; @end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeGuideCategory.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeGuideCategory.m similarity index 89% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeGuideCategory.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeGuideCategory.m index 872adc27e..5018f53e1 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeGuideCategory.m +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeGuideCategory.m @@ -1,4 +1,4 @@ -/* Copyright (c) 2012 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -41,11 +41,10 @@ @implementation GTLYouTubeGuideCategory @dynamic ETag, identifier, kind, snippet; + (NSDictionary *)propertyToJSONKeyMap { - NSDictionary *map = - [NSDictionary dictionaryWithObjectsAndKeys: - @"etag", @"ETag", - @"id", @"identifier", - nil]; + NSDictionary *map = @{ + @"ETag" : @"etag", + @"identifier" : @"id" + }; return map; } diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeGuideCategoryListResponse.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeGuideCategoryListResponse.h similarity index 80% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeGuideCategoryListResponse.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeGuideCategoryListResponse.h index d6b7edc24..86d1b8db5 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeGuideCategoryListResponse.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeGuideCategoryListResponse.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -49,33 +49,33 @@ @interface GTLYouTubeGuideCategoryListResponse : GTLCollectionObject // Etag of this resource. -@property (copy) NSString *ETag; +@property (nonatomic, copy) NSString *ETag; // Serialized EventId of the request which produced this response. -@property (copy) NSString *eventId; +@property (nonatomic, copy) NSString *eventId; // 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 +@property (nonatomic, retain) NSArray *items; // of GTLYouTubeGuideCategory // Identifies what kind of resource this is. Value: the fixed string // "youtube#guideCategoryListResponse". -@property (copy) NSString *kind; +@property (nonatomic, 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; +@property (nonatomic, copy) NSString *nextPageToken; -@property (retain) GTLYouTubePageInfo *pageInfo; +@property (nonatomic, 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; +@property (nonatomic, copy) NSString *prevPageToken; -@property (retain) GTLYouTubeTokenPagination *tokenPagination; +@property (nonatomic, retain) GTLYouTubeTokenPagination *tokenPagination; // The visitorId identifies the visitor. -@property (copy) NSString *visitorId; +@property (nonatomic, copy) NSString *visitorId; @end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeGuideCategoryListResponse.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeGuideCategoryListResponse.m similarity index 85% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeGuideCategoryListResponse.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeGuideCategoryListResponse.m index 6b93e8c2f..672a9fdb1 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeGuideCategoryListResponse.m +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeGuideCategoryListResponse.m @@ -1,4 +1,4 @@ -/* Copyright (c) 2013 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -44,16 +44,16 @@ @implementation GTLYouTubeGuideCategoryListResponse tokenPagination, visitorId; + (NSDictionary *)propertyToJSONKeyMap { - NSDictionary *map = - [NSDictionary dictionaryWithObject:@"etag" - forKey:@"ETag"]; + NSDictionary *map = @{ + @"ETag" : @"etag" + }; return map; } + (NSDictionary *)arrayPropertyToClassMap { - NSDictionary *map = - [NSDictionary dictionaryWithObject:[GTLYouTubeGuideCategory class] - forKey:@"items"]; + NSDictionary *map = @{ + @"items" : [GTLYouTubeGuideCategory class] + }; return map; } diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeGuideCategorySnippet.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeGuideCategorySnippet.h similarity index 91% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeGuideCategorySnippet.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeGuideCategorySnippet.h index 77153ea81..dfc790abb 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeGuideCategorySnippet.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeGuideCategorySnippet.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -42,9 +42,9 @@ // Basic details about a guide category. @interface GTLYouTubeGuideCategorySnippet : GTLObject -@property (copy) NSString *channelId; +@property (nonatomic, copy) NSString *channelId; // Description of the guide category. -@property (copy) NSString *title; +@property (nonatomic, copy) NSString *title; @end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeGuideCategorySnippet.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeGuideCategorySnippet.m similarity index 100% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeGuideCategorySnippet.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeGuideCategorySnippet.m diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeI18nLanguage.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeI18nLanguage.h similarity index 88% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeI18nLanguage.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeI18nLanguage.h index 27007870a..7a888b1cf 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeI18nLanguage.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeI18nLanguage.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2014 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -47,18 +47,18 @@ @interface GTLYouTubeI18nLanguage : GTLObject // Etag of this resource. -@property (copy) NSString *ETag; +@property (nonatomic, copy) NSString *ETag; // The ID that YouTube uses to uniquely identify the i18n language. // identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). -@property (copy) NSString *identifier; +@property (nonatomic, copy) NSString *identifier; // Identifies what kind of resource this is. Value: the fixed string // "youtube#i18nLanguage". -@property (copy) NSString *kind; +@property (nonatomic, copy) NSString *kind; // The snippet object contains basic details about the i18n language, such as // language code and human-readable name. -@property (retain) GTLYouTubeI18nLanguageSnippet *snippet; +@property (nonatomic, retain) GTLYouTubeI18nLanguageSnippet *snippet; @end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeI18nLanguage.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeI18nLanguage.m similarity index 89% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeI18nLanguage.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeI18nLanguage.m index f28efac19..daec4f4cf 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeI18nLanguage.m +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeI18nLanguage.m @@ -1,4 +1,4 @@ -/* Copyright (c) 2014 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -41,11 +41,10 @@ @implementation GTLYouTubeI18nLanguage @dynamic ETag, identifier, kind, snippet; + (NSDictionary *)propertyToJSONKeyMap { - NSDictionary *map = - [NSDictionary dictionaryWithObjectsAndKeys: - @"etag", @"ETag", - @"id", @"identifier", - nil]; + NSDictionary *map = @{ + @"ETag" : @"etag", + @"identifier" : @"id" + }; return map; } diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeI18nLanguageListResponse.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeI18nLanguageListResponse.h similarity index 86% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeI18nLanguageListResponse.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeI18nLanguageListResponse.h index dea337f0c..d6bdf663b 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeI18nLanguageListResponse.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeI18nLanguageListResponse.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2014 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -47,20 +47,20 @@ @interface GTLYouTubeI18nLanguageListResponse : GTLCollectionObject // Etag of this resource. -@property (copy) NSString *ETag; +@property (nonatomic, copy) NSString *ETag; // Serialized EventId of the request which produced this response. -@property (copy) NSString *eventId; +@property (nonatomic, copy) NSString *eventId; // A list of supported i18n languages. In this map, the i18n language ID is the // map key, and its value is the corresponding i18nLanguage resource. -@property (retain) NSArray *items; // of GTLYouTubeI18nLanguage +@property (nonatomic, retain) NSArray *items; // of GTLYouTubeI18nLanguage // Identifies what kind of resource this is. Value: the fixed string // "youtube#i18nLanguageListResponse". -@property (copy) NSString *kind; +@property (nonatomic, copy) NSString *kind; // The visitorId identifies the visitor. -@property (copy) NSString *visitorId; +@property (nonatomic, copy) NSString *visitorId; @end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeI18nLanguageListResponse.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeI18nLanguageListResponse.m similarity index 84% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeI18nLanguageListResponse.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeI18nLanguageListResponse.m index 916980e13..35084db9d 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeI18nLanguageListResponse.m +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeI18nLanguageListResponse.m @@ -1,4 +1,4 @@ -/* Copyright (c) 2014 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -41,16 +41,16 @@ @implementation GTLYouTubeI18nLanguageListResponse @dynamic ETag, eventId, items, kind, visitorId; + (NSDictionary *)propertyToJSONKeyMap { - NSDictionary *map = - [NSDictionary dictionaryWithObject:@"etag" - forKey:@"ETag"]; + NSDictionary *map = @{ + @"ETag" : @"etag" + }; return map; } + (NSDictionary *)arrayPropertyToClassMap { - NSDictionary *map = - [NSDictionary dictionaryWithObject:[GTLYouTubeI18nLanguage class] - forKey:@"items"]; + NSDictionary *map = @{ + @"items" : [GTLYouTubeI18nLanguage class] + }; return map; } diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeI18nLanguageSnippet.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeI18nLanguageSnippet.h similarity index 92% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeI18nLanguageSnippet.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeI18nLanguageSnippet.h index e6b9cc731..a74fc3f37 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeI18nLanguageSnippet.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeI18nLanguageSnippet.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2014 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -45,9 +45,9 @@ @interface GTLYouTubeI18nLanguageSnippet : GTLObject // A short BCP-47 code that uniquely identifies a language. -@property (copy) NSString *hl; +@property (nonatomic, copy) NSString *hl; // The human-readable name of the language in the language itself. -@property (copy) NSString *name; +@property (nonatomic, copy) NSString *name; @end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeI18nLanguageSnippet.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeI18nLanguageSnippet.m similarity index 100% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeI18nLanguageSnippet.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeI18nLanguageSnippet.m diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeI18nRegion.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeI18nRegion.h similarity index 87% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeI18nRegion.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeI18nRegion.h index 5a4d78ae9..24d7f70bc 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeI18nRegion.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeI18nRegion.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2014 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -46,18 +46,18 @@ @interface GTLYouTubeI18nRegion : GTLObject // Etag of this resource. -@property (copy) NSString *ETag; +@property (nonatomic, copy) NSString *ETag; // The ID that YouTube uses to uniquely identify the i18n region. // identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). -@property (copy) NSString *identifier; +@property (nonatomic, copy) NSString *identifier; // Identifies what kind of resource this is. Value: the fixed string // "youtube#i18nRegion". -@property (copy) NSString *kind; +@property (nonatomic, copy) NSString *kind; // The snippet object contains basic details about the i18n region, such as // region code and human-readable name. -@property (retain) GTLYouTubeI18nRegionSnippet *snippet; +@property (nonatomic, retain) GTLYouTubeI18nRegionSnippet *snippet; @end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeI18nRegion.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeI18nRegion.m similarity index 89% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeI18nRegion.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeI18nRegion.m index c8485765d..a6cac2b43 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeI18nRegion.m +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeI18nRegion.m @@ -1,4 +1,4 @@ -/* Copyright (c) 2014 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -41,11 +41,10 @@ @implementation GTLYouTubeI18nRegion @dynamic ETag, identifier, kind, snippet; + (NSDictionary *)propertyToJSONKeyMap { - NSDictionary *map = - [NSDictionary dictionaryWithObjectsAndKeys: - @"etag", @"ETag", - @"id", @"identifier", - nil]; + NSDictionary *map = @{ + @"ETag" : @"etag", + @"identifier" : @"id" + }; return map; } diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeI18nRegionListResponse.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeI18nRegionListResponse.h similarity index 86% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeI18nRegionListResponse.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeI18nRegionListResponse.h index 9e27c07ac..57032a0a2 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeI18nRegionListResponse.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeI18nRegionListResponse.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2014 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -47,20 +47,20 @@ @interface GTLYouTubeI18nRegionListResponse : GTLCollectionObject // Etag of this resource. -@property (copy) NSString *ETag; +@property (nonatomic, copy) NSString *ETag; // Serialized EventId of the request which produced this response. -@property (copy) NSString *eventId; +@property (nonatomic, copy) NSString *eventId; // A list of regions where YouTube is available. In this map, the i18n region ID // is the map key, and its value is the corresponding i18nRegion resource. -@property (retain) NSArray *items; // of GTLYouTubeI18nRegion +@property (nonatomic, retain) NSArray *items; // of GTLYouTubeI18nRegion // Identifies what kind of resource this is. Value: the fixed string // "youtube#i18nRegionListResponse". -@property (copy) NSString *kind; +@property (nonatomic, copy) NSString *kind; // The visitorId identifies the visitor. -@property (copy) NSString *visitorId; +@property (nonatomic, copy) NSString *visitorId; @end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeI18nRegionListResponse.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeI18nRegionListResponse.m similarity index 84% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeI18nRegionListResponse.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeI18nRegionListResponse.m index ef743feea..7d0a30320 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeI18nRegionListResponse.m +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeI18nRegionListResponse.m @@ -1,4 +1,4 @@ -/* Copyright (c) 2014 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -41,16 +41,16 @@ @implementation GTLYouTubeI18nRegionListResponse @dynamic ETag, eventId, items, kind, visitorId; + (NSDictionary *)propertyToJSONKeyMap { - NSDictionary *map = - [NSDictionary dictionaryWithObject:@"etag" - forKey:@"ETag"]; + NSDictionary *map = @{ + @"ETag" : @"etag" + }; return map; } + (NSDictionary *)arrayPropertyToClassMap { - NSDictionary *map = - [NSDictionary dictionaryWithObject:[GTLYouTubeI18nRegion class] - forKey:@"items"]; + NSDictionary *map = @{ + @"items" : [GTLYouTubeI18nRegion class] + }; return map; } diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeI18nRegionSnippet.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeI18nRegionSnippet.h similarity index 92% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeI18nRegionSnippet.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeI18nRegionSnippet.h index 8a1501a1d..b5fd7768a 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeI18nRegionSnippet.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeI18nRegionSnippet.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2014 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -45,9 +45,9 @@ @interface GTLYouTubeI18nRegionSnippet : GTLObject // The region code as a 2-letter ISO country code. -@property (copy) NSString *gl; +@property (nonatomic, copy) NSString *gl; // The human-readable name of the region. -@property (copy) NSString *name; +@property (nonatomic, copy) NSString *name; @end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeI18nRegionSnippet.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeI18nRegionSnippet.m similarity index 100% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeI18nRegionSnippet.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeI18nRegionSnippet.m diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeImageSettings.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeImageSettings.h similarity index 67% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeImageSettings.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeImageSettings.h index 7756e3c01..f30496066 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeImageSettings.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeImageSettings.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -47,75 +47,75 @@ // The URL for the background image shown on the video watch page. The image // should be 1200px by 615px, with a maximum file size of 128k. -@property (retain) GTLYouTubeLocalizedProperty *backgroundImageUrl; +@property (nonatomic, retain) GTLYouTubeLocalizedProperty *backgroundImageUrl; // This is used only in update requests; if it's set, we use this URL to // generate all of the above banner URLs. -@property (copy) NSString *bannerExternalUrl; +@property (nonatomic, copy) NSString *bannerExternalUrl; // Banner image. Desktop size (1060x175). -@property (copy) NSString *bannerImageUrl; +@property (nonatomic, copy) NSString *bannerImageUrl; // Banner image. Mobile size high resolution (1440x395). -@property (copy) NSString *bannerMobileExtraHdImageUrl; +@property (nonatomic, copy) NSString *bannerMobileExtraHdImageUrl; // Banner image. Mobile size high resolution (1280x360). -@property (copy) NSString *bannerMobileHdImageUrl; +@property (nonatomic, copy) NSString *bannerMobileHdImageUrl; // Banner image. Mobile size (640x175). -@property (copy) NSString *bannerMobileImageUrl; +@property (nonatomic, copy) NSString *bannerMobileImageUrl; // Banner image. Mobile size low resolution (320x88). -@property (copy) NSString *bannerMobileLowImageUrl; +@property (nonatomic, copy) NSString *bannerMobileLowImageUrl; // Banner image. Mobile size medium/high resolution (960x263). -@property (copy) NSString *bannerMobileMediumHdImageUrl; +@property (nonatomic, copy) NSString *bannerMobileMediumHdImageUrl; // Banner image. Tablet size extra high resolution (2560x424). -@property (copy) NSString *bannerTabletExtraHdImageUrl; +@property (nonatomic, copy) NSString *bannerTabletExtraHdImageUrl; // Banner image. Tablet size high resolution (2276x377). -@property (copy) NSString *bannerTabletHdImageUrl; +@property (nonatomic, copy) NSString *bannerTabletHdImageUrl; // Banner image. Tablet size (1707x283). -@property (copy) NSString *bannerTabletImageUrl; +@property (nonatomic, copy) NSString *bannerTabletImageUrl; // Banner image. Tablet size low resolution (1138x188). -@property (copy) NSString *bannerTabletLowImageUrl; +@property (nonatomic, copy) NSString *bannerTabletLowImageUrl; // Banner image. TV size high resolution (1920x1080). -@property (copy) NSString *bannerTvHighImageUrl; +@property (nonatomic, copy) NSString *bannerTvHighImageUrl; // Banner image. TV size extra high resolution (2120x1192). -@property (copy) NSString *bannerTvImageUrl; +@property (nonatomic, copy) NSString *bannerTvImageUrl; // Banner image. TV size low resolution (854x480). -@property (copy) NSString *bannerTvLowImageUrl; +@property (nonatomic, copy) NSString *bannerTvLowImageUrl; // Banner image. TV size medium resolution (1280x720). -@property (copy) NSString *bannerTvMediumImageUrl; +@property (nonatomic, copy) NSString *bannerTvMediumImageUrl; // The image map script for the large banner image. -@property (retain) GTLYouTubeLocalizedProperty *largeBrandedBannerImageImapScript; +@property (nonatomic, retain) GTLYouTubeLocalizedProperty *largeBrandedBannerImageImapScript; // The URL for the 854px by 70px image that appears below the video player in // the expanded video view of the video watch page. -@property (retain) GTLYouTubeLocalizedProperty *largeBrandedBannerImageUrl; +@property (nonatomic, retain) GTLYouTubeLocalizedProperty *largeBrandedBannerImageUrl; // The image map script for the small banner image. -@property (retain) GTLYouTubeLocalizedProperty *smallBrandedBannerImageImapScript; +@property (nonatomic, retain) GTLYouTubeLocalizedProperty *smallBrandedBannerImageImapScript; // The URL for the 640px by 70px banner image that appears below the video // player in the default view of the video watch page. -@property (retain) GTLYouTubeLocalizedProperty *smallBrandedBannerImageUrl; +@property (nonatomic, retain) GTLYouTubeLocalizedProperty *smallBrandedBannerImageUrl; // The URL for a 1px by 1px tracking pixel that can be used to collect // statistics for views of the channel or video pages. -@property (copy) NSString *trackingImageUrl; +@property (nonatomic, copy) NSString *trackingImageUrl; // The URL for the image that appears above the top-left corner of the video // player. This is a 25-pixel-high image with a flexible width that cannot // exceed 170 pixels. -@property (copy) NSString *watchIconImageUrl; +@property (nonatomic, copy) NSString *watchIconImageUrl; @end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeImageSettings.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeImageSettings.m similarity index 100% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeImageSettings.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeImageSettings.m diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeIngestionInfo.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeIngestionInfo.h similarity index 90% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeIngestionInfo.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeIngestionInfo.h index 4e39ac7cc..247ae7f86 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeIngestionInfo.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeIngestionInfo.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -46,7 +46,7 @@ // The backup ingestion URL that you should use to stream video to YouTube. You // have the option of simultaneously streaming the content that you are sending // to the ingestionAddress to this URL. -@property (copy) NSString *backupIngestionAddress; +@property (nonatomic, copy) NSString *backupIngestionAddress; // The primary ingestion URL that you should use to stream video to YouTube. You // must stream video to this URL. @@ -54,9 +54,9 @@ // you may need to enter the stream URL and stream name separately or you may // need to concatenate them in the following format: // STREAM_URL/STREAM_NAME -@property (copy) NSString *ingestionAddress; +@property (nonatomic, copy) NSString *ingestionAddress; // The HTTP or RTMP stream name that YouTube assigns to the video stream. -@property (copy) NSString *streamName; +@property (nonatomic, copy) NSString *streamName; @end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeIngestionInfo.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeIngestionInfo.m similarity index 100% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeIngestionInfo.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeIngestionInfo.m diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeInvideoBranding.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeInvideoBranding.h similarity index 78% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeInvideoBranding.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeInvideoBranding.h index ee7f41e8f..5ba2c7d6f 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeInvideoBranding.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeInvideoBranding.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -43,9 +43,9 @@ // @interface GTLYouTubeInvideoBranding : GTLObject -@property (copy) NSString *imageBytes; // GTLBase64 can encode/decode (probably web-safe format) -@property (copy) NSString *imageUrl; -@property (retain) GTLYouTubeInvideoPosition *position; -@property (copy) NSString *targetChannelId; -@property (retain) GTLYouTubeInvideoTiming *timing; +@property (nonatomic, copy) NSString *imageBytes; // GTLBase64 can encode/decode (probably web-safe format) +@property (nonatomic, copy) NSString *imageUrl; +@property (nonatomic, retain) GTLYouTubeInvideoPosition *position; +@property (nonatomic, copy) NSString *targetChannelId; +@property (nonatomic, retain) GTLYouTubeInvideoTiming *timing; @end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeInvideoBranding.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeInvideoBranding.m similarity index 100% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeInvideoBranding.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeInvideoBranding.m diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeInvideoPosition.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeInvideoPosition.h similarity index 92% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeInvideoPosition.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeInvideoPosition.h index c5d6a2105..46751bbb8 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeInvideoPosition.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeInvideoPosition.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -45,9 +45,9 @@ @interface GTLYouTubeInvideoPosition : GTLObject // Describes in which corner of the video the visual widget will appear. -@property (copy) NSString *cornerPosition; +@property (nonatomic, copy) NSString *cornerPosition; // Defines the position type. -@property (copy) NSString *type; +@property (nonatomic, copy) NSString *type; @end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeInvideoPosition.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeInvideoPosition.m similarity index 100% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeInvideoPosition.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeInvideoPosition.m diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeInvideoPromotion.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeInvideoPromotion.h similarity index 87% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeInvideoPromotion.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeInvideoPromotion.h index aaff9c2f4..653de839b 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeInvideoPromotion.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeInvideoPromotion.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2014 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -53,20 +53,20 @@ // The default temporal position within the video where the promoted item will // be displayed. Can be overriden by more specific timing in the item. -@property (retain) GTLYouTubeInvideoTiming *defaultTiming; +@property (nonatomic, retain) GTLYouTubeInvideoTiming *defaultTiming; // List of promoted items in decreasing priority. -@property (retain) NSArray *items; // of GTLYouTubePromotedItem +@property (nonatomic, retain) NSArray *items; // of GTLYouTubePromotedItem // The spatial position within the video where the promoted item will be // displayed. -@property (retain) GTLYouTubeInvideoPosition *position; +@property (nonatomic, retain) GTLYouTubeInvideoPosition *position; // Indicates whether the channel's promotional campaign uses "smart timing." // This feature attempts to show promotions at a point in the video when they // are more likely to be clicked and less likely to disrupt the viewing // experience. This feature also picks up a single promotion to show on each // video. -@property (retain) NSNumber *useSmartTiming; // boolValue +@property (nonatomic, retain) NSNumber *useSmartTiming; // boolValue @end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeInvideoPromotion.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeInvideoPromotion.m similarity index 89% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeInvideoPromotion.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeInvideoPromotion.m index 991392d5f..1808d37f7 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeInvideoPromotion.m +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeInvideoPromotion.m @@ -1,4 +1,4 @@ -/* Copyright (c) 2014 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -43,9 +43,9 @@ @implementation GTLYouTubeInvideoPromotion @dynamic defaultTiming, items, position, useSmartTiming; + (NSDictionary *)arrayPropertyToClassMap { - NSDictionary *map = - [NSDictionary dictionaryWithObject:[GTLYouTubePromotedItem class] - forKey:@"items"]; + NSDictionary *map = @{ + @"items" : [GTLYouTubePromotedItem class] + }; return map; } diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeInvideoTiming.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeInvideoTiming.h similarity index 89% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeInvideoTiming.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeInvideoTiming.h index f596b660c..7f59cab5c 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeInvideoTiming.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeInvideoTiming.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -45,17 +45,17 @@ // Defines the duration in milliseconds for which the promotion should be // displayed. If missing, the client should use the default. -@property (retain) NSNumber *durationMs; // unsignedLongLongValue +@property (nonatomic, retain) NSNumber *durationMs; // unsignedLongLongValue // Defines the time at which the promotion will appear. Depending on the value // of type the value of the offsetMs field will represent a time offset from the // start or from the end of the video, expressed in milliseconds. -@property (retain) NSNumber *offsetMs; // unsignedLongLongValue +@property (nonatomic, retain) NSNumber *offsetMs; // unsignedLongLongValue // Describes a timing type. If the value is offsetFromStart, then the offsetMs // field represents an offset from the start of the video. If the value is // offsetFromEnd, then the offsetMs field represents an offset from the end of // the video. -@property (copy) NSString *type; +@property (nonatomic, copy) NSString *type; @end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeInvideoTiming.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeInvideoTiming.m similarity index 100% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeInvideoTiming.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeInvideoTiming.m diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeLanguageTag.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLanguageTag.h similarity index 94% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeLanguageTag.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLanguageTag.h index 12c3d5e53..e615d34d1 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeLanguageTag.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLanguageTag.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2014 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -40,5 +40,5 @@ // @interface GTLYouTubeLanguageTag : GTLObject -@property (copy) NSString *value; +@property (nonatomic, copy) NSString *value; @end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeLanguageTag.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLanguageTag.m similarity index 100% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeLanguageTag.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLanguageTag.m diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcast.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcast.h similarity index 68% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcast.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcast.h index 38d7f1cad..9fd23a688 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcast.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcast.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ // Documentation: // https://developers.google.com/youtube/v3 // Classes: -// GTLYouTubeLiveBroadcast (0 custom class methods, 6 custom properties) +// GTLYouTubeLiveBroadcast (0 custom class methods, 8 custom properties) #if GTL_BUILT_AS_FRAMEWORK #import "GTL/GTLObject.h" @@ -36,7 +36,9 @@ @class GTLYouTubeLiveBroadcastContentDetails; @class GTLYouTubeLiveBroadcastSnippet; +@class GTLYouTubeLiveBroadcastStatistics; @class GTLYouTubeLiveBroadcastStatus; +@class GTLYouTubeLiveBroadcastTopicDetails; // ---------------------------------------------------------------------------- // @@ -52,24 +54,31 @@ // content, such as whether the content can be shown in an embedded video player // or if it will be archived and therefore available for viewing after the event // has concluded. -@property (retain) GTLYouTubeLiveBroadcastContentDetails *contentDetails; +@property (nonatomic, retain) GTLYouTubeLiveBroadcastContentDetails *contentDetails; // Etag of this resource. -@property (copy) NSString *ETag; +@property (nonatomic, copy) NSString *ETag; // The ID that YouTube assigns to uniquely identify the broadcast. // identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). -@property (copy) NSString *identifier; +@property (nonatomic, copy) NSString *identifier; // Identifies what kind of resource this is. Value: the fixed string // "youtube#liveBroadcast". -@property (copy) NSString *kind; +@property (nonatomic, copy) NSString *kind; // The snippet object contains basic details about the event, including its // title, description, start time, and end time. -@property (retain) GTLYouTubeLiveBroadcastSnippet *snippet; +@property (nonatomic, retain) GTLYouTubeLiveBroadcastSnippet *snippet; + +// The statistics object contains info about the event's current stats. These +// include concurrent viewers and total chat count. Statistics can change (in +// either direction) during the lifetime of an event. Statistics are only +// returned while the event is live. +@property (nonatomic, retain) GTLYouTubeLiveBroadcastStatistics *statistics; // The status object contains information about the event's status. -@property (retain) GTLYouTubeLiveBroadcastStatus *status; +@property (nonatomic, retain) GTLYouTubeLiveBroadcastStatus *status; +@property (nonatomic, retain) GTLYouTubeLiveBroadcastTopicDetails *topicDetails; @end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcast.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcast.m similarity index 79% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcast.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcast.m index 03ce9d1fb..f7ededf0b 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcast.m +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcast.m @@ -1,4 +1,4 @@ -/* Copyright (c) 2013 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,13 +26,15 @@ // Documentation: // https://developers.google.com/youtube/v3 // Classes: -// GTLYouTubeLiveBroadcast (0 custom class methods, 6 custom properties) +// GTLYouTubeLiveBroadcast (0 custom class methods, 8 custom properties) #import "GTLYouTubeLiveBroadcast.h" #import "GTLYouTubeLiveBroadcastContentDetails.h" #import "GTLYouTubeLiveBroadcastSnippet.h" +#import "GTLYouTubeLiveBroadcastStatistics.h" #import "GTLYouTubeLiveBroadcastStatus.h" +#import "GTLYouTubeLiveBroadcastTopicDetails.h" // ---------------------------------------------------------------------------- // @@ -40,14 +42,14 @@ // @implementation GTLYouTubeLiveBroadcast -@dynamic contentDetails, ETag, identifier, kind, snippet, status; +@dynamic contentDetails, ETag, identifier, kind, snippet, statistics, status, + topicDetails; + (NSDictionary *)propertyToJSONKeyMap { - NSDictionary *map = - [NSDictionary dictionaryWithObjectsAndKeys: - @"etag", @"ETag", - @"id", @"identifier", - nil]; + NSDictionary *map = @{ + @"ETag" : @"etag", + @"identifier" : @"id" + }; return map; } diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastContentDetails.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastContentDetails.h similarity index 73% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastContentDetails.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastContentDetails.h index 9ccd19c75..12285f87f 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastContentDetails.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastContentDetails.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013 Google Inc. +/* Copyright (c) 2016 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ // Documentation: // https://developers.google.com/youtube/v3 // Classes: -// GTLYouTubeLiveBroadcastContentDetails (0 custom class methods, 8 custom properties) +// GTLYouTubeLiveBroadcastContentDetails (0 custom class methods, 10 custom properties) #if GTL_BUILT_AS_FRAMEWORK #import "GTL/GTLObject.h" @@ -46,16 +46,20 @@ @interface GTLYouTubeLiveBroadcastContentDetails : GTLObject // This value uniquely identifies the live stream bound to the broadcast. -@property (copy) NSString *boundStreamId; +@property (nonatomic, copy) NSString *boundStreamId; -// This setting indicates whether closed captioning is enabled for this -// broadcast. The ingestion URL of the closed captions is returned through the -// liveStreams API. -@property (retain) NSNumber *enableClosedCaptions; // boolValue +@property (nonatomic, copy) NSString *closedCaptionsType; + +// This setting indicates whether HTTP POST closed captioning is enabled for +// this broadcast. The ingestion URL of the closed captions is returned through +// the liveStreams API. This is mutually exclusive with using the +// closed_captions_type property, and is equivalent to setting +// closed_captions_type to CLOSED_CAPTIONS_HTTP_POST. +@property (nonatomic, retain) NSNumber *enableClosedCaptions; // boolValue // This setting indicates whether YouTube should enable content encryption for // the broadcast. -@property (retain) NSNumber *enableContentEncryption; // boolValue +@property (nonatomic, retain) NSNumber *enableContentEncryption; // boolValue // This setting determines whether viewers can access DVR controls while // watching the video. DVR controls enable the viewer to control the video @@ -64,17 +68,20 @@ // Important: You must set the value to true and also set the enableArchive // property's value to true if you want to make playback available immediately // after the broadcast ends. -@property (retain) NSNumber *enableDvr; // boolValue +@property (nonatomic, retain) NSNumber *enableDvr; // boolValue // This setting indicates whether the broadcast video can be played in an // embedded player. If you choose to archive the video (using the enableArchive // property), this setting will also apply to the archived video. -@property (retain) NSNumber *enableEmbed; // boolValue +@property (nonatomic, retain) NSNumber *enableEmbed; // boolValue + +// Indicates whether this broadcast has low latency enabled. +@property (nonatomic, retain) NSNumber *enableLowLatency; // boolValue // The monitorStream object contains information about the monitor stream, which // the broadcaster can use to review the event content before the broadcast // stream is shown publicly. -@property (retain) GTLYouTubeMonitorStreamInfo *monitorStream; +@property (nonatomic, retain) GTLYouTubeMonitorStreamInfo *monitorStream; // Automatically start recording after the event goes live. The default value // for this property is true. @@ -83,13 +90,13 @@ // you set this property's value to true but do not also set the enableDvr // property to true, there may be a delay of around one day before the archived // video will be available for playback. -@property (retain) NSNumber *recordFromStart; // boolValue +@property (nonatomic, retain) NSNumber *recordFromStart; // boolValue // This setting indicates whether the broadcast should automatically begin with // an in-stream slate when you update the broadcast's status to live. After // updating the status, you then need to send a liveCuepoints.insert request // that sets the cuepoint's eventState to end to remove the in-stream slate and // make your broadcast stream visible to viewers. -@property (retain) NSNumber *startWithSlate; // boolValue +@property (nonatomic, retain) NSNumber *startWithSlate; // boolValue @end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastContentDetails.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastContentDetails.m similarity index 83% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastContentDetails.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastContentDetails.m index f2f06cfe0..965707a6f 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastContentDetails.m +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastContentDetails.m @@ -1,4 +1,4 @@ -/* Copyright (c) 2013 Google Inc. +/* Copyright (c) 2016 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ // Documentation: // https://developers.google.com/youtube/v3 // Classes: -// GTLYouTubeLiveBroadcastContentDetails (0 custom class methods, 8 custom properties) +// GTLYouTubeLiveBroadcastContentDetails (0 custom class methods, 10 custom properties) #import "GTLYouTubeLiveBroadcastContentDetails.h" @@ -38,6 +38,7 @@ // @implementation GTLYouTubeLiveBroadcastContentDetails -@dynamic boundStreamId, enableClosedCaptions, enableContentEncryption, - enableDvr, enableEmbed, monitorStream, recordFromStart, startWithSlate; +@dynamic boundStreamId, closedCaptionsType, enableClosedCaptions, + enableContentEncryption, enableDvr, enableEmbed, enableLowLatency, + monitorStream, recordFromStart, startWithSlate; @end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastListResponse.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastListResponse.h similarity index 79% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastListResponse.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastListResponse.h index 0e270358b..4cbd746eb 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastListResponse.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastListResponse.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -49,31 +49,31 @@ @interface GTLYouTubeLiveBroadcastListResponse : GTLCollectionObject // Etag of this resource. -@property (copy) NSString *ETag; +@property (nonatomic, copy) NSString *ETag; // Serialized EventId of the request which produced this response. -@property (copy) NSString *eventId; +@property (nonatomic, copy) NSString *eventId; // A list of broadcasts that match the request criteria. -@property (retain) NSArray *items; // of GTLYouTubeLiveBroadcast +@property (nonatomic, retain) NSArray *items; // of GTLYouTubeLiveBroadcast // Identifies what kind of resource this is. Value: the fixed string // "youtube#liveBroadcastListResponse". -@property (copy) NSString *kind; +@property (nonatomic, 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; +@property (nonatomic, copy) NSString *nextPageToken; -@property (retain) GTLYouTubePageInfo *pageInfo; +@property (nonatomic, 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; +@property (nonatomic, copy) NSString *prevPageToken; -@property (retain) GTLYouTubeTokenPagination *tokenPagination; +@property (nonatomic, retain) GTLYouTubeTokenPagination *tokenPagination; // The visitorId identifies the visitor. -@property (copy) NSString *visitorId; +@property (nonatomic, copy) NSString *visitorId; @end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastListResponse.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastListResponse.m similarity index 85% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastListResponse.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastListResponse.m index fc617dedd..05bde2c64 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastListResponse.m +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastListResponse.m @@ -1,4 +1,4 @@ -/* Copyright (c) 2013 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -44,16 +44,16 @@ @implementation GTLYouTubeLiveBroadcastListResponse tokenPagination, visitorId; + (NSDictionary *)propertyToJSONKeyMap { - NSDictionary *map = - [NSDictionary dictionaryWithObject:@"etag" - forKey:@"ETag"]; + NSDictionary *map = @{ + @"ETag" : @"etag" + }; return map; } + (NSDictionary *)arrayPropertyToClassMap { - NSDictionary *map = - [NSDictionary dictionaryWithObject:[GTLYouTubeLiveBroadcast class] - forKey:@"items"]; + NSDictionary *map = @{ + @"items" : [GTLYouTubeLiveBroadcast class] + }; return map; } diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastSnippet.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastSnippet.h similarity index 78% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastSnippet.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastSnippet.h index fa9d52781..f14110b5c 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastSnippet.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastSnippet.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ // Documentation: // https://developers.google.com/youtube/v3 // Classes: -// GTLYouTubeLiveBroadcastSnippet (0 custom class methods, 9 custom properties) +// GTLYouTubeLiveBroadcastSnippet (0 custom class methods, 11 custom properties) #if GTL_BUILT_AS_FRAMEWORK #import "GTL/GTLObject.h" @@ -46,43 +46,48 @@ // The date and time that the broadcast actually ended. This information is only // available once the broadcast's state is complete. The value is specified in // ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. -@property (retain) GTLDateTime *actualEndTime; +@property (nonatomic, retain) GTLDateTime *actualEndTime; // The date and time that the broadcast actually started. This information is // only available once the broadcast's state is live. The value is specified in // ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. -@property (retain) GTLDateTime *actualStartTime; +@property (nonatomic, retain) GTLDateTime *actualStartTime; // The ID that YouTube uses to uniquely identify the channel that is publishing // the broadcast. -@property (copy) NSString *channelId; +@property (nonatomic, copy) NSString *channelId; // The broadcast's description. As with the title, you can set this field by // modifying the broadcast resource or by setting the description field of the // corresponding video resource. // Remapped to 'descriptionProperty' to avoid NSObject's 'description'. -@property (copy) NSString *descriptionProperty; +@property (nonatomic, copy) NSString *descriptionProperty; + +@property (nonatomic, retain) NSNumber *isDefaultBroadcast; // boolValue + +// The id of the live chat for this broadcast. +@property (nonatomic, copy) NSString *liveChatId; // The date and time that the broadcast was added to YouTube's live broadcast // schedule. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. -@property (retain) GTLDateTime *publishedAt; +@property (nonatomic, retain) GTLDateTime *publishedAt; // The date and time that the broadcast is scheduled to end. The value is // specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. -@property (retain) GTLDateTime *scheduledEndTime; +@property (nonatomic, retain) GTLDateTime *scheduledEndTime; // The date and time that the broadcast is scheduled to start. The value is // specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. -@property (retain) GTLDateTime *scheduledStartTime; +@property (nonatomic, retain) GTLDateTime *scheduledStartTime; // A map of thumbnail images associated with the broadcast. For each nested // object in this object, the key is the name of the thumbnail image, and the // value is an object that contains other information about the thumbnail. -@property (retain) GTLYouTubeThumbnailDetails *thumbnails; +@property (nonatomic, retain) GTLYouTubeThumbnailDetails *thumbnails; // The broadcast's title. Note that the broadcast represents exactly one YouTube // video. You can set this field by modifying the broadcast resource or by // setting the title field of the corresponding video resource. -@property (copy) NSString *title; +@property (nonatomic, copy) NSString *title; @end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastSnippet.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastSnippet.m similarity index 79% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastSnippet.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastSnippet.m index dd558808f..0be2c869b 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastSnippet.m +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastSnippet.m @@ -1,4 +1,4 @@ -/* Copyright (c) 2013 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ // Documentation: // https://developers.google.com/youtube/v3 // Classes: -// GTLYouTubeLiveBroadcastSnippet (0 custom class methods, 9 custom properties) +// GTLYouTubeLiveBroadcastSnippet (0 custom class methods, 11 custom properties) #import "GTLYouTubeLiveBroadcastSnippet.h" @@ -39,12 +39,13 @@ @implementation GTLYouTubeLiveBroadcastSnippet @dynamic actualEndTime, actualStartTime, channelId, descriptionProperty, - publishedAt, scheduledEndTime, scheduledStartTime, thumbnails, title; + isDefaultBroadcast, liveChatId, publishedAt, scheduledEndTime, + scheduledStartTime, thumbnails, title; + (NSDictionary *)propertyToJSONKeyMap { - NSDictionary *map = - [NSDictionary dictionaryWithObject:@"description" - forKey:@"descriptionProperty"]; + NSDictionary *map = @{ + @"descriptionProperty" : @"description" + }; return map; } diff --git a/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastStatistics.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastStatistics.h new file mode 100644 index 000000000..85bca0ba0 --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastStatistics.h @@ -0,0 +1,63 @@ +/* Copyright (c) 2015 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeLiveBroadcastStatistics.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube Data API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube/v3 +// Classes: +// GTLYouTubeLiveBroadcastStatistics (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeLiveBroadcastStatistics +// + +// Statistics about the live broadcast. These represent a snapshot of the values +// at the time of the request. Statistics are only returned for live broadcasts. + +@interface GTLYouTubeLiveBroadcastStatistics : GTLObject + +// The number of viewers currently watching the broadcast. The property and its +// value will be present if the broadcast has current viewers and the broadcast +// owner has not hidden the viewcount for the video. Note that YouTube stops +// tracking the number of concurrent viewers for a broadcast when the broadcast +// ends. So, this property would not identify the number of viewers watching an +// archived video of a live broadcast that already ended. +@property (nonatomic, retain) NSNumber *concurrentViewers; // unsignedLongLongValue + +// The total number of live chat messages currently on the broadcast. The +// property and its value will be present if the broadcast is public, has the +// live chat feature enabled, and has at least one message. Note that this field +// will not be filled after the broadcast ends. So this property would not +// identify the number of chat messages for an archived video of a completed +// live broadcast. +@property (nonatomic, retain) NSNumber *totalChatCount; // unsignedLongLongValue + +@end diff --git a/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastStatistics.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastStatistics.m new file mode 100644 index 000000000..0295d958d --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastStatistics.m @@ -0,0 +1,40 @@ +/* Copyright (c) 2015 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeLiveBroadcastStatistics.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube Data API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube/v3 +// Classes: +// GTLYouTubeLiveBroadcastStatistics (0 custom class methods, 2 custom properties) + +#import "GTLYouTubeLiveBroadcastStatistics.h" + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeLiveBroadcastStatistics +// + +@implementation GTLYouTubeLiveBroadcastStatistics +@dynamic concurrentViewers, totalChatCount; +@end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastStatus.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastStatus.h similarity index 87% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastStatus.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastStatus.h index 5f298a6db..0a5d7b943 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastStatus.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastStatus.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2014 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -43,19 +43,19 @@ // The broadcast's status. The status can be updated using the API's // liveBroadcasts.transition method. -@property (copy) NSString *lifeCycleStatus; +@property (nonatomic, copy) NSString *lifeCycleStatus; // Priority of the live broadcast event (internal state). -@property (copy) NSString *liveBroadcastPriority; +@property (nonatomic, copy) NSString *liveBroadcastPriority; // The broadcast's privacy status. Note that the broadcast represents exactly // one YouTube video, so the privacy settings are identical to those supported // for videos. In addition, you can set this field by modifying the broadcast // resource or by setting the privacyStatus field of the corresponding video // resource. -@property (copy) NSString *privacyStatus; +@property (nonatomic, copy) NSString *privacyStatus; // The broadcast's recording status. -@property (copy) NSString *recordingStatus; +@property (nonatomic, copy) NSString *recordingStatus; @end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastStatus.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastStatus.m similarity index 97% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastStatus.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastStatus.m index 707e6c852..0eae7a17a 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastStatus.m +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastStatus.m @@ -1,4 +1,4 @@ -/* Copyright (c) 2014 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastTopic.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastTopic.h new file mode 100644 index 000000000..8172fa7fa --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastTopic.h @@ -0,0 +1,56 @@ +/* Copyright (c) 2015 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeLiveBroadcastTopic.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube Data API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube/v3 +// Classes: +// GTLYouTubeLiveBroadcastTopic (0 custom class methods, 3 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLYouTubeLiveBroadcastTopicSnippet; + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeLiveBroadcastTopic +// + +@interface GTLYouTubeLiveBroadcastTopic : GTLObject + +// Information about the topic matched. +@property (nonatomic, retain) GTLYouTubeLiveBroadcastTopicSnippet *snippet; + +// The type of the topic. +@property (nonatomic, copy) NSString *type; + +// If this flag is set it means that we have not been able to match the topic +// title and type provided to a known entity. +@property (nonatomic, retain) NSNumber *unmatched; // boolValue + +@end diff --git a/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastTopic.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastTopic.m new file mode 100644 index 000000000..b14ccfe57 --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastTopic.m @@ -0,0 +1,42 @@ +/* Copyright (c) 2015 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeLiveBroadcastTopic.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube Data API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube/v3 +// Classes: +// GTLYouTubeLiveBroadcastTopic (0 custom class methods, 3 custom properties) + +#import "GTLYouTubeLiveBroadcastTopic.h" + +#import "GTLYouTubeLiveBroadcastTopicSnippet.h" + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeLiveBroadcastTopic +// + +@implementation GTLYouTubeLiveBroadcastTopic +@dynamic snippet, type, unmatched; +@end diff --git a/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastTopicDetails.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastTopicDetails.h new file mode 100644 index 000000000..1b10d5744 --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastTopicDetails.h @@ -0,0 +1,46 @@ +/* Copyright (c) 2015 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeLiveBroadcastTopicDetails.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube Data API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube/v3 +// Classes: +// GTLYouTubeLiveBroadcastTopicDetails (0 custom class methods, 1 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLYouTubeLiveBroadcastTopic; + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeLiveBroadcastTopicDetails +// + +@interface GTLYouTubeLiveBroadcastTopicDetails : GTLObject +@property (nonatomic, retain) NSArray *topics; // of GTLYouTubeLiveBroadcastTopic +@end diff --git a/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastTopicDetails.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastTopicDetails.m new file mode 100644 index 000000000..0b7ddeab2 --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastTopicDetails.m @@ -0,0 +1,50 @@ +/* Copyright (c) 2015 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeLiveBroadcastTopicDetails.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube Data API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube/v3 +// Classes: +// GTLYouTubeLiveBroadcastTopicDetails (0 custom class methods, 1 custom properties) + +#import "GTLYouTubeLiveBroadcastTopicDetails.h" + +#import "GTLYouTubeLiveBroadcastTopic.h" + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeLiveBroadcastTopicDetails +// + +@implementation GTLYouTubeLiveBroadcastTopicDetails +@dynamic topics; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = @{ + @"topics" : [GTLYouTubeLiveBroadcastTopic class] + }; + return map; +} + +@end diff --git a/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastTopicSnippet.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastTopicSnippet.h new file mode 100644 index 000000000..06acfe981 --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastTopicSnippet.h @@ -0,0 +1,50 @@ +/* Copyright (c) 2015 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeLiveBroadcastTopicSnippet.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube Data API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube/v3 +// Classes: +// GTLYouTubeLiveBroadcastTopicSnippet (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeLiveBroadcastTopicSnippet +// + +@interface GTLYouTubeLiveBroadcastTopicSnippet : GTLObject + +// The name of the topic. +@property (nonatomic, copy) NSString *name; + +// The date at which the topic was released. Filled for types: videoGame +@property (nonatomic, copy) NSString *releaseDate; + +@end diff --git a/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastTopicSnippet.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastTopicSnippet.m new file mode 100644 index 000000000..89039ad0b --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveBroadcastTopicSnippet.m @@ -0,0 +1,40 @@ +/* Copyright (c) 2015 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeLiveBroadcastTopicSnippet.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube Data API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube/v3 +// Classes: +// GTLYouTubeLiveBroadcastTopicSnippet (0 custom class methods, 2 custom properties) + +#import "GTLYouTubeLiveBroadcastTopicSnippet.h" + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeLiveBroadcastTopicSnippet +// + +@implementation GTLYouTubeLiveBroadcastTopicSnippet +@dynamic name, releaseDate; +@end diff --git a/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatBan.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatBan.h new file mode 100644 index 000000000..ff9262ab8 --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatBan.h @@ -0,0 +1,62 @@ +/* Copyright (c) 2016 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeLiveChatBan.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube Data API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube/v3 +// Classes: +// GTLYouTubeLiveChatBan (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLYouTubeLiveChatBanSnippet; + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeLiveChatBan +// + +// A liveChatBan resource represents a ban for a YouTube live chat. + +@interface GTLYouTubeLiveChatBan : GTLObject + +// Etag of this resource. +@property (nonatomic, copy) NSString *ETag; + +// The ID that YouTube assigns to uniquely identify the ban. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (nonatomic, copy) NSString *identifier; + +// Identifies what kind of resource this is. Value: the fixed string +// "youtube#liveChatBan". +@property (nonatomic, copy) NSString *kind; + +// The snippet object contains basic details about the ban. +@property (nonatomic, retain) GTLYouTubeLiveChatBanSnippet *snippet; + +@end diff --git a/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatBan.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatBan.m new file mode 100644 index 000000000..8664db331 --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatBan.m @@ -0,0 +1,55 @@ +/* Copyright (c) 2016 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeLiveChatBan.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube Data API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube/v3 +// Classes: +// GTLYouTubeLiveChatBan (0 custom class methods, 4 custom properties) + +#import "GTLYouTubeLiveChatBan.h" + +#import "GTLYouTubeLiveChatBanSnippet.h" + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeLiveChatBan +// + +@implementation GTLYouTubeLiveChatBan +@dynamic ETag, identifier, kind, snippet; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = @{ + @"ETag" : @"etag", + @"identifier" : @"id" + }; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"youtube#liveChatBan"]; +} + +@end diff --git a/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatBanSnippet.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatBanSnippet.h new file mode 100644 index 000000000..0b7cc4f9b --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatBanSnippet.h @@ -0,0 +1,57 @@ +/* Copyright (c) 2016 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeLiveChatBanSnippet.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube Data API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube/v3 +// Classes: +// GTLYouTubeLiveChatBanSnippet (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLYouTubeChannelProfileDetails; + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeLiveChatBanSnippet +// + +@interface GTLYouTubeLiveChatBanSnippet : GTLObject + +// The duration of a ban, only filled if the ban has type TEMPORARY. +@property (nonatomic, retain) NSNumber *banDurationSeconds; // unsignedLongLongValue + +@property (nonatomic, retain) GTLYouTubeChannelProfileDetails *bannedUserDetails; + +// The chat this ban is pertinent to. +@property (nonatomic, copy) NSString *liveChatId; + +// The type of ban. +@property (nonatomic, copy) NSString *type; + +@end diff --git a/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatBanSnippet.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatBanSnippet.m new file mode 100644 index 000000000..7a9216e73 --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatBanSnippet.m @@ -0,0 +1,42 @@ +/* Copyright (c) 2016 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeLiveChatBanSnippet.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube Data API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube/v3 +// Classes: +// GTLYouTubeLiveChatBanSnippet (0 custom class methods, 4 custom properties) + +#import "GTLYouTubeLiveChatBanSnippet.h" + +#import "GTLYouTubeChannelProfileDetails.h" + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeLiveChatBanSnippet +// + +@implementation GTLYouTubeLiveChatBanSnippet +@dynamic banDurationSeconds, bannedUserDetails, liveChatId, type; +@end diff --git a/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatFanFundingEventDetails.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatFanFundingEventDetails.h new file mode 100644 index 000000000..d6554ebe7 --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatFanFundingEventDetails.h @@ -0,0 +1,56 @@ +/* Copyright (c) 2016 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeLiveChatFanFundingEventDetails.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube Data API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube/v3 +// Classes: +// GTLYouTubeLiveChatFanFundingEventDetails (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeLiveChatFanFundingEventDetails +// + +@interface GTLYouTubeLiveChatFanFundingEventDetails : GTLObject + +// A rendered string that displays the fund amount and currency to the user. +@property (nonatomic, copy) NSString *amountDisplayString; + +// The amount of the fund. +@property (nonatomic, retain) NSNumber *amountMicros; // unsignedLongLongValue + +// The currency in which the fund was made. +@property (nonatomic, copy) NSString *currency; + +// The comment added by the user to this fan funding event. +@property (nonatomic, copy) NSString *userComment; + +@end diff --git a/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatFanFundingEventDetails.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatFanFundingEventDetails.m new file mode 100644 index 000000000..1e31e3b90 --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatFanFundingEventDetails.m @@ -0,0 +1,40 @@ +/* Copyright (c) 2016 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeLiveChatFanFundingEventDetails.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube Data API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube/v3 +// Classes: +// GTLYouTubeLiveChatFanFundingEventDetails (0 custom class methods, 4 custom properties) + +#import "GTLYouTubeLiveChatFanFundingEventDetails.h" + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeLiveChatFanFundingEventDetails +// + +@implementation GTLYouTubeLiveChatFanFundingEventDetails +@dynamic amountDisplayString, amountMicros, currency, userComment; +@end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelSection.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatMessage.h similarity index 57% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelSection.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatMessage.h index 8222b64f9..b2831ef50 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeChannelSection.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatMessage.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2014 Google Inc. +/* Copyright (c) 2016 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ */ // -// GTLYouTubeChannelSection.h +// GTLYouTubeLiveChatMessage.h // // ---------------------------------------------------------------------------- @@ -26,7 +26,7 @@ // Documentation: // https://developers.google.com/youtube/v3 // Classes: -// GTLYouTubeChannelSection (0 custom class methods, 5 custom properties) +// GTLYouTubeLiveChatMessage (0 custom class methods, 5 custom properties) #if GTL_BUILT_AS_FRAMEWORK #import "GTL/GTLObject.h" @@ -34,35 +34,34 @@ #import "GTLObject.h" #endif -@class GTLYouTubeChannelSectionContentDetails; -@class GTLYouTubeChannelSectionSnippet; +@class GTLYouTubeLiveChatMessageAuthorDetails; +@class GTLYouTubeLiveChatMessageSnippet; // ---------------------------------------------------------------------------- // -// GTLYouTubeChannelSection +// GTLYouTubeLiveChatMessage // -// TODO(lxz) follow up with adiamondstein@ to fullfill the doc before deploying +// A liveChatMessage resource represents a chat message in a YouTube Live Chat. -@interface GTLYouTubeChannelSection : GTLObject +@interface GTLYouTubeLiveChatMessage : GTLObject -// The contentDetails object contains details about the ChannelSection content, -// such as playlists and channels. -@property (retain) GTLYouTubeChannelSectionContentDetails *contentDetails; +// The authorDetails object contains basic details about the user that posted +// this message. +@property (nonatomic, retain) GTLYouTubeLiveChatMessageAuthorDetails *authorDetails; // Etag of this resource. -@property (copy) NSString *ETag; +@property (nonatomic, copy) NSString *ETag; -// The ID that YouTube uses to uniquely identify the ChannelSection. +// The ID that YouTube assigns to uniquely identify the message. // identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). -@property (copy) NSString *identifier; +@property (nonatomic, copy) NSString *identifier; // Identifies what kind of resource this is. Value: the fixed string -// "youtube#channelSection". -@property (copy) NSString *kind; +// "youtube#liveChatMessage". +@property (nonatomic, copy) NSString *kind; -// The snippet object contains basic details about the ChannelSection, such as -// its type, style and title. -@property (retain) GTLYouTubeChannelSectionSnippet *snippet; +// The snippet object contains basic details about the message. +@property (nonatomic, retain) GTLYouTubeLiveChatMessageSnippet *snippet; @end diff --git a/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatMessage.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatMessage.m new file mode 100644 index 000000000..38d3fc946 --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatMessage.m @@ -0,0 +1,56 @@ +/* Copyright (c) 2016 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeLiveChatMessage.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube Data API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube/v3 +// Classes: +// GTLYouTubeLiveChatMessage (0 custom class methods, 5 custom properties) + +#import "GTLYouTubeLiveChatMessage.h" + +#import "GTLYouTubeLiveChatMessageAuthorDetails.h" +#import "GTLYouTubeLiveChatMessageSnippet.h" + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeLiveChatMessage +// + +@implementation GTLYouTubeLiveChatMessage +@dynamic authorDetails, ETag, identifier, kind, snippet; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = @{ + @"ETag" : @"etag", + @"identifier" : @"id" + }; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"youtube#liveChatMessage"]; +} + +@end diff --git a/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatMessageAuthorDetails.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatMessageAuthorDetails.h new file mode 100644 index 000000000..4a1f2f1aa --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatMessageAuthorDetails.h @@ -0,0 +1,68 @@ +/* Copyright (c) 2016 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeLiveChatMessageAuthorDetails.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube Data API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube/v3 +// Classes: +// GTLYouTubeLiveChatMessageAuthorDetails (0 custom class methods, 8 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeLiveChatMessageAuthorDetails +// + +@interface GTLYouTubeLiveChatMessageAuthorDetails : GTLObject + +// The YouTube channel ID. +@property (nonatomic, copy) NSString *channelId; + +// The channel's URL. +@property (nonatomic, copy) NSString *channelUrl; + +// The channel's display name. +@property (nonatomic, copy) NSString *displayName; + +// Whether the author is a moderator of the live chat. +@property (nonatomic, retain) NSNumber *isChatModerator; // boolValue + +// Whether the author is the owner of the live chat. +@property (nonatomic, retain) NSNumber *isChatOwner; // boolValue + +// Whether the author is a sponsor of the live chat. +@property (nonatomic, retain) NSNumber *isChatSponsor; // boolValue + +// Whether the author's identity has been verified by YouTube. +@property (nonatomic, retain) NSNumber *isVerified; // boolValue + +// The channels's avatar URL. +@property (nonatomic, copy) NSString *profileImageUrl; + +@end diff --git a/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatMessageAuthorDetails.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatMessageAuthorDetails.m new file mode 100644 index 000000000..91c778636 --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatMessageAuthorDetails.m @@ -0,0 +1,41 @@ +/* Copyright (c) 2016 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeLiveChatMessageAuthorDetails.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube Data API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube/v3 +// Classes: +// GTLYouTubeLiveChatMessageAuthorDetails (0 custom class methods, 8 custom properties) + +#import "GTLYouTubeLiveChatMessageAuthorDetails.h" + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeLiveChatMessageAuthorDetails +// + +@implementation GTLYouTubeLiveChatMessageAuthorDetails +@dynamic channelId, channelUrl, displayName, isChatModerator, isChatOwner, + isChatSponsor, isVerified, profileImageUrl; +@end diff --git a/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatMessageListResponse.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatMessageListResponse.h new file mode 100644 index 000000000..6df79d343 --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatMessageListResponse.h @@ -0,0 +1,82 @@ +/* Copyright (c) 2016 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeLiveChatMessageListResponse.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube Data API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube/v3 +// Classes: +// GTLYouTubeLiveChatMessageListResponse (0 custom class methods, 10 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLYouTubeLiveChatMessage; +@class GTLYouTubePageInfo; +@class GTLYouTubeTokenPagination; + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeLiveChatMessageListResponse +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLYouTubeLiveChatMessageListResponse : GTLCollectionObject + +// Etag of this resource. +@property (nonatomic, copy) NSString *ETag; + +// Serialized EventId of the request which produced this response. +@property (nonatomic, copy) NSString *eventId; + +// A list of live chat messages. +@property (nonatomic, retain) NSArray *items; // of GTLYouTubeLiveChatMessage + +// Identifies what kind of resource this is. Value: the fixed string +// "youtube#liveChatMessageListResponse". +@property (nonatomic, 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 (nonatomic, copy) NSString *nextPageToken; + +// The date and time when the underlying stream went offline. The value is +// specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. +@property (nonatomic, retain) GTLDateTime *offlineAt; + +@property (nonatomic, retain) GTLYouTubePageInfo *pageInfo; + +// The amount of time the client should wait before polling again. +@property (nonatomic, retain) NSNumber *pollingIntervalMillis; // unsignedIntValue + +@property (nonatomic, retain) GTLYouTubeTokenPagination *tokenPagination; + +// The visitorId identifies the visitor. +@property (nonatomic, copy) NSString *visitorId; + +@end diff --git a/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatMessageListResponse.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatMessageListResponse.m new file mode 100644 index 000000000..89da8a744 --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatMessageListResponse.m @@ -0,0 +1,64 @@ +/* Copyright (c) 2016 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeLiveChatMessageListResponse.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube Data API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube/v3 +// Classes: +// GTLYouTubeLiveChatMessageListResponse (0 custom class methods, 10 custom properties) + +#import "GTLYouTubeLiveChatMessageListResponse.h" + +#import "GTLYouTubeLiveChatMessage.h" +#import "GTLYouTubePageInfo.h" +#import "GTLYouTubeTokenPagination.h" + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeLiveChatMessageListResponse +// + +@implementation GTLYouTubeLiveChatMessageListResponse +@dynamic ETag, eventId, items, kind, nextPageToken, offlineAt, pageInfo, + pollingIntervalMillis, tokenPagination, visitorId; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = @{ + @"ETag" : @"etag" + }; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = @{ + @"items" : [GTLYouTubeLiveChatMessage class] + }; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"youtube#liveChatMessageListResponse"]; +} + +@end diff --git a/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatMessageSnippet.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatMessageSnippet.h new file mode 100644 index 000000000..62560b80e --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatMessageSnippet.h @@ -0,0 +1,79 @@ +/* Copyright (c) 2016 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeLiveChatMessageSnippet.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube Data API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube/v3 +// Classes: +// GTLYouTubeLiveChatMessageSnippet (0 custom class methods, 8 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLYouTubeLiveChatFanFundingEventDetails; +@class GTLYouTubeLiveChatTextMessageDetails; + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeLiveChatMessageSnippet +// + +@interface GTLYouTubeLiveChatMessageSnippet : GTLObject + +// The ID of the user that authored this message, this field is not always +// filled. textMessageEvent - the user that wrote the message fanFundingEvent - +// the user that funded the broadcast newSponsorEvent - the user that just +// became a sponsor +@property (nonatomic, copy) NSString *authorChannelId; + +// Contains a string that can be displayed to the user. If this field is not +// present the message is silent, at the moment only messages of type TOMBSTONE +// and CHAT_ENDED_EVENT are silent. +@property (nonatomic, copy) NSString *displayMessage; + +// Details about the funding event, this is only set if the type is +// 'fanFundingEvent'. +@property (nonatomic, retain) GTLYouTubeLiveChatFanFundingEventDetails *fanFundingEventDetails; + +// Whether the message has display content that should be displayed to users. +@property (nonatomic, retain) NSNumber *hasDisplayContent; // boolValue + +@property (nonatomic, copy) NSString *liveChatId; + +// The date and time when the message was orignally published. The value is +// specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. +@property (nonatomic, retain) GTLDateTime *publishedAt; + +// Details about the text message, this is only set if the type is +// 'textMessageEvent'. +@property (nonatomic, retain) GTLYouTubeLiveChatTextMessageDetails *textMessageDetails; + +// The type of message, this will always be present, it determines the contents +// of the message as well as which fields will be present. +@property (nonatomic, copy) NSString *type; + +@end diff --git a/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatMessageSnippet.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatMessageSnippet.m new file mode 100644 index 000000000..466d15b1b --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatMessageSnippet.m @@ -0,0 +1,44 @@ +/* Copyright (c) 2016 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeLiveChatMessageSnippet.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube Data API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube/v3 +// Classes: +// GTLYouTubeLiveChatMessageSnippet (0 custom class methods, 8 custom properties) + +#import "GTLYouTubeLiveChatMessageSnippet.h" + +#import "GTLYouTubeLiveChatFanFundingEventDetails.h" +#import "GTLYouTubeLiveChatTextMessageDetails.h" + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeLiveChatMessageSnippet +// + +@implementation GTLYouTubeLiveChatMessageSnippet +@dynamic authorChannelId, displayMessage, fanFundingEventDetails, + hasDisplayContent, liveChatId, publishedAt, textMessageDetails, type; +@end diff --git a/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatModerator.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatModerator.h new file mode 100644 index 000000000..eb5c52bc0 --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatModerator.h @@ -0,0 +1,64 @@ +/* Copyright (c) 2016 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeLiveChatModerator.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube Data API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube/v3 +// Classes: +// GTLYouTubeLiveChatModerator (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLYouTubeLiveChatModeratorSnippet; + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeLiveChatModerator +// + +// A liveChatModerator resource represents a moderator for a YouTube live chat. +// A chat moderator has the ability to ban/unban users from a chat, remove +// message, etc. + +@interface GTLYouTubeLiveChatModerator : GTLObject + +// Etag of this resource. +@property (nonatomic, copy) NSString *ETag; + +// The ID that YouTube assigns to uniquely identify the moderator. +// identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). +@property (nonatomic, copy) NSString *identifier; + +// Identifies what kind of resource this is. Value: the fixed string +// "youtube#liveChatModerator". +@property (nonatomic, copy) NSString *kind; + +// The snippet object contains basic details about the moderator. +@property (nonatomic, retain) GTLYouTubeLiveChatModeratorSnippet *snippet; + +@end diff --git a/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatModerator.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatModerator.m new file mode 100644 index 000000000..2970fc87a --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatModerator.m @@ -0,0 +1,55 @@ +/* Copyright (c) 2016 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeLiveChatModerator.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube Data API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube/v3 +// Classes: +// GTLYouTubeLiveChatModerator (0 custom class methods, 4 custom properties) + +#import "GTLYouTubeLiveChatModerator.h" + +#import "GTLYouTubeLiveChatModeratorSnippet.h" + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeLiveChatModerator +// + +@implementation GTLYouTubeLiveChatModerator +@dynamic ETag, identifier, kind, snippet; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = @{ + @"ETag" : @"etag", + @"identifier" : @"id" + }; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"youtube#liveChatModerator"]; +} + +@end diff --git a/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatModeratorListResponse.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatModeratorListResponse.h new file mode 100644 index 000000000..d99d030f1 --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatModeratorListResponse.h @@ -0,0 +1,79 @@ +/* Copyright (c) 2016 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeLiveChatModeratorListResponse.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube Data API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube/v3 +// Classes: +// GTLYouTubeLiveChatModeratorListResponse (0 custom class methods, 9 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLYouTubeLiveChatModerator; +@class GTLYouTubePageInfo; +@class GTLYouTubeTokenPagination; + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeLiveChatModeratorListResponse +// + +// This class supports NSFastEnumeration over its "items" property. It also +// supports -itemAtIndex: to retrieve individual objects from "items". + +@interface GTLYouTubeLiveChatModeratorListResponse : GTLCollectionObject + +// Etag of this resource. +@property (nonatomic, copy) NSString *ETag; + +// Serialized EventId of the request which produced this response. +@property (nonatomic, copy) NSString *eventId; + +// A list of moderators that match the request criteria. +@property (nonatomic, retain) NSArray *items; // of GTLYouTubeLiveChatModerator + +// Identifies what kind of resource this is. Value: the fixed string +// "youtube#liveChatModeratorListResponse". +@property (nonatomic, 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 (nonatomic, copy) NSString *nextPageToken; + +@property (nonatomic, 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 (nonatomic, copy) NSString *prevPageToken; + +@property (nonatomic, retain) GTLYouTubeTokenPagination *tokenPagination; + +// The visitorId identifies the visitor. +@property (nonatomic, copy) NSString *visitorId; + +@end diff --git a/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatModeratorListResponse.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatModeratorListResponse.m new file mode 100644 index 000000000..d3e2de4a3 --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatModeratorListResponse.m @@ -0,0 +1,64 @@ +/* Copyright (c) 2016 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeLiveChatModeratorListResponse.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube Data API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube/v3 +// Classes: +// GTLYouTubeLiveChatModeratorListResponse (0 custom class methods, 9 custom properties) + +#import "GTLYouTubeLiveChatModeratorListResponse.h" + +#import "GTLYouTubeLiveChatModerator.h" +#import "GTLYouTubePageInfo.h" +#import "GTLYouTubeTokenPagination.h" + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeLiveChatModeratorListResponse +// + +@implementation GTLYouTubeLiveChatModeratorListResponse +@dynamic ETag, eventId, items, kind, nextPageToken, pageInfo, prevPageToken, + tokenPagination, visitorId; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = @{ + @"ETag" : @"etag" + }; + return map; +} + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = @{ + @"items" : [GTLYouTubeLiveChatModerator class] + }; + return map; +} + ++ (void)load { + [self registerObjectClassForKind:@"youtube#liveChatModeratorListResponse"]; +} + +@end diff --git a/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatModeratorSnippet.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatModeratorSnippet.h new file mode 100644 index 000000000..89e715543 --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatModeratorSnippet.h @@ -0,0 +1,52 @@ +/* Copyright (c) 2016 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeLiveChatModeratorSnippet.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube Data API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube/v3 +// Classes: +// GTLYouTubeLiveChatModeratorSnippet (0 custom class methods, 2 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLYouTubeChannelProfileDetails; + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeLiveChatModeratorSnippet +// + +@interface GTLYouTubeLiveChatModeratorSnippet : GTLObject + +// The ID of the live chat this moderator can act on. +@property (nonatomic, copy) NSString *liveChatId; + +// Details about the moderator. +@property (nonatomic, retain) GTLYouTubeChannelProfileDetails *moderatorDetails; + +@end diff --git a/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatModeratorSnippet.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatModeratorSnippet.m new file mode 100644 index 000000000..012a9afd1 --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatModeratorSnippet.m @@ -0,0 +1,42 @@ +/* Copyright (c) 2016 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeLiveChatModeratorSnippet.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube Data API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube/v3 +// Classes: +// GTLYouTubeLiveChatModeratorSnippet (0 custom class methods, 2 custom properties) + +#import "GTLYouTubeLiveChatModeratorSnippet.h" + +#import "GTLYouTubeChannelProfileDetails.h" + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeLiveChatModeratorSnippet +// + +@implementation GTLYouTubeLiveChatModeratorSnippet +@dynamic liveChatId, moderatorDetails; +@end diff --git a/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatTextMessageDetails.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatTextMessageDetails.h new file mode 100644 index 000000000..4e092a281 --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatTextMessageDetails.h @@ -0,0 +1,47 @@ +/* Copyright (c) 2016 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeLiveChatTextMessageDetails.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube Data API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube/v3 +// Classes: +// GTLYouTubeLiveChatTextMessageDetails (0 custom class methods, 1 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeLiveChatTextMessageDetails +// + +@interface GTLYouTubeLiveChatTextMessageDetails : GTLObject + +// The user's message. +@property (nonatomic, copy) NSString *messageText; + +@end diff --git a/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatTextMessageDetails.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatTextMessageDetails.m new file mode 100644 index 000000000..7ac8e9a62 --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveChatTextMessageDetails.m @@ -0,0 +1,40 @@ +/* Copyright (c) 2016 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeLiveChatTextMessageDetails.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube Data API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube/v3 +// Classes: +// GTLYouTubeLiveChatTextMessageDetails (0 custom class methods, 1 custom properties) + +#import "GTLYouTubeLiveChatTextMessageDetails.h" + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeLiveChatTextMessageDetails +// + +@implementation GTLYouTubeLiveChatTextMessageDetails +@dynamic messageText; +@end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeLiveStream.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveStream.h similarity index 83% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeLiveStream.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveStream.h index 19c3726fa..3db10985b 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeLiveStream.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveStream.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -51,28 +51,28 @@ // The cdn object defines the live stream's content delivery network (CDN) // settings. These settings provide details about the manner in which you stream // your content to YouTube. -@property (retain) GTLYouTubeCdnSettings *cdn; +@property (nonatomic, retain) GTLYouTubeCdnSettings *cdn; // The content_details object contains information about the stream, including // the closed captions ingestion URL. -@property (retain) GTLYouTubeLiveStreamContentDetails *contentDetails; +@property (nonatomic, retain) GTLYouTubeLiveStreamContentDetails *contentDetails; // Etag of this resource. -@property (copy) NSString *ETag; +@property (nonatomic, copy) NSString *ETag; // The ID that YouTube assigns to uniquely identify the stream. // identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). -@property (copy) NSString *identifier; +@property (nonatomic, copy) NSString *identifier; // Identifies what kind of resource this is. Value: the fixed string // "youtube#liveStream". -@property (copy) NSString *kind; +@property (nonatomic, copy) NSString *kind; // The snippet object contains basic details about the stream, including its // channel, title, and description. -@property (retain) GTLYouTubeLiveStreamSnippet *snippet; +@property (nonatomic, retain) GTLYouTubeLiveStreamSnippet *snippet; // The status object contains information about live stream's status. -@property (retain) GTLYouTubeLiveStreamStatus *status; +@property (nonatomic, retain) GTLYouTubeLiveStreamStatus *status; @end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeLiveStream.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveStream.m similarity index 90% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeLiveStream.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveStream.m index f1aa40a16..ba7b08591 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeLiveStream.m +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveStream.m @@ -1,4 +1,4 @@ -/* Copyright (c) 2013 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -44,11 +44,10 @@ @implementation GTLYouTubeLiveStream @dynamic cdn, contentDetails, ETag, identifier, kind, snippet, status; + (NSDictionary *)propertyToJSONKeyMap { - NSDictionary *map = - [NSDictionary dictionaryWithObjectsAndKeys: - @"etag", @"ETag", - @"id", @"identifier", - nil]; + NSDictionary *map = @{ + @"ETag" : @"etag", + @"identifier" : @"id" + }; return map; } diff --git a/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveStreamConfigurationIssue.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveStreamConfigurationIssue.h new file mode 100644 index 000000000..8bc6fd8a0 --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveStreamConfigurationIssue.h @@ -0,0 +1,57 @@ +/* Copyright (c) 2015 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeLiveStreamConfigurationIssue.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube Data API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube/v3 +// Classes: +// GTLYouTubeLiveStreamConfigurationIssue (0 custom class methods, 4 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeLiveStreamConfigurationIssue +// + +@interface GTLYouTubeLiveStreamConfigurationIssue : GTLObject + +// The long-form description of the issue and how to resolve it. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (nonatomic, copy) NSString *descriptionProperty; + +// The short-form reason for this issue. +@property (nonatomic, copy) NSString *reason; + +// How severe this issue is to the stream. +@property (nonatomic, copy) NSString *severity; + +// The kind of error happening. +@property (nonatomic, copy) NSString *type; + +@end diff --git a/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveStreamConfigurationIssue.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveStreamConfigurationIssue.m new file mode 100644 index 000000000..3fd908626 --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveStreamConfigurationIssue.m @@ -0,0 +1,48 @@ +/* Copyright (c) 2015 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeLiveStreamConfigurationIssue.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube Data API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube/v3 +// Classes: +// GTLYouTubeLiveStreamConfigurationIssue (0 custom class methods, 4 custom properties) + +#import "GTLYouTubeLiveStreamConfigurationIssue.h" + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeLiveStreamConfigurationIssue +// + +@implementation GTLYouTubeLiveStreamConfigurationIssue +@dynamic descriptionProperty, reason, severity, type; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = @{ + @"descriptionProperty" : @"description" + }; + return map; +} + +@end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeLiveStreamContentDetails.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveStreamContentDetails.h similarity index 93% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeLiveStreamContentDetails.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveStreamContentDetails.h index 58509467b..72f6a0c8b 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeLiveStreamContentDetails.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveStreamContentDetails.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2014 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -44,7 +44,7 @@ @interface GTLYouTubeLiveStreamContentDetails : GTLObject // The ingestion URL where the closed captions of this stream are sent. -@property (copy) NSString *closedCaptionsIngestionUrl; +@property (nonatomic, copy) NSString *closedCaptionsIngestionUrl; // Indicates whether the stream is reusable, which means that it can be bound to // multiple broadcasts. It is common for broadcasters to reuse the same stream @@ -59,6 +59,6 @@ // the method and set the mine parameter to true. The only way to use that // method to retrieve the resource for a non-reusable stream is to use the id // parameter to identify the stream. -@property (retain) NSNumber *isReusable; // boolValue +@property (nonatomic, retain) NSNumber *isReusable; // boolValue @end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeLiveStreamContentDetails.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveStreamContentDetails.m similarity index 100% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeLiveStreamContentDetails.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveStreamContentDetails.m diff --git a/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveStreamHealthStatus.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveStreamHealthStatus.h new file mode 100644 index 000000000..32f79b418 --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveStreamHealthStatus.h @@ -0,0 +1,55 @@ +/* Copyright (c) 2015 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeLiveStreamHealthStatus.h +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube Data API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube/v3 +// Classes: +// GTLYouTubeLiveStreamHealthStatus (0 custom class methods, 3 custom properties) + +#if GTL_BUILT_AS_FRAMEWORK + #import "GTL/GTLObject.h" +#else + #import "GTLObject.h" +#endif + +@class GTLYouTubeLiveStreamConfigurationIssue; + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeLiveStreamHealthStatus +// + +@interface GTLYouTubeLiveStreamHealthStatus : GTLObject + +// The configurations issues on this stream +@property (nonatomic, retain) NSArray *configurationIssues; // of GTLYouTubeLiveStreamConfigurationIssue + +// The last time this status was updated (in seconds) +@property (nonatomic, retain) NSNumber *lastUpdateTimeSeconds; // unsignedLongLongValue + +// The status code of this stream +@property (nonatomic, copy) NSString *status; + +@end diff --git a/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveStreamHealthStatus.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveStreamHealthStatus.m new file mode 100644 index 000000000..615982f4f --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveStreamHealthStatus.m @@ -0,0 +1,50 @@ +/* Copyright (c) 2015 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubeLiveStreamHealthStatus.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube Data API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube/v3 +// Classes: +// GTLYouTubeLiveStreamHealthStatus (0 custom class methods, 3 custom properties) + +#import "GTLYouTubeLiveStreamHealthStatus.h" + +#import "GTLYouTubeLiveStreamConfigurationIssue.h" + +// ---------------------------------------------------------------------------- +// +// GTLYouTubeLiveStreamHealthStatus +// + +@implementation GTLYouTubeLiveStreamHealthStatus +@dynamic configurationIssues, lastUpdateTimeSeconds, status; + ++ (NSDictionary *)arrayPropertyToClassMap { + NSDictionary *map = @{ + @"configurationIssues" : [GTLYouTubeLiveStreamConfigurationIssue class] + }; + return map; +} + +@end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeLiveStreamListResponse.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveStreamListResponse.h similarity index 79% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeLiveStreamListResponse.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveStreamListResponse.h index b1daeb11d..a05cfe14f 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeLiveStreamListResponse.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveStreamListResponse.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -49,31 +49,31 @@ @interface GTLYouTubeLiveStreamListResponse : GTLCollectionObject // Etag of this resource. -@property (copy) NSString *ETag; +@property (nonatomic, copy) NSString *ETag; // Serialized EventId of the request which produced this response. -@property (copy) NSString *eventId; +@property (nonatomic, copy) NSString *eventId; // A list of live streams that match the request criteria. -@property (retain) NSArray *items; // of GTLYouTubeLiveStream +@property (nonatomic, retain) NSArray *items; // of GTLYouTubeLiveStream // Identifies what kind of resource this is. Value: the fixed string // "youtube#liveStreamListResponse". -@property (copy) NSString *kind; +@property (nonatomic, 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; +@property (nonatomic, copy) NSString *nextPageToken; -@property (retain) GTLYouTubePageInfo *pageInfo; +@property (nonatomic, 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; +@property (nonatomic, copy) NSString *prevPageToken; -@property (retain) GTLYouTubeTokenPagination *tokenPagination; +@property (nonatomic, retain) GTLYouTubeTokenPagination *tokenPagination; // The visitorId identifies the visitor. -@property (copy) NSString *visitorId; +@property (nonatomic, copy) NSString *visitorId; @end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeLiveStreamListResponse.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveStreamListResponse.m similarity index 85% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeLiveStreamListResponse.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveStreamListResponse.m index 609eddab3..dbea0a194 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeLiveStreamListResponse.m +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveStreamListResponse.m @@ -1,4 +1,4 @@ -/* Copyright (c) 2013 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -44,16 +44,16 @@ @implementation GTLYouTubeLiveStreamListResponse tokenPagination, visitorId; + (NSDictionary *)propertyToJSONKeyMap { - NSDictionary *map = - [NSDictionary dictionaryWithObject:@"etag" - forKey:@"ETag"]; + NSDictionary *map = @{ + @"ETag" : @"etag" + }; return map; } + (NSDictionary *)arrayPropertyToClassMap { - NSDictionary *map = - [NSDictionary dictionaryWithObject:[GTLYouTubeLiveStream class] - forKey:@"items"]; + NSDictionary *map = @{ + @"items" : [GTLYouTubeLiveStream class] + }; return map; } diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeLiveStreamSnippet.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveStreamSnippet.h similarity index 81% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeLiveStreamSnippet.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveStreamSnippet.h index 18f09acb1..aae05cb6d 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeLiveStreamSnippet.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveStreamSnippet.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ // Documentation: // https://developers.google.com/youtube/v3 // Classes: -// GTLYouTubeLiveStreamSnippet (0 custom class methods, 4 custom properties) +// GTLYouTubeLiveStreamSnippet (0 custom class methods, 5 custom properties) #if GTL_BUILT_AS_FRAMEWORK #import "GTL/GTLObject.h" @@ -43,17 +43,19 @@ // The ID that YouTube uses to uniquely identify the channel that is // transmitting the stream. -@property (copy) NSString *channelId; +@property (nonatomic, copy) NSString *channelId; // The stream's description. The value cannot be longer than 10000 characters. // Remapped to 'descriptionProperty' to avoid NSObject's 'description'. -@property (copy) NSString *descriptionProperty; +@property (nonatomic, copy) NSString *descriptionProperty; + +@property (nonatomic, retain) NSNumber *isDefaultStream; // boolValue // The date and time that the stream was created. The value is specified in ISO // 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. -@property (retain) GTLDateTime *publishedAt; +@property (nonatomic, retain) GTLDateTime *publishedAt; // The stream's title. The value must be between 1 and 128 characters long. -@property (copy) NSString *title; +@property (nonatomic, copy) NSString *title; @end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeLiveStreamSnippet.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveStreamSnippet.m similarity index 80% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeLiveStreamSnippet.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveStreamSnippet.m index 007464aa5..9a6cd6bcc 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeLiveStreamSnippet.m +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveStreamSnippet.m @@ -1,4 +1,4 @@ -/* Copyright (c) 2013 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ // Documentation: // https://developers.google.com/youtube/v3 // Classes: -// GTLYouTubeLiveStreamSnippet (0 custom class methods, 4 custom properties) +// GTLYouTubeLiveStreamSnippet (0 custom class methods, 5 custom properties) #import "GTLYouTubeLiveStreamSnippet.h" @@ -36,12 +36,12 @@ // @implementation GTLYouTubeLiveStreamSnippet -@dynamic channelId, descriptionProperty, publishedAt, title; +@dynamic channelId, descriptionProperty, isDefaultStream, publishedAt, title; + (NSDictionary *)propertyToJSONKeyMap { - NSDictionary *map = - [NSDictionary dictionaryWithObject:@"description" - forKey:@"descriptionProperty"]; + NSDictionary *map = @{ + @"descriptionProperty" : @"description" + }; return map; } diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeLiveStreamStatus.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveStreamStatus.h similarity index 80% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeLiveStreamStatus.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveStreamStatus.h index 7b5f793c7..457be2c82 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeLiveStreamStatus.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveStreamStatus.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ // Documentation: // https://developers.google.com/youtube/v3 // Classes: -// GTLYouTubeLiveStreamStatus (0 custom class methods, 1 custom properties) +// GTLYouTubeLiveStreamStatus (0 custom class methods, 2 custom properties) #if GTL_BUILT_AS_FRAMEWORK #import "GTL/GTLObject.h" @@ -34,6 +34,8 @@ #import "GTLObject.h" #endif +@class GTLYouTubeLiveStreamHealthStatus; + // ---------------------------------------------------------------------------- // // GTLYouTubeLiveStreamStatus @@ -42,5 +44,9 @@ // Brief description of the live stream status. @interface GTLYouTubeLiveStreamStatus : GTLObject -@property (copy) NSString *streamStatus; + +// The health status of the stream. +@property (nonatomic, retain) GTLYouTubeLiveStreamHealthStatus *healthStatus; + +@property (nonatomic, copy) NSString *streamStatus; @end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeLiveStreamStatus.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveStreamStatus.m similarity index 86% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeLiveStreamStatus.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveStreamStatus.m index ce8e1c84a..69746723e 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeLiveStreamStatus.m +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLiveStreamStatus.m @@ -1,4 +1,4 @@ -/* Copyright (c) 2013 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,15 +26,17 @@ // Documentation: // https://developers.google.com/youtube/v3 // Classes: -// GTLYouTubeLiveStreamStatus (0 custom class methods, 1 custom properties) +// GTLYouTubeLiveStreamStatus (0 custom class methods, 2 custom properties) #import "GTLYouTubeLiveStreamStatus.h" +#import "GTLYouTubeLiveStreamHealthStatus.h" + // ---------------------------------------------------------------------------- // // GTLYouTubeLiveStreamStatus // @implementation GTLYouTubeLiveStreamStatus -@dynamic streamStatus; +@dynamic healthStatus, streamStatus; @end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeLocalizedProperty.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLocalizedProperty.h similarity index 85% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeLocalizedProperty.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLocalizedProperty.h index b49504f4a..19b21c831 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeLocalizedProperty.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLocalizedProperty.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2014 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -45,10 +45,10 @@ @interface GTLYouTubeLocalizedProperty : GTLObject // Remapped to 'defaultProperty' to avoid language reserved word 'default'. -@property (copy) NSString *defaultProperty; +@property (nonatomic, copy) NSString *defaultProperty; // The language of the default property. -@property (retain) GTLYouTubeLanguageTag *defaultLanguage; +@property (nonatomic, retain) GTLYouTubeLanguageTag *defaultLanguage; -@property (retain) NSArray *localized; // of GTLYouTubeLocalizedString +@property (nonatomic, retain) NSArray *localized; // of GTLYouTubeLocalizedString @end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeLocalizedProperty.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLocalizedProperty.m similarity index 82% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeLocalizedProperty.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLocalizedProperty.m index be2fbd6b9..1511e56be 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeLocalizedProperty.m +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLocalizedProperty.m @@ -1,4 +1,4 @@ -/* Copyright (c) 2014 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -42,16 +42,16 @@ @implementation GTLYouTubeLocalizedProperty @dynamic defaultProperty, defaultLanguage, localized; + (NSDictionary *)propertyToJSONKeyMap { - NSDictionary *map = - [NSDictionary dictionaryWithObject:@"default" - forKey:@"defaultProperty"]; + NSDictionary *map = @{ + @"defaultProperty" : @"default" + }; return map; } + (NSDictionary *)arrayPropertyToClassMap { - NSDictionary *map = - [NSDictionary dictionaryWithObject:[GTLYouTubeLocalizedString class] - forKey:@"localized"]; + NSDictionary *map = @{ + @"localized" : [GTLYouTubeLocalizedString class] + }; return map; } diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeLocalizedString.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLocalizedString.h similarity index 90% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeLocalizedString.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLocalizedString.h index 44453550d..fb6201edb 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeLocalizedString.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLocalizedString.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2014 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -40,6 +40,6 @@ // @interface GTLYouTubeLocalizedString : GTLObject -@property (copy) NSString *language; -@property (copy) NSString *value; +@property (nonatomic, copy) NSString *language; +@property (nonatomic, copy) NSString *value; @end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeLocalizedString.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLocalizedString.m similarity index 100% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeLocalizedString.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeLocalizedString.m diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeMonitorStreamInfo.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeMonitorStreamInfo.h similarity index 89% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeMonitorStreamInfo.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeMonitorStreamInfo.h index b3f8a9437..08e1a8cde 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeMonitorStreamInfo.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeMonitorStreamInfo.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -45,10 +45,10 @@ // If you have set the enableMonitorStream property to true, then this property // determines the length of the live broadcast delay. -@property (retain) NSNumber *broadcastStreamDelayMs; // unsignedIntValue +@property (nonatomic, retain) NSNumber *broadcastStreamDelayMs; // unsignedIntValue // HTML code that embeds a player that plays the monitor stream. -@property (copy) NSString *embedHtml; +@property (nonatomic, copy) NSString *embedHtml; // This value determines whether the monitor stream is enabled for the // broadcast. If the monitor stream is enabled, then YouTube will broadcast the @@ -59,6 +59,6 @@ // for your event. // Note: This property cannot be updated once the broadcast is in the testing or // live state. -@property (retain) NSNumber *enableMonitorStream; // boolValue +@property (nonatomic, retain) NSNumber *enableMonitorStream; // boolValue @end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeMonitorStreamInfo.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeMonitorStreamInfo.m similarity index 100% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeMonitorStreamInfo.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubeMonitorStreamInfo.m diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubePageInfo.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubePageInfo.h similarity index 89% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubePageInfo.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubePageInfo.h index 967237d77..f2ff7d053 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubePageInfo.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubePageInfo.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2012 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -45,9 +45,9 @@ @interface GTLYouTubePageInfo : GTLObject // The number of results included in the API response. -@property (retain) NSNumber *resultsPerPage; // intValue +@property (nonatomic, retain) NSNumber *resultsPerPage; // intValue // The total number of results in the result set. -@property (retain) NSNumber *totalResults; // intValue +@property (nonatomic, retain) NSNumber *totalResults; // intValue @end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubePageInfo.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubePageInfo.m similarity index 100% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubePageInfo.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubePageInfo.m diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubePlaylist.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubePlaylist.h similarity index 70% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubePlaylist.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubePlaylist.h index be428c4f4..74a1568d4 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubePlaylist.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubePlaylist.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,7 +26,8 @@ // Documentation: // https://developers.google.com/youtube/v3 // Classes: -// GTLYouTubePlaylist (0 custom class methods, 7 custom properties) +// GTLYouTubePlaylist (0 custom class methods, 8 custom properties) +// GTLYouTubePlaylistLocalizations (0 custom class methods, 0 custom properties) #if GTL_BUILT_AS_FRAMEWORK #import "GTL/GTLObject.h" @@ -35,6 +36,8 @@ #endif @class GTLYouTubePlaylistContentDetails; +@class GTLYouTubePlaylistLocalization; +@class GTLYouTubePlaylistLocalizations; @class GTLYouTubePlaylistPlayer; @class GTLYouTubePlaylistSnippet; @class GTLYouTubePlaylistStatus; @@ -66,28 +69,44 @@ @interface GTLYouTubePlaylist : GTLObject // The contentDetails object contains information like video count. -@property (retain) GTLYouTubePlaylistContentDetails *contentDetails; +@property (nonatomic, retain) GTLYouTubePlaylistContentDetails *contentDetails; // Etag of this resource. -@property (copy) NSString *ETag; +@property (nonatomic, 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; +@property (nonatomic, copy) NSString *identifier; // Identifies what kind of resource this is. Value: the fixed string // "youtube#playlist". -@property (copy) NSString *kind; +@property (nonatomic, copy) NSString *kind; + +// Localizations for different languages +@property (nonatomic, retain) GTLYouTubePlaylistLocalizations *localizations; // The player object contains information that you would use to play the // playlist in an embedded player. -@property (retain) GTLYouTubePlaylistPlayer *player; +@property (nonatomic, retain) GTLYouTubePlaylistPlayer *player; // The snippet object contains basic details about the playlist, such as its // title and description. -@property (retain) GTLYouTubePlaylistSnippet *snippet; +@property (nonatomic, retain) GTLYouTubePlaylistSnippet *snippet; // The status object contains status information for the playlist. -@property (retain) GTLYouTubePlaylistStatus *status; +@property (nonatomic, retain) GTLYouTubePlaylistStatus *status; + +@end + + +// ---------------------------------------------------------------------------- +// +// GTLYouTubePlaylistLocalizations +// +@interface GTLYouTubePlaylistLocalizations : GTLObject +// This object is documented as having more properties that are +// GTLYouTubePlaylistLocalization. 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/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubePlaylist.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubePlaylist.m similarity index 67% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubePlaylist.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubePlaylist.m index 393d57e5e..9cd6684e9 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubePlaylist.m +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubePlaylist.m @@ -1,4 +1,4 @@ -/* Copyright (c) 2012 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,11 +26,13 @@ // Documentation: // https://developers.google.com/youtube/v3 // Classes: -// GTLYouTubePlaylist (0 custom class methods, 7 custom properties) +// GTLYouTubePlaylist (0 custom class methods, 8 custom properties) +// GTLYouTubePlaylistLocalizations (0 custom class methods, 0 custom properties) #import "GTLYouTubePlaylist.h" #import "GTLYouTubePlaylistContentDetails.h" +#import "GTLYouTubePlaylistLocalization.h" #import "GTLYouTubePlaylistPlayer.h" #import "GTLYouTubePlaylistSnippet.h" #import "GTLYouTubePlaylistStatus.h" @@ -41,14 +43,14 @@ // @implementation GTLYouTubePlaylist -@dynamic contentDetails, ETag, identifier, kind, player, snippet, status; +@dynamic contentDetails, ETag, identifier, kind, localizations, player, snippet, + status; + (NSDictionary *)propertyToJSONKeyMap { - NSDictionary *map = - [NSDictionary dictionaryWithObjectsAndKeys: - @"etag", @"ETag", - @"id", @"identifier", - nil]; + NSDictionary *map = @{ + @"ETag" : @"etag", + @"identifier" : @"id" + }; return map; } @@ -57,3 +59,17 @@ + (void)load { } @end + + +// ---------------------------------------------------------------------------- +// +// GTLYouTubePlaylistLocalizations +// + +@implementation GTLYouTubePlaylistLocalizations + ++ (Class)classForAdditionalProperties { + return [GTLYouTubePlaylistLocalization class]; +} + +@end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubePlaylistContentDetails.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubePlaylistContentDetails.h similarity index 92% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubePlaylistContentDetails.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubePlaylistContentDetails.h index d704913c1..a06c3ea94 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubePlaylistContentDetails.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubePlaylistContentDetails.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -42,6 +42,6 @@ @interface GTLYouTubePlaylistContentDetails : GTLObject // The number of videos in the playlist. -@property (retain) NSNumber *itemCount; // unsignedIntValue +@property (nonatomic, retain) NSNumber *itemCount; // unsignedIntValue @end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubePlaylistContentDetails.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubePlaylistContentDetails.m similarity index 100% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubePlaylistContentDetails.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubePlaylistContentDetails.m diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubePlaylistItem.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubePlaylistItem.h similarity index 88% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubePlaylistItem.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubePlaylistItem.h index 4000ff38f..c9dc3d3e5 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubePlaylistItem.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubePlaylistItem.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -67,25 +67,25 @@ // 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; +@property (nonatomic, retain) GTLYouTubePlaylistItemContentDetails *contentDetails; // Etag of this resource. -@property (copy) NSString *ETag; +@property (nonatomic, 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; +@property (nonatomic, copy) NSString *identifier; // Identifies what kind of resource this is. Value: the fixed string // "youtube#playlistItem". -@property (copy) NSString *kind; +@property (nonatomic, 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; +@property (nonatomic, retain) GTLYouTubePlaylistItemSnippet *snippet; // The status object contains information about the playlist item's privacy // status. -@property (retain) GTLYouTubePlaylistItemStatus *status; +@property (nonatomic, retain) GTLYouTubePlaylistItemStatus *status; @end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubePlaylistItem.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubePlaylistItem.m similarity index 90% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubePlaylistItem.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubePlaylistItem.m index 6058af5c3..6c8b44ede 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubePlaylistItem.m +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubePlaylistItem.m @@ -1,4 +1,4 @@ -/* Copyright (c) 2013 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -43,11 +43,10 @@ @implementation GTLYouTubePlaylistItem @dynamic contentDetails, ETag, identifier, kind, snippet, status; + (NSDictionary *)propertyToJSONKeyMap { - NSDictionary *map = - [NSDictionary dictionaryWithObjectsAndKeys: - @"etag", @"ETag", - @"id", @"identifier", - nil]; + NSDictionary *map = @{ + @"ETag" : @"etag", + @"identifier" : @"id" + }; return map; } diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubePlaylistItemContentDetails.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubePlaylistItemContentDetails.h similarity index 90% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubePlaylistItemContentDetails.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubePlaylistItemContentDetails.h index bfb31d9b0..7e5d67b38 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubePlaylistItemContentDetails.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubePlaylistItemContentDetails.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -45,19 +45,19 @@ // 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; +@property (nonatomic, copy) NSString *endAt; // A user-generated note for this item. -@property (copy) NSString *note; +@property (nonatomic, 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; +@property (nonatomic, 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; +@property (nonatomic, copy) NSString *videoId; @end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubePlaylistItemContentDetails.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubePlaylistItemContentDetails.m similarity index 100% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubePlaylistItemContentDetails.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubePlaylistItemContentDetails.m diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubePlaylistItemListResponse.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubePlaylistItemListResponse.h similarity index 79% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubePlaylistItemListResponse.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubePlaylistItemListResponse.h index a5a192e77..70c24a1e3 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubePlaylistItemListResponse.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubePlaylistItemListResponse.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -49,31 +49,31 @@ @interface GTLYouTubePlaylistItemListResponse : GTLCollectionObject // Etag of this resource. -@property (copy) NSString *ETag; +@property (nonatomic, copy) NSString *ETag; // Serialized EventId of the request which produced this response. -@property (copy) NSString *eventId; +@property (nonatomic, copy) NSString *eventId; // A list of playlist items that match the request criteria. -@property (retain) NSArray *items; // of GTLYouTubePlaylistItem +@property (nonatomic, retain) NSArray *items; // of GTLYouTubePlaylistItem // Identifies what kind of resource this is. Value: the fixed string // "youtube#playlistItemListResponse". -@property (copy) NSString *kind; +@property (nonatomic, 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; +@property (nonatomic, copy) NSString *nextPageToken; -@property (retain) GTLYouTubePageInfo *pageInfo; +@property (nonatomic, 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; +@property (nonatomic, copy) NSString *prevPageToken; -@property (retain) GTLYouTubeTokenPagination *tokenPagination; +@property (nonatomic, retain) GTLYouTubeTokenPagination *tokenPagination; // The visitorId identifies the visitor. -@property (copy) NSString *visitorId; +@property (nonatomic, copy) NSString *visitorId; @end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubePlaylistItemListResponse.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubePlaylistItemListResponse.m similarity index 85% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubePlaylistItemListResponse.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubePlaylistItemListResponse.m index 1d93650dc..e2c27e4ec 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubePlaylistItemListResponse.m +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubePlaylistItemListResponse.m @@ -1,4 +1,4 @@ -/* Copyright (c) 2013 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -44,16 +44,16 @@ @implementation GTLYouTubePlaylistItemListResponse tokenPagination, visitorId; + (NSDictionary *)propertyToJSONKeyMap { - NSDictionary *map = - [NSDictionary dictionaryWithObject:@"etag" - forKey:@"ETag"]; + NSDictionary *map = @{ + @"ETag" : @"etag" + }; return map; } + (NSDictionary *)arrayPropertyToClassMap { - NSDictionary *map = - [NSDictionary dictionaryWithObject:[GTLYouTubePlaylistItem class] - forKey:@"items"]; + NSDictionary *map = @{ + @"items" : [GTLYouTubePlaylistItem class] + }; return map; } diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubePlaylistItemSnippet.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubePlaylistItemSnippet.h similarity index 82% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubePlaylistItemSnippet.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubePlaylistItemSnippet.h index 259c70247..d0c1f7888 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubePlaylistItemSnippet.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubePlaylistItemSnippet.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -48,38 +48,38 @@ // The ID that YouTube uses to uniquely identify the user that added the item to // the playlist. -@property (copy) NSString *channelId; +@property (nonatomic, copy) NSString *channelId; // Channel title for the channel that the playlist item belongs to. -@property (copy) NSString *channelTitle; +@property (nonatomic, copy) NSString *channelTitle; // The item's description. // Remapped to 'descriptionProperty' to avoid NSObject's 'description'. -@property (copy) NSString *descriptionProperty; +@property (nonatomic, copy) NSString *descriptionProperty; // The ID that YouTube uses to uniquely identify the playlist that the playlist // item is in. -@property (copy) NSString *playlistId; +@property (nonatomic, 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 +@property (nonatomic, 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; +@property (nonatomic, 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; +@property (nonatomic, 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) GTLYouTubeThumbnailDetails *thumbnails; +@property (nonatomic, retain) GTLYouTubeThumbnailDetails *thumbnails; // The item's title. -@property (copy) NSString *title; +@property (nonatomic, copy) NSString *title; @end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubePlaylistItemSnippet.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubePlaylistItemSnippet.m similarity index 89% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubePlaylistItemSnippet.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubePlaylistItemSnippet.m index a1b014f53..471c29d54 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubePlaylistItemSnippet.m +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubePlaylistItemSnippet.m @@ -1,4 +1,4 @@ -/* Copyright (c) 2013 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -43,9 +43,9 @@ @implementation GTLYouTubePlaylistItemSnippet publishedAt, resourceId, thumbnails, title; + (NSDictionary *)propertyToJSONKeyMap { - NSDictionary *map = - [NSDictionary dictionaryWithObject:@"description" - forKey:@"descriptionProperty"]; + NSDictionary *map = @{ + @"descriptionProperty" : @"description" + }; return map; } diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubePlaylistItemStatus.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubePlaylistItemStatus.h similarity index 94% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubePlaylistItemStatus.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubePlaylistItemStatus.h index 0521d7795..f095ba1ea 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubePlaylistItemStatus.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubePlaylistItemStatus.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -44,6 +44,6 @@ @interface GTLYouTubePlaylistItemStatus : GTLObject // This resource's privacy status. -@property (copy) NSString *privacyStatus; +@property (nonatomic, copy) NSString *privacyStatus; @end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubePlaylistItemStatus.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubePlaylistItemStatus.m similarity index 100% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubePlaylistItemStatus.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubePlaylistItemStatus.m diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubePlaylistListResponse.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubePlaylistListResponse.h similarity index 79% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubePlaylistListResponse.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubePlaylistListResponse.h index 54736d8c1..3901a30c0 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubePlaylistListResponse.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubePlaylistListResponse.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -49,31 +49,31 @@ @interface GTLYouTubePlaylistListResponse : GTLCollectionObject // Etag of this resource. -@property (copy) NSString *ETag; +@property (nonatomic, copy) NSString *ETag; // Serialized EventId of the request which produced this response. -@property (copy) NSString *eventId; +@property (nonatomic, copy) NSString *eventId; // A list of playlists that match the request criteria. -@property (retain) NSArray *items; // of GTLYouTubePlaylist +@property (nonatomic, retain) NSArray *items; // of GTLYouTubePlaylist // Identifies what kind of resource this is. Value: the fixed string // "youtube#playlistListResponse". -@property (copy) NSString *kind; +@property (nonatomic, 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; +@property (nonatomic, copy) NSString *nextPageToken; -@property (retain) GTLYouTubePageInfo *pageInfo; +@property (nonatomic, 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; +@property (nonatomic, copy) NSString *prevPageToken; -@property (retain) GTLYouTubeTokenPagination *tokenPagination; +@property (nonatomic, retain) GTLYouTubeTokenPagination *tokenPagination; // The visitorId identifies the visitor. -@property (copy) NSString *visitorId; +@property (nonatomic, copy) NSString *visitorId; @end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubePlaylistListResponse.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubePlaylistListResponse.m similarity index 85% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubePlaylistListResponse.m rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubePlaylistListResponse.m index 7cadf3355..1c2887598 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubePlaylistListResponse.m +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubePlaylistListResponse.m @@ -1,4 +1,4 @@ -/* Copyright (c) 2013 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -44,16 +44,16 @@ @implementation GTLYouTubePlaylistListResponse tokenPagination, visitorId; + (NSDictionary *)propertyToJSONKeyMap { - NSDictionary *map = - [NSDictionary dictionaryWithObject:@"etag" - forKey:@"ETag"]; + NSDictionary *map = @{ + @"ETag" : @"etag" + }; return map; } + (NSDictionary *)arrayPropertyToClassMap { - NSDictionary *map = - [NSDictionary dictionaryWithObject:[GTLYouTubePlaylist class] - forKey:@"items"]; + NSDictionary *map = @{ + @"items" : [GTLYouTubePlaylist class] + }; return map; } diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeVideoConversionPings.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubePlaylistLocalization.h similarity index 67% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeVideoConversionPings.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubePlaylistLocalization.h index 0664fcc45..286295c6a 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubeVideoConversionPings.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubePlaylistLocalization.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ */ // -// GTLYouTubeVideoConversionPings.h +// GTLYouTubePlaylistLocalization.h // // ---------------------------------------------------------------------------- @@ -26,7 +26,7 @@ // Documentation: // https://developers.google.com/youtube/v3 // Classes: -// GTLYouTubeVideoConversionPings (0 custom class methods, 1 custom properties) +// GTLYouTubePlaylistLocalization (0 custom class methods, 2 custom properties) #if GTL_BUILT_AS_FRAMEWORK #import "GTL/GTLObject.h" @@ -34,18 +34,20 @@ #import "GTLObject.h" #endif -@class GTLYouTubeVideoConversionPing; - // ---------------------------------------------------------------------------- // -// GTLYouTubeVideoConversionPings +// GTLYouTubePlaylistLocalization // -@interface GTLYouTubeVideoConversionPings : GTLObject +// Playlist localization setting + +@interface GTLYouTubePlaylistLocalization : GTLObject + +// The localized strings for playlist's description. +// Remapped to 'descriptionProperty' to avoid NSObject's 'description'. +@property (nonatomic, copy) NSString *descriptionProperty; -// Pings that the app shall fire for a video (authenticated by biscotti cookie). -// Each ping has a context, in which the app must fire the ping, and a url -// identifying the ping. -@property (retain) NSArray *pings; // of GTLYouTubeVideoConversionPing +// The localized strings for playlist's title. +@property (nonatomic, copy) NSString *title; @end diff --git a/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubePlaylistLocalization.m b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubePlaylistLocalization.m new file mode 100644 index 000000000..71bbd6244 --- /dev/null +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubePlaylistLocalization.m @@ -0,0 +1,48 @@ +/* Copyright (c) 2015 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// GTLYouTubePlaylistLocalization.m +// + +// ---------------------------------------------------------------------------- +// NOTE: This file is generated from Google APIs Discovery Service. +// Service: +// YouTube Data API (youtube/v3) +// Description: +// Programmatic access to YouTube features. +// Documentation: +// https://developers.google.com/youtube/v3 +// Classes: +// GTLYouTubePlaylistLocalization (0 custom class methods, 2 custom properties) + +#import "GTLYouTubePlaylistLocalization.h" + +// ---------------------------------------------------------------------------- +// +// GTLYouTubePlaylistLocalization +// + +@implementation GTLYouTubePlaylistLocalization +@dynamic descriptionProperty, title; + ++ (NSDictionary *)propertyToJSONKeyMap { + NSDictionary *map = @{ + @"descriptionProperty" : @"description" + }; + return map; +} + +@end diff --git a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubePlaylistPlayer.h b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubePlaylistPlayer.h similarity index 94% rename from XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubePlaylistPlayer.h rename to XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubePlaylistPlayer.h index 5d2184026..7109face4 100644 --- a/XCDYouTubeKit Demo/Pods/Google-API-Client/Source/Services/YouTube/Generated/GTLYouTubePlaylistPlayer.h +++ b/XCDYouTubeKit Demo/Pods/GoogleAPIClient/Source/Services/YouTube/Generated/GTLYouTubePlaylistPlayer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013 Google Inc. +/* Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -42,6 +42,6 @@ @interface GTLYouTubePlaylistPlayer : GTLObject // An