PageRenderTime 37ms CodeModel.GetById 22ms app.highlight 12ms RepoModel.GetById 1ms app.codeStats 0ms

/core/externals/update-engine/externals/gdata-objectivec-client/Source/Clients/YouTube/GDataServiceGoogleYouTube.h

http://macfuse.googlecode.com/
C++ Header | 129 lines | 51 code | 25 blank | 53 comment | 1 complexity | b9d08a7979b4010684d84fb8c12cb6d7 MD5 | raw file
  1/* Copyright (c) 2008 Google Inc.
  2 *
  3 * Licensed under the Apache License, Version 2.0 (the "License");
  4 * you may not use this file except in compliance with the License.
  5 * You may obtain a copy of the License at
  6 *
  7 *     http://www.apache.org/licenses/LICENSE-2.0
  8 *
  9 * Unless required by applicable law or agreed to in writing, software
 10 * distributed under the License is distributed on an "AS IS" BASIS,
 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 12 * See the License for the specific language governing permissions and
 13 * limitations under the License.
 14 */
 15
 16//
 17//  GDataServiceGoogleYouTube.h
 18//
 19
 20#if !GDATA_REQUIRE_SERVICE_INCLUDES || GDATA_INCLUDE_YOUTUBE_SERVICE
 21
 22#import "GDataServiceGoogle.h"
 23
 24#undef _EXTERN
 25#undef _INITIALIZE_AS
 26#ifdef GDATASERVICEYOUTUBE_DEFINE_GLOBALS
 27#define _EXTERN 
 28#define _INITIALIZE_AS(x) =x
 29#else
 30#define _EXTERN GDATA_EXTERN
 31#define _INITIALIZE_AS(x)
 32#endif
 33
 34// standard feed IDs
 35_EXTERN NSString* const kGDataYouTubeFeedIDFull                      _INITIALIZE_AS(nil);
 36_EXTERN NSString* const kGDataYouTubeFeedIDTopRated                  _INITIALIZE_AS(@"top_rated");
 37_EXTERN NSString* const kGDataYouTubeFeedIDTopFavorites              _INITIALIZE_AS(@"top_favorites");
 38_EXTERN NSString* const kGDataYouTubeFeedIDMostViewed                _INITIALIZE_AS(@"most_viewed");
 39_EXTERN NSString* const kGDataYouTubeFeedIDMostPopular               _INITIALIZE_AS(@"most_popular");
 40_EXTERN NSString* const kGDataYouTubeFeedIDMostRecent                _INITIALIZE_AS(@"most_recent");
 41_EXTERN NSString* const kGDataYouTubeFeedIDMostDiscussed             _INITIALIZE_AS(@"most_discussed");
 42// _EXTERN NSString* const kGDataYouTubeFeedIDMostLinked                _INITIALIZE_AS(@"most_linked"); deprecated
 43_EXTERN NSString* const kGDataYouTubeFeedIDMostShared                _INITIALIZE_AS(@"most_shared");
 44_EXTERN NSString* const kGDataYouTubeFeedIDOnTheWeb                  _INITIALIZE_AS(@"on_the_web");
 45_EXTERN NSString* const kGDataYouTubeFeedIDMostResponded             _INITIALIZE_AS(@"most_responded");
 46_EXTERN NSString* const kGDataYouTubeFeedIDRecentlyFeatured          _INITIALIZE_AS(@"recently_featured");
 47// _EXTERN NSString* const kGDataYouTubeFeedIDWatchOnMobile             _INITIALIZE_AS(@"watch_on_mobile");  deprecated
 48
 49// user feed IDs
 50_EXTERN NSString* const kGDataYouTubeUserFeedIDProfile               _INITIALIZE_AS(nil);
 51_EXTERN NSString* const kGDataYouTubeUserFeedIDContacts              _INITIALIZE_AS(@"contacts");
 52_EXTERN NSString* const kGDataYouTubeUserFeedIDFavorites             _INITIALIZE_AS(@"favorites");
 53_EXTERN NSString* const kGDataYouTubeUserFeedIDInbox                 _INITIALIZE_AS(@"inbox");
 54_EXTERN NSString* const kGDataYouTubeUserFeedIDPlaylists             _INITIALIZE_AS(@"playlists");
 55_EXTERN NSString* const kGDataYouTubeUserFeedIDSubscriptions         _INITIALIZE_AS(@"subscriptions");
 56_EXTERN NSString* const kGDataYouTubeUserFeedIDUploads               _INITIALIZE_AS(@"uploads");
 57_EXTERN NSString* const kGDataYouTubeUserFeedIDNewSubscriptionVideos _INITIALIZE_AS(@"newsubscriptionvideos");
 58_EXTERN NSString* const kGDataYouTubeUserFeedIDFriendsActivity       _INITIALIZE_AS(@"friendsactivity");
 59_EXTERN NSString* const kGDataYouTubeUserFeedIDRecommendations       _INITIALIZE_AS(@"recommendations");
 60
 61
 62@class GDataQueryYouTube;
 63@class GDataEntryYouTubeVideo;
 64
 65
 66// Note that setUserCredentialsWithUsername:password: may require either the
 67// Google account e-mail address or the YouTube account name, depending on
 68// how the account was created.
 69
 70@interface GDataServiceGoogleYouTube : GDataServiceGoogle {
 71  NSString *developerKey_; // required for uploading 
 72}
 73
 74+ (NSString *)serviceRootURLString;
 75
 76// Utilities for making feed URLs.  To set query parameters, use the
 77// methods in GDataQueryYouTube.
 78//
 79// feedID may be nil (or equivalently kGDataYouTubeFeedIDFull)
 80//
 81// userID may be kGDataServiceDefaultUser
 82
 83+ (NSURL *)youTubeURLForFeedID:(NSString *)feedID;
 84
 85+ (NSURL *)youTubeURLForUserID:(NSString *)userID
 86                    userFeedID:(NSString *)feedID;
 87
 88+ (NSURL *)youTubeUploadURLForUserID:(NSString *)userID;
 89
 90+ (NSURL *)youTubeActivityFeedURLForUserID:(NSString *)userID;
 91
 92+ (NSURL *)youTubeURLForChannelsFeeds;
 93
 94+ (NSURL *)youTubeURLForChannelStandardFeedID:(NSString *)feedID;
 95
 96// Note:
 97//
 98// A developer key is required for uploading, and for updating or deleting
 99// videos.  Entries in feeds retrieved without a developer key will 
100// not have edit links. 
101- (NSString *)youTubeDeveloperKey;
102- (void)setYouTubeDeveloperKey:(NSString *)str;
103  
104// clients may use these fetch methods of GDataServiceGoogle
105//
106//  - (GDataServiceTicket *)fetchFeedWithURL:(NSURL *)feedURL delegate:(id)delegate didFinishSelector:(SEL)finishedSelector;
107//  - (GDataServiceTicket *)fetchFeedWithQuery:(GDataQuery *)query delegate:(id)delegate didFinishSelector:(SEL)finishedSelector;
108//  - (GDataServiceTicket *)fetchEntryWithURL:(NSURL *)entryURL delegate:(id)delegate didFinishSelector:(SEL)finishedSelector;
109//  - (GDataServiceTicket *)fetchEntryByInsertingEntry:(GDataEntryBase *)entryToInsert forFeedURL:(NSURL *)feedURL delegate:(id)delegate didFinishSelector:(SEL)finishedSelector;
110//  - (GDataServiceTicket *)fetchEntryByUpdatingEntry:(GDataEntryBase *)entryToUpdate delegate:(id)delegate didFinishSelector:(SEL)finishedSelector;
111//  - (GDataServiceTicket *)deleteEntry:(GDataEntryBase *)entryToDelete delegate:(id)delegate didFinishSelector:(SEL)finishedSelector;
112//  - (GDataServiceTicket *)deleteResourceURL:(NSURL *)resourceEditURL ETag:(NSString *)etag delegate:(id)delegate didFinishSelector:(SEL)finishedSelector;
113//  - (GDataServiceTicket *)fetchFeedWithBatchFeed:(GDataFeedBase *)batchFeed forBatchFeedURL:(NSURL *)feedURL delegate:(id)delegate didFinishSelector:(SEL)finishedSelector;
114//
115// finishedSelector has a signature like this for feed fetches:
116// - (void)serviceTicket:(GDataServiceTicket *)ticket finishedWithFeed:(GDataFeedBase *)feed error:(NSError *)error;
117//
118// or this for entry fetches:
119// - (void)serviceTicket:(GDataServiceTicket *)ticket finishedWithEntry:(GDataEntryBase *)entry error:(NSError *)error;
120//
121// The class of the returned feed or entry is determined by the URL fetched.
122
123+ (NSString *)serviceRootURLString;  
124
125+ (NSString *)serviceUploadRootURLString;
126
127@end
128
129#endif // !GDATA_REQUIRE_SERVICE_INCLUDES || GDATA_INCLUDE_YOUTUBE_SERVICE