PageRenderTime 8ms CodeModel.GetById 2ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/core/externals/update-engine/externals/gdata-objectivec-client/Source/Clients/Contacts/GDataServiceGoogleContact.h

http://macfuse.googlecode.com/
C++ Header | 111 lines | 35 code | 21 blank | 55 comment | 1 complexity | 2841a68b8dbbbb7e5c3d8e7aa97983d1 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//  GDataServiceGoogleContact.h
 18//
 19
 20#if !GDATA_REQUIRE_SERVICE_INCLUDES || GDATA_INCLUDE_CONTACTS_SERVICE
 21
 22#import "GDataServiceGoogle.h"
 23
 24#undef _EXTERN
 25#undef _INITIALIZE_AS
 26#ifdef GDATASERVICEGOOGLECONTACT_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// GDataXML contacts for the authenticated user
 35//
 36// Full feeds include all extendedProperties, which must be preserved
 37// when updating entries; thin feeds include no extendedProperties.
 38//
 39// For a feed that includes only extendedProperties with a specific
 40// property name, use contactFeedURLForPropertyName:
 41// or contactGroupFeedURLForPropertyName:
 42//
 43// Google Contacts limits contacts to one extended property per property
 44// name.  Requesting a feed for a specific property name avoids the need
 45// to preserve other applications' property names when updating entries.
 46
 47// AllContacts includes actual and suggested contacts
 48// Groups is for group feeds
 49_EXTERN NSString* const kGDataGoogleContactAllContactsFeedName _INITIALIZE_AS(@"contacts");
 50_EXTERN NSString* const kGDataGoogleContactGroupsFeedName      _INITIALIZE_AS(@"groups");
 51
 52// Projections - full (include all extended properties) or thin (exclude
 53//               extended properties)
 54_EXTERN NSString* const kGDataGoogleContactFullProjection _INITIALIZE_AS(@"full");
 55_EXTERN NSString* const kGDataGoogleContactThinProjection _INITIALIZE_AS(@"thin");
 56
 57_EXTERN NSString* kGDataGoogleContactDefaultThinFeed _INITIALIZE_AS(@"https://www.google.com/m8/feeds/contacts/default/thin");
 58_EXTERN NSString* kGDataGoogleContactDefaultFullFeed _INITIALIZE_AS(@"https://www.google.com/m8/feeds/contacts/default/full");
 59
 60_EXTERN NSString* kGDataGoogleContactGroupDefaultThinFeed _INITIALIZE_AS(@"https://www.google.com/m8/feeds/groups/default/thin");
 61_EXTERN NSString* kGDataGoogleContactGroupDefaultFullFeed _INITIALIZE_AS(@"https://www.google.com/m8/feeds/groups/default/full");
 62
 63
 64@interface GDataServiceGoogleContact : GDataServiceGoogle
 65
 66+ (NSURL *)contactURLForFeedName:(NSString *)feedName
 67                          userID:(NSString *)userID
 68                      projection:(NSString *)projection;
 69
 70// convenience URL generators for contacts feed
 71//
 72// Use kGDataServiceDefaultUser as the username to specify the authenticated
 73// user
 74
 75+ (NSURL *)contactFeedURLForUserID:(NSString *)userID;
 76+ (NSURL *)groupFeedURLForUserID:(NSString *)userID;
 77
 78+ (NSURL *)contactFeedURLForUserID:(NSString *)userID
 79                        projection:(NSString *)projection;
 80
 81+ (NSURL *)contactFeedURLForPropertyName:(NSString *)property;
 82+ (NSURL *)contactGroupFeedURLForPropertyName:(NSString *)property;
 83
 84- (GDataServiceTicket *)fetchContactFeedForUsername:(NSString *)username
 85                                           delegate:(id)delegate
 86                                  didFinishSelector:(SEL)finishedSelector;
 87
 88// clients may use these fetch methods of GDataServiceGoogle
 89//
 90//  - (GDataServiceTicket *)fetchFeedWithURL:(NSURL *)feedURL delegate:(id)delegate didFinishSelector:(SEL)finishedSelector;
 91//  - (GDataServiceTicket *)fetchFeedWithQuery:(GDataQuery *)query delegate:(id)delegate didFinishSelector:(SEL)finishedSelector;
 92//  - (GDataServiceTicket *)fetchEntryWithURL:(NSURL *)entryURL delegate:(id)delegate didFinishSelector:(SEL)finishedSelector;
 93//  - (GDataServiceTicket *)fetchEntryByInsertingEntry:(GDataEntryBase *)entryToInsert forFeedURL:(NSURL *)feedURL delegate:(id)delegate didFinishSelector:(SEL)finishedSelector;
 94//  - (GDataServiceTicket *)fetchEntryByUpdatingEntry:(GDataEntryBase *)entryToUpdate delegate:(id)delegate didFinishSelector:(SEL)finishedSelector;
 95//  - (GDataServiceTicket *)deleteEntry:(GDataEntryBase *)entryToDelete delegate:(id)delegate didFinishSelector:(SEL)finishedSelector;
 96//  - (GDataServiceTicket *)deleteResourceURL:(NSURL *)resourceEditURL ETag:(NSString *)etag delegate:(id)delegate didFinishSelector:(SEL)finishedSelector;
 97//  - (GDataServiceTicket *)fetchFeedWithBatchFeed:(GDataFeedBase *)batchFeed forBatchFeedURL:(NSURL *)feedURL delegate:(id)delegate didFinishSelector:(SEL)finishedSelector;
 98//
 99// finishedSelector has a signature like this for feed fetches:
100// - (void)serviceTicket:(GDataServiceTicket *)ticket finishedWithFeed:(GDataFeedBase *)feed error:(NSError *)error;
101//
102// or this for entry fetches:
103// - (void)serviceTicket:(GDataServiceTicket *)ticket finishedWithEntry:(GDataEntryBase *)entry error:(NSError *)error;
104//
105// The class of the returned feed or entry is determined by the URL fetched.
106
107+ (NSString *)serviceRootURLString;
108
109@end
110
111#endif // !GDATA_REQUIRE_SERVICE_INCLUDES || GDATA_INCLUDE_CONTACTS_SERVICE