PageRenderTime 78ms CodeModel.GetById 35ms app.highlight 36ms RepoModel.GetById 1ms app.codeStats 0ms

/core/externals/update-engine/externals/gdata-objectivec-client/Source/BaseClasses/GDataServiceBase.h

http://macfuse.googlecode.com/
C++ Header | 594 lines | 254 code | 123 blank | 217 comment | 0 complexity | 75d381ba650204bf66401b3079bb7ae6 MD5 | raw file
  1/* Copyright (c) 2007 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//  GDataServiceBase.h
 18//
 19
 20#import "GTMHTTPFetcherService.h"
 21
 22#import "GDataEntryBase.h"
 23#import "GDataFeedBase.h"
 24#import "GDataQuery.h"
 25
 26#undef _EXTERN
 27#undef _INITIALIZE_AS
 28#ifdef GDATASERVICEBASE_DEFINE_GLOBALS
 29#define _EXTERN
 30#define _INITIALIZE_AS(x) =x
 31#else
 32#define _EXTERN GDATA_EXTERN
 33#define _INITIALIZE_AS(x)
 34#endif
 35
 36_EXTERN Class const kGDataUseRegisteredClass _INITIALIZE_AS(nil);
 37
 38_EXTERN NSString* const kGDataServiceErrorDomain _INITIALIZE_AS(@"com.google.GDataServiceDomain");
 39
 40_EXTERN NSUInteger const kGDataStandardUploadChunkSize _INITIALIZE_AS(NSUIntegerMax);
 41
 42// we'll consistently store the server error string in the userInfo under
 43// this key
 44_EXTERN NSString* const kGDataServerErrorStringKey     _INITIALIZE_AS(@"error");
 45
 46
 47// when servers return us structured XML errors, the NSError will
 48// contain a GDataErrorGroup in the userInfo dictionary under the key
 49// kGDataStructuredErrorsKey
 50_EXTERN NSString* const kGDataStructuredErrorsKey _INITIALIZE_AS(@"serverErrors");
 51
 52// when specifying an ETag for updating or deleting a single entry, use
 53// kGDataETagWildcard to tell the server to replace the current value
 54// unconditionally.  Do not use this in entries in a batch feed.
 55_EXTERN NSString* const kGDataETagWildcard _INITIALIZE_AS(@"*");
 56
 57// notifications when parsing of a fetcher feed or entry begins or ends
 58_EXTERN NSString* const kGDataServiceTicketParsingStartedNotification _INITIALIZE_AS(@"kGDataServiceTicketParsingStartedNotification");
 59_EXTERN NSString* const kGDataServiceTicketParsingStoppedNotification _INITIALIZE_AS(@"kGDataServiceTicketParsingStoppedNotification");
 60
 61enum {
 62  kGDataCouldNotConstructObjectError = -100,
 63  kGDataWaitTimedOutError            = -101
 64};
 65
 66@class GDataServiceTicketBase;
 67
 68// block types used for fetch callbacks
 69//
 70// these typedefs are not used in the header file method declarations
 71// since it's more useful when code sense expansions show the argument
 72// types rather than the typedefs
 73
 74#if NS_BLOCKS_AVAILABLE
 75typedef void (^GDataServiceCompletionHandler)(GDataServiceTicketBase *ticket, id object, NSError *error);
 76typedef void (^GDataServiceFeedBaseCompletionHandler)(GDataServiceTicketBase *ticket, GDataFeedBase *feed, NSError *error);
 77typedef void (^GDataServiceEntryBaseCompletionHandler)(GDataServiceTicketBase *ticket, GDataEntryBase *entry, NSError *error);
 78
 79typedef void (^GDataServiceUploadProgressHandler)(GDataServiceTicketBase *ticket, unsigned long long numberOfBytesRead, unsigned long long dataLength);
 80#else
 81typedef void *GDataServiceCompletionHandler;
 82typedef void *GDataServiceFeedBaseCompletionHandler;
 83typedef void *GDataServiceEntryBaseCompletionHandler;
 84
 85typedef void *GDataServiceUploadProgressHandler;
 86#endif // NS_BLOCKS_AVAILABLE
 87
 88@class GDataServiceBase;
 89
 90//
 91// ticket base class
 92//
 93@interface GDataServiceTicketBase : NSObject {
 94 @protected
 95  GDataServiceBase *service_;
 96
 97  id userData_;
 98  NSMutableDictionary *ticketProperties_;
 99  NSDictionary *surrogates_;
100
101  GTMHTTPFetcher *currentFetcher_; // object or auth fetcher if mid-fetch
102  GTMHTTPFetcher *objectFetcher_;
103  SEL uploadProgressSelector_;
104  BOOL shouldFollowNextLinks_;
105  BOOL shouldFeedsIgnoreUnknowns_;
106  BOOL isRetryEnabled_;
107  SEL retrySEL_;
108  NSTimeInterval maxRetryInterval_;
109
110#if NS_BLOCKS_AVAILABLE
111  GDataServiceUploadProgressHandler uploadProgressBlock_;
112#elif !__LP64__
113  // placeholders: for 32-bit builds, keep the size of the object's ivar section
114  // the same with and without blocks
115  id uploadProgressPlaceholder_;
116#endif
117
118  GDataObject *postedObject_;
119  GDataObject *fetchedObject_;
120  GDataFeedBase *accumulatedFeed_;
121  NSError *fetchError_;
122  BOOL hasCalledCallback_;
123  NSUInteger nextLinksFollowedCounter_;
124
125  NSOperation *parseOperation_;
126
127  // OAuth support
128  id authorizer_;
129}
130
131+ (id)ticketForService:(GDataServiceBase *)service;
132
133- (id)initWithService:(GDataServiceBase *)service;
134
135// if cancelTicket is called, the fetch is stopped if it is in progress,
136// the callbacks will not be called, and the ticket will no longer be useful
137// (though the client must still release the ticket if it retained the ticket)
138- (void)cancelTicket;
139
140// chunked upload tickets may be paused
141- (void)pauseUpload;
142- (void)resumeUpload;
143- (BOOL)isUploadPaused;
144
145- (id)service;
146
147- (id)userData;
148- (void)setUserData:(id)obj;
149
150// Properties are supported for client convenience.
151//
152// Property keys beginning with _ are reserved by the library.
153- (void)setProperties:(NSDictionary *)dict;
154- (NSDictionary *)properties;
155
156- (void)setProperty:(id)obj forKey:(NSString *)key; // pass nil obj to remove property
157- (id)propertyForKey:(NSString *)key;
158
159- (NSDictionary *)surrogates;
160- (void)setSurrogates:(NSDictionary *)dict;
161
162- (GTMHTTPFetcher *)currentFetcher; // object or auth fetcher, if active
163- (void)setCurrentFetcher:(GTMHTTPFetcher *)fetcher;
164
165- (GTMHTTPFetcher *)objectFetcher;
166- (void)setObjectFetcher:(GTMHTTPFetcher *)fetcher;
167
168- (void)setUploadProgressSelector:(SEL)progressSelector;
169- (SEL)uploadProgressSelector;
170
171#if NS_BLOCKS_AVAILABLE
172- (void)setUploadProgressHandler:(void (^) (GDataServiceTicketBase *ticket, unsigned long long numberOfBytesRead, unsigned long long dataLength))handler;
173- (GDataServiceUploadProgressHandler)uploadProgressHandler;
174#endif
175
176- (BOOL)shouldFollowNextLinks;
177- (void)setShouldFollowNextLinks:(BOOL)flag;
178
179- (BOOL)shouldFeedsIgnoreUnknowns;
180- (void)setShouldFeedsIgnoreUnknowns:(BOOL)flag;
181
182- (BOOL)isRetryEnabled;
183- (void)setIsRetryEnabled:(BOOL)flag;
184
185- (SEL)retrySelector;
186- (void)setRetrySelector:(SEL)theSel;
187
188- (NSTimeInterval)maxRetryInterval;
189- (void)setMaxRetryInterval:(NSTimeInterval)secs;
190
191- (BOOL)hasCalledCallback;
192- (void)setHasCalledCallback:(BOOL)flag;
193
194- (void)setPostedObject:(GDataObject *)obj;
195- (id)postedObject;
196
197- (void)setFetchedObject:(GDataObject *)obj;
198- (GDataObject *)fetchedObject;
199
200- (void)setFetchError:(NSError *)error;
201- (NSError *)fetchError;
202
203- (void)setAccumulatedFeed:(GDataFeedBase *)feed;
204- (GDataFeedBase *)accumulatedFeed;
205
206// accumulateFeed is used by the service to append an incomplete feed
207// to the ticket when shouldFollowNextLinks is enabled
208- (void)accumulateFeed:(GDataFeedBase *)newFeed;
209
210- (void)setNextLinksFollowedCounter:(NSUInteger)val;
211- (NSUInteger)nextLinksFollowedCounter;
212
213- (NSInteger)statusCode;  // server status from object fetch
214
215- (NSOperation *)parseOperation;
216- (void)setParseOperation:(NSOperation *)op;
217
218// OAuth support
219- (id)authorizer;
220- (void)setAuthorizer:(id)obj;
221
222@end
223
224
225// category to provide opaque access to tickets stored in fetcher properties
226@interface GTMHTTPFetcher (GDataServiceTicketAdditions)
227- (id)GDataTicket;
228@end
229
230
231//
232// service base class
233//
234
235@interface GDataServiceBase : NSObject {
236  NSOperationQueue *operationQueue_;
237
238  NSString *serviceVersion_;
239  NSString *userAgent_;
240  GTMHTTPFetcherService *fetcherService_;
241
242  NSString *username_;
243  NSMutableData *password_;
244
245  NSString *serviceUserData_; // initial value for userData in future tickets
246  NSMutableDictionary *serviceProperties_; // initial values for properties in future tickets
247
248  NSDictionary *serviceSurrogates_; // initial value for surrogates in future tickets
249
250  BOOL shouldServiceFeedsIgnoreUnknowns_; // YES when feeds should ignore unknown XML
251
252  SEL serviceUploadProgressSelector_; // optional
253
254#if NS_BLOCKS_AVAILABLE
255  GDataServiceUploadProgressHandler serviceUploadProgressBlock_;
256#elif !__LP64__
257  // placeholders: for 32-bit builds, keep the size of the object's ivar section
258  // the same with and without blocks
259  id serviceUploadProgressPlaceholder_;
260#endif
261
262  NSUInteger uploadChunkSize_;      // zero when uploading via multi-part MIME http body
263
264  BOOL isServiceRetryEnabled_;      // user allows auto-retries
265  SEL serviceRetrySEL_;             // optional; set with setServiceRetrySelector
266  NSTimeInterval serviceMaxRetryInterval_; // default to 600. seconds
267
268  NSInteger cookieStorageMethod_;   // constant from GTMHTTPFetcher.h
269  BOOL serviceShouldFollowNextLinks_;
270}
271
272// Applications should call setUserAgent: with a string of the form
273// CompanyName-AppName-AppVersion (without whitespace or punctuation
274// other than dashes and periods)
275- (NSString *)userAgent;
276- (void)setUserAgent:(NSString *)userAgent;
277
278// Run loop modes are used for scheduling NSURLConnections on 10.5 and later.
279//
280// The default value, nil, schedules connections using the current run
281// loop mode.  To use the service during a modal dialog, specify
282// an array with NSRunLoopCommonModes.
283//
284// These methods just call through to the fetcher service object's
285// runLoopModes property.
286- (NSArray *)runLoopModes;
287- (void)setRunLoopModes:(NSArray *)modes;
288
289// On iOS 4 and later, the fetch may optionally continue in the background
290// until finished or stopped by OS expiration
291//
292// The default value is NO
293//
294// For Mac OS X, background fetches are always supported, and this property
295// is ignored
296- (BOOL)shouldFetchInBackground;
297- (void)setShouldFetchInBackground:(BOOL)flag;
298
299// The request user agent includes the library and OS version appended to the
300// base userAgent
301- (NSString *)requestUserAgent;
302
303// Users may call requestForURL:httpMethod to get a request with the proper
304// user-agent and authentication token
305//
306// For http method, pass nil (for default GET method), POST, PUT, or DELETE
307- (NSMutableURLRequest *)requestForURL:(NSURL *)url
308                                  ETag:(NSString *)etag
309                            httpMethod:(NSString *)httpMethod;
310
311- (NSMutableURLRequest *)requestForURL:(NSURL *)url
312                                  ETag:(NSString *)etag
313                            httpMethod:(NSString *)httpMethod
314                                ticket:(GDataServiceTicketBase *)ticket;
315
316// objectRequestForURL returns an NSMutableURLRequest for an XML GData object
317//
318//
319// the object is the object being sent to the server, or nil;
320// the http method may be nil for get, or POST, PUT, DELETE
321- (NSMutableURLRequest *)objectRequestForURL:(NSURL *)url
322                                      object:(GDataObject *)object
323                                        ETag:(NSString *)etag
324                                  httpMethod:(NSString *)httpMethod
325                                      ticket:(GDataServiceTicketBase *)ticket;
326
327//
328// Fetch methods
329//
330//  fetchPublicFeed/fetchPublicEntry/fetchPublicFeedWithQuery (GET)
331//  fetchPublicEntryByInsertingEntry (POST)
332//  fetchPublicEntryByUpdatingEntry (PUT)
333//  deleteEntry/deleteResourceURL (DELETE)
334//
335//   NOTE:
336// These base class methods are for unauthenticated fetches to public feeds.
337//
338// To make authenticated fetches to a user's account, use the methods in the
339// service's GDataServiceXxxx class, or in the GDataServiceGoogle class.
340//
341
342// finishedSelector has a signature like:
343//
344//   - (void)serviceTicket:(GDataServiceTicketBase *)ticket
345//      finishedWithObject:(GDataObject *)object          // a feed or an entry
346//                   error:(NSError *)error
347//
348// If an error occurred, the error parameter will be non-nil.  Otherwise,
349// the object parameter will point to a feed or entry, if any was returned by
350// the fetch.  (Delete fetches return no object, so the second parameter will
351// be nil.)
352
353- (GDataServiceTicketBase *)fetchPublicFeedWithURL:(NSURL *)feedURL
354                                         feedClass:(Class)feedClass
355                                          delegate:(id)delegate
356                                 didFinishSelector:(SEL)finishedSelector;
357
358- (GDataServiceTicketBase *)fetchPublicFeedWithQuery:(GDataQuery *)query
359                                           feedClass:(Class)feedClass
360                                            delegate:(id)delegate
361                                   didFinishSelector:(SEL)finishedSelector;
362
363- (GDataServiceTicketBase *)fetchPublicEntryWithURL:(NSURL *)entryURL
364                                         entryClass:(Class)entryClass
365                                           delegate:(id)delegate
366                                  didFinishSelector:(SEL)finishedSelector;
367
368- (GDataServiceTicketBase *)fetchPublicFeedWithBatchFeed:(GDataFeedBase *)batchFeed
369                                              forFeedURL:(NSURL *)feedURL
370                                                delegate:(id)delegate
371                                       didFinishSelector:(SEL)finishedSelector;
372
373#if NS_BLOCKS_AVAILABLE
374- (GDataServiceTicketBase *)fetchPublicFeedWithURL:(NSURL *)feedURL
375                                         feedClass:(Class)feedClass
376                                 completionHandler:(void (^)(GDataServiceTicketBase *ticket, GDataFeedBase *feed, NSError *error))handler;
377
378- (GDataServiceTicketBase *)fetchPublicFeedWithQuery:(GDataQuery *)query
379                                           feedClass:(Class)feedClass
380                                   completionHandler:(void (^)(GDataServiceTicketBase *ticket, GDataFeedBase *feed, NSError *error))handler;
381
382- (GDataServiceTicketBase *)fetchPublicEntryWithURL:(NSURL *)entryURL
383                                         entryClass:(Class)entryClass
384                                  completionHandler:(void (^)(GDataServiceTicketBase *ticket, GDataEntryBase *entry, NSError *error))handler;
385
386- (GDataServiceTicketBase *)fetchPublicFeedWithBatchFeed:(GDataFeedBase *)batchFeed
387                                              forFeedURL:(NSURL *)feedURL
388                                       completionHandler:(void (^)(GDataServiceTicketBase *ticket, GDataFeedBase *feed, NSError *error))handler;
389#endif
390
391// reset the response cache to avoid getting a Not Modified status
392// based on prior queries
393- (void)clearResponseDataCache;
394
395// Turn on data caching to receive a copy of previously-retrieved objects.
396// Otherwise, fetches may return status 304 (Not Modifier) rather than actual
397// data
398- (void)setShouldCacheResponseData:(BOOL)flag;
399- (BOOL)shouldCacheResponseData;
400
401// If dated data caching is on, this specifies the capacity of the cache.
402// Default is 15MB for Mac and 1 MB for iPhone.
403- (void)setResponseDataCacheCapacity:(NSUInteger)totalBytes;
404- (NSUInteger)responseDataCacheCapacity;
405
406// Fetcher service, if necessary for sharing cookies and dated data
407// cache with standalone http fetchers
408- (void)setFetcherService:(GTMHTTPFetcherService *)obj;
409- (GTMHTTPFetcherService *)fetcherService;
410
411// Default storage for cookies is in the service object's fetchHistory.
412//
413// Apps that want to share cookies between all standalone fetchers and the
414// service object may specify static application-wide cookie storage,
415// kGTMHTTPFetcherCookieStorageMethodStatic.
416- (void)setCookieStorageMethod:(NSInteger)method;
417- (NSInteger)cookieStorageMethod;
418
419// For feed requests, where the feed requires following "next" links to retrieve
420// all entries, the service can optionally do the additional fetches using the
421// original ticket, calling the client's finish selector only when a complete
422// feed has been obtained.  During the fetch, the feed accumulated so far is
423// available from the ticket.
424//
425// Note that the final feed may be a combination of multiple partial feeds,
426// so is not exactly a genuine feed. In particular, it will not have a valid
427// "self" link, as it does not represent an object with a distinct URL.
428//
429// Default value is NO.
430- (BOOL)serviceShouldFollowNextLinks;
431- (void)setServiceShouldFollowNextLinks:(BOOL)flag;
432
433// set a non-zero value to enable uploading via chunked fetches
434// (resumable uploads); typically this defaults to kGDataStandardUploadChunkSize
435// for service subclasses that support chunked uploads
436- (NSUInteger)serviceUploadChunkSize;
437- (void)setServiceUploadChunkSize:(NSUInteger)val;
438
439// service subclasses may specify their own default chunk size
440+ (NSUInteger)defaultServiceUploadChunkSize;
441
442// The service userData becomes the initial value for each future ticket's
443// userData.
444//
445// Since the network transactions may begin before the client has been
446// returned the ticket by the fetch call, it's preferable to call
447// setServiceUserData before the ticket is created rather than call the
448// ticket's setUserData:.  Either way, the ticket's userData:
449// method will return the value.
450- (void)setServiceUserData:(id)userData;
451- (id)serviceUserData;
452
453// Properties are supported for client convenience.
454//
455// Property keys beginning with _ are reserved by the library.
456//
457// The service properties dictionary is copied to become the initial property
458// dictionary for each ticket.
459- (void)setServiceProperties:(NSDictionary *)dict;
460- (NSDictionary *)serviceProperties;
461
462- (void)setServiceProperty:(id)obj forKey:(NSString *)key; // pass nil obj to remove property
463- (id)servicePropertyForKey:(NSString *)key;
464
465
466// Set the surrogates to be used for future tickets.  Surrogates are subclasses
467// to be used instead of standard classes when creating objects from the XML.
468// For example, this code will make the framework generate objects
469// using MyCalendarEntrySubclass instead of GDataEntryCalendar and
470// MyCalendarEventSubclass instead of GDataEntryCalendarEvent.
471//
472//  NSDictionary *surrogates = [NSDictionary dictionaryWithObjectsAndKeys:
473//    [MyCalendarEntrySubclass class], [GDataEntryCalendar class],
474//    [MyCalendarEventSubclass class], [GDataEntryCalendarEvent class],
475//    nil];
476//  [calendarService setServiceSurrogates:surrogates];
477//
478- (NSDictionary *)serviceSurrogates;
479- (void)setServiceSurrogates:(NSDictionary *)dict;
480
481// Set if feeds fetched (and the entries and elements contained in the feeds)
482// keep track of unparsed XML elements.  Setting this to YES offers a
483// performance and memory improvement, particularly for iPhone apps.  However,
484// the entries in those feeds cannot be updated (as the unparsed XML inside the
485// entries has been lost, so cannot be sent back to the server.)  An entry
486// can be re-fetched singly for updating.  Default is NO.  iPhone
487// apps retrieving large feeds should probably set this to YES.
488//
489- (BOOL)shouldServiceFeedsIgnoreUnknowns;
490- (void)setShouldServiceFeedsIgnoreUnknowns:(BOOL)flag;
491
492// The service uploadProgressSelector becomes the initial value for each future
493// ticket's uploadProgressSelector.
494//
495// The optional uploadProgressSelector will be called in the delegate as bytes
496// are uploaded to the server.  It should have a signature matching
497//
498// - (void)ticket:(GDataServiceTicketBase *)ticket
499//   hasDeliveredByteCount:(unsigned long long)numberOfBytesRead
500//        ofTotalByteCount:(unsigned long long)dataLength;
501- (void)setServiceUploadProgressSelector:(SEL)progressSelector;
502- (SEL)serviceUploadProgressSelector;
503
504#if NS_BLOCKS_AVAILABLE
505- (void)setServiceUploadProgressHandler:(void (^) (GDataServiceTicketBase *ticket, unsigned long long numberOfBytesRead, unsigned long long dataLength))handler;
506- (GDataServiceUploadProgressHandler)serviceUploadProgressHandler;
507#endif
508
509
510// retrying; see comments on retry support at the top of GTMHTTPFetcher.
511- (BOOL)isServiceRetryEnabled;
512- (void)setIsServiceRetryEnabled:(BOOL)flag;
513
514// retry selector is optional for retries.
515//
516// If present, it should have the signature:
517//   -(BOOL)ticket:(GDataServiceTicketBase *)ticket willRetry:(BOOL)suggestedWillRetry forError:(NSError *)error
518// and return YES to cause a retry.  Note that unlike the GTMHTTPFetcher retry
519// selector, this selector's first argument is a ticket, not a fetcher.
520// The current fetcher can be retrived with [ticket currentFetcher]
521
522- (SEL)serviceRetrySelector;
523- (void)setServiceRetrySelector:(SEL)theSel;
524
525- (NSTimeInterval)serviceMaxRetryInterval;
526- (void)setServiceMaxRetryInterval:(NSTimeInterval)secs;
527
528// access to the parsing operation queue, for clients wanting to manage the
529// queue explicitly
530- (id)operationQueue;
531- (void)setOperationQueue:(id)queue;
532
533// credentials
534//
535// Note: Specifying the username and password is a deprecated method
536//       of user authorization called ClientLogin, and does not work for all
537//       user accounts.
538//       Applications should instead enable users to sign in using OAuth 2,
539//       such as with the gtm-oauth2 view and window controllers.
540//
541//       http://code.google.com/p/gtm-oauth2/wiki/Introduction
542
543- (void)setUserCredentialsWithUsername:(NSString *)username
544                              password:(NSString *)password;
545- (NSString *)username;
546- (NSString *)password;
547
548// OAuth support
549- (id)authorizer;
550- (void)setAuthorizer:(id)obj;
551
552// Subclasses typically override defaultServiceVersion to specify the expected
553// version of the feed, but clients may also explicitly set the version
554// if they are using an instance of the base class directly.
555+ (NSString *)defaultServiceVersion;
556
557- (NSString *)serviceVersion;
558- (void)setServiceVersion:(NSString *)str;
559
560// Wait synchronously for fetch to complete (strongly discouraged)
561//
562// This just runs the current event loop until the fetch completes
563// or the timout limit is reached.  This may discard unexpected events
564// that occur while spinning, so it's really not appropriate for use
565// in serious applications.
566//
567// Returns true if an object was successfully fetched.  If the wait
568// timed out, returns false and the returned error is nil.
569//
570// The returned object or error, if any, will be already autoreleased
571//
572// This routine will likely be removed in some future releases of the library.
573- (BOOL)waitForTicket:(GDataServiceTicketBase *)ticket
574              timeout:(NSTimeInterval)timeoutInSeconds
575        fetchedObject:(GDataObject **)outObjectOrNil
576                error:(NSError **)outErrorOrNil;
577
578//
579// internal utilities
580//
581
582- (void)addAuthenticationToFetcher:(GTMHTTPFetcher *)fetcher;
583
584- (void)objectFetcher:(GTMHTTPFetcher *)fetcher finishedWithData:(NSData *)data error:(NSError *)error;
585
586+ (NSString *)defaultApplicationIdentifier;
587
588+ (NSString *)systemVersionString;
589
590- (BOOL)invokeRetrySelector:(SEL)retrySelector delegate:(id)delegate ticket:(GDataServiceTicketBase *)ticket willRetry:(BOOL)willRetry error:(NSError *)error;
591
592+ (void)invokeCallback:(SEL)callbackSel target:(id)target ticket:(id)ticket object:(id)object error:(id)error;
593
594@end