PageRenderTime 26ms CodeModel.GetById 16ms app.highlight 6ms RepoModel.GetById 1ms app.codeStats 1ms

/core/externals/update-engine/externals/gdata-objectivec-client/Source/Clients/Photos/GDataServiceGooglePhotos.h

http://macfuse.googlecode.com/
C++ Header | 92 lines | 35 code | 15 blank | 42 comment | 1 complexity | 33a3d80cfc823d16cca84ec5e22a6366 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//  GDataServiceGooglePhotos.h
18//
19
20#if !GDATA_REQUIRE_SERVICE_INCLUDES || GDATA_INCLUDE_PHOTOS_SERVICE
21
22#import "GDataServiceGoogle.h"
23
24#undef _EXTERN
25#undef _INITIALIZE_AS
26#ifdef GDATASERVICEGOOGLEPHOTOS_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// feed of all Google Photos photos, useful for queries searching for photos
35_EXTERN NSString* const kGDataGooglePhotosAllFeed _INITIALIZE_AS(@"http://photos.googleapis.com/data/feed/api/all");
36
37// values for photoFeedURLForUserID:
38_EXTERN NSString* const kGDataGooglePhotosAccessAll       _INITIALIZE_AS(@"all");
39_EXTERN NSString* const kGDataGooglePhotosAccessPublic    _INITIALIZE_AS(@"public");
40_EXTERN NSString* const kGDataGooglePhotosAccessProtected _INITIALIZE_AS(@"protected"); // "sign-in required"
41_EXTERN NSString* const kGDataGooglePhotosAccessPrivate   _INITIALIZE_AS(@"private");
42_EXTERN NSString* const kGDataGooglePhotosAccessVisible   _INITIALIZE_AS(@"visible");
43
44_EXTERN NSString* const kGDataGooglePhotosKindAlbum   _INITIALIZE_AS(@"album");
45_EXTERN NSString* const kGDataGooglePhotosKindPhoto   _INITIALIZE_AS(@"photo");
46_EXTERN NSString* const kGDataGooglePhotosKindComment _INITIALIZE_AS(@"comment");
47_EXTERN NSString* const kGDataGooglePhotosKindTag     _INITIALIZE_AS(@"tag");
48_EXTERN NSString* const kGDataGooglePhotosKindUser    _INITIALIZE_AS(@"user");
49
50// inserting a photo into the feed for the default user and default album ID
51// will post the photo into the user's "Drop Box" album
52_EXTERN NSString* const kGDataGooglePhotosDropBoxUploadURL _INITIALIZE_AS(@"https://photos.googleapis.com/data/upload/resumable/media/create-session/feed/api/user/default/albumid/default");
53_EXTERN NSString* const kGDataGooglePhotosDropBoxAlbumID   _INITIALIZE_AS(@"default");
54
55@interface GDataServiceGooglePhotos : GDataServiceGoogle 
56
57+ (NSString *)serviceRootURLString;
58
59// utility for making a feed URL.  To set other query parameters, use the
60// methods in GDataQueryGooglePhotos instead of this
61+ (NSURL *)photoFeedURLForUserID:(NSString *)userID
62                         albumID:(NSString *)albumIDorNil
63                       albumName:(NSString *)albumNameOrNil
64                         photoID:(NSString *)photoIDorNil
65                            kind:(NSString *)feedKindOrNil
66                          access:(NSString *)accessOrNil;
67
68// utility for making a feed URL for a user's contacts feed
69+ (NSURL *)photoContactsFeedURLForUserID:(NSString *)userID;
70
71// clients may use these fetch methods of GDataServiceGoogle
72//
73//  - (GDataServiceTicket *)fetchFeedWithURL:(NSURL *)feedURL delegate:(id)delegate didFinishSelector:(SEL)finishedSelector;
74//  - (GDataServiceTicket *)fetchFeedWithQuery:(GDataQuery *)query delegate:(id)delegate didFinishSelector:(SEL)finishedSelector;
75//  - (GDataServiceTicket *)fetchEntryWithURL:(NSURL *)entryURL delegate:(id)delegate didFinishSelector:(SEL)finishedSelector;
76//  - (GDataServiceTicket *)fetchEntryByInsertingEntry:(GDataEntryBase *)entryToInsert forFeedURL:(NSURL *)feedURL delegate:(id)delegate didFinishSelector:(SEL)finishedSelector;
77//  - (GDataServiceTicket *)fetchEntryByUpdatingEntry:(GDataEntryBase *)entryToUpdate delegate:(id)delegate didFinishSelector:(SEL)finishedSelector;
78//  - (GDataServiceTicket *)deleteEntry:(GDataEntryBase *)entryToDelete delegate:(id)delegate didFinishSelector:(SEL)finishedSelector;
79//  - (GDataServiceTicket *)deleteResourceURL:(NSURL *)resourceEditURL ETag:(NSString *)etag delegate:(id)delegate didFinishSelector:(SEL)finishedSelector;
80//  - (GDataServiceTicket *)fetchFeedWithBatchFeed:(GDataFeedBase *)batchFeed forBatchFeedURL:(NSURL *)feedURL delegate:(id)delegate didFinishSelector:(SEL)finishedSelector;
81//
82// finishedSelector has a signature like this for feed fetches:
83// - (void)serviceTicket:(GDataServiceTicket *)ticket finishedWithFeed:(GDataFeedBase *)feed error:(NSError *)error;
84//
85// or this for entry fetches:
86// - (void)serviceTicket:(GDataServiceTicket *)ticket finishedWithEntry:(GDataEntryBase *)entry error:(NSError *)error;
87//
88// The class of the returned feed or entry is determined by the URL fetched.
89
90@end
91
92#endif // !GDATA_REQUIRE_SERVICE_INCLUDES || GDATA_INCLUDE_PHOTOS_SERVICE