/core/externals/update-engine/externals/gdata-objectivec-client/Source/Clients/Calendar/GDataServiceGoogleCalendar.h

http://macfuse.googlecode.com/ · C++ Header · 99 lines · 26 code · 22 blank · 51 comment · 1 complexity · a136635537a171d023a405ea3f9be889 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. // GDataServiceGoogleCalendar.h
  17. //
  18. #if !GDATA_REQUIRE_SERVICE_INCLUDES || GDATA_INCLUDE_CALENDAR_SERVICE
  19. #import "GDataServiceGoogle.h"
  20. #undef _EXTERN
  21. #undef _INITIALIZE_AS
  22. #ifdef GDATASERVICEGOOGLECALENDAR_DEFINE_GLOBALS
  23. #define _EXTERN
  24. #define _INITIALIZE_AS(x) =x
  25. #else
  26. #define _EXTERN GDATA_EXTERN
  27. #define _INITIALIZE_AS(x)
  28. #endif
  29. // default feed of calendars
  30. _EXTERN NSString* const kGDataGoogleCalendarDefaultFeed _INITIALIZE_AS(@"https://www.google.com/calendar/feeds/default");
  31. // owned calendars; supports inserting and deleting calendars
  32. _EXTERN NSString* const kGDataGoogleCalendarDefaultOwnCalendarsFeed _INITIALIZE_AS(@"https://www.google.com/calendar/feeds/default/owncalendars/full");
  33. // subscribed calendars; insert adds a subscription, delete removes a subscription
  34. _EXTERN NSString* const kGDataGoogleCalendarDefaultAllCalendarsFeed _INITIALIZE_AS(@"https://www.google.com/calendar/feeds/default/allcalendars/full");
  35. // calendar events feed
  36. _EXTERN NSString* const kGDataGoogleCalendarDefaultPrivateFullFeed _INITIALIZE_AS(@"https://www.google.com/calendar/feeds/default/private/full");
  37. // QuickAdd:
  38. //
  39. // Google Calendar can parse natural language text to create a
  40. // Calendar entry. Create the entry by setting the content,
  41. // then insert it into the calendar:
  42. //
  43. // GDataEntryCalendarEvent *newEvent = [GDataEntryCalendarEvent calendarEvent];
  44. // [newEvent setContentWithString:@"Party today at 4pm"];
  45. // [newEvent setIsQuickAdd:YES];
  46. //
  47. // then pass the event to fetchEntryByInsertingEntry:
  48. //
  49. @interface GDataServiceGoogleCalendar : GDataServiceGoogle
  50. + (NSURL *)calendarFeedURLForUsername:(NSString *)username;
  51. + (NSURL *)settingsFeedURLForUsername:(NSString *)username;
  52. + (NSURL *)freeBusyURLForUsername:(NSString *)username;
  53. + (NSURL *)freeBusyURLForGroup:(NSString *)groupname;
  54. - (GDataServiceTicket *)fetchCalendarFeedForUsername:(NSString *)username
  55. delegate:(id)delegate
  56. didFinishSelector:(SEL)finishedSelector;
  57. // clients may use these fetch methods of GDataServiceGoogle
  58. //
  59. // - (GDataServiceTicket *)fetchFeedWithURL:(NSURL *)feedURL delegate:(id)delegate didFinishSelector:(SEL)finishedSelector;
  60. // - (GDataServiceTicket *)fetchFeedWithQuery:(GDataQuery *)query delegate:(id)delegate didFinishSelector:(SEL)finishedSelector;
  61. // - (GDataServiceTicket *)fetchEntryWithURL:(NSURL *)entryURL delegate:(id)delegate didFinishSelector:(SEL)finishedSelector;
  62. // - (GDataServiceTicket *)fetchEntryByInsertingEntry:(GDataEntryBase *)entryToInsert forFeedURL:(NSURL *)feedURL delegate:(id)delegate didFinishSelector:(SEL)finishedSelector;
  63. // - (GDataServiceTicket *)fetchEntryByUpdatingEntry:(GDataEntryBase *)entryToUpdate delegate:(id)delegate didFinishSelector:(SEL)finishedSelector;
  64. // - (GDataServiceTicket *)deleteEntry:(GDataEntryBase *)entryToDelete delegate:(id)delegate didFinishSelector:(SEL)finishedSelector;
  65. // - (GDataServiceTicket *)deleteResourceURL:(NSURL *)resourceEditURL ETag:(NSString *)etag delegate:(id)delegate didFinishSelector:(SEL)finishedSelector;
  66. // - (GDataServiceTicket *)fetchFeedWithBatchFeed:(GDataFeedBase *)batchFeed forBatchFeedURL:(NSURL *)feedURL delegate:(id)delegate didFinishSelector:(SEL)finishedSelector;
  67. //
  68. // finishedSelector has a signature like this for feed fetches:
  69. // - (void)serviceTicket:(GDataServiceTicket *)ticket finishedWithFeed:(GDataFeedBase *)feed error:(NSError *)error;
  70. //
  71. // or this for entry fetches:
  72. // - (void)serviceTicket:(GDataServiceTicket *)ticket finishedWithEntry:(GDataEntryBase *)entry error:(NSError *)error;
  73. //
  74. // The class of the returned feed or entry is determined by the URL fetched.
  75. + (NSString *)serviceRootURLString;
  76. @end
  77. #endif // !GDATA_REQUIRE_SERVICE_INCLUDES || GDATA_INCLUDE_CALENDAR_SERVICE