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

http://macfuse.googlecode.com/ · C++ Header · 153 lines · 88 code · 34 blank · 31 comment · 1 complexity · 7ca93534c011a62d73f2942c508132c9 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. // GDataEntryEvent.h
  17. //
  18. #if !GDATA_REQUIRE_SERVICE_INCLUDES || GDATA_INCLUDE_CALENDAR_SERVICE
  19. #import "GDataEntryBase.h"
  20. #import "GDataLink.h"
  21. #undef _EXTERN
  22. #undef _INITIALIZE_AS
  23. #ifdef GDATAENTRYEVENT_DEFINE_GLOBALS
  24. #define _EXTERN
  25. #define _INITIALIZE_AS(x) =x
  26. #else
  27. #define _EXTERN GDATA_EXTERN
  28. #define _INITIALIZE_AS(x)
  29. #endif
  30. _EXTERN NSString* const kGDataCategoryEvent _INITIALIZE_AS(@"http://schemas.google.com/g/2005#event");
  31. _EXTERN NSString* const kGDataEventStatusConfirmed _INITIALIZE_AS(@"http://schemas.google.com/g/2005#event.confirmed");
  32. _EXTERN NSString* const kGDataEventStatusTentative _INITIALIZE_AS(@"http://schemas.google.com/g/2005#event.tentative");
  33. _EXTERN NSString* const kGDataEventStatusCanceled _INITIALIZE_AS(@"http://schemas.google.com/g/2005#event.canceled");
  34. _EXTERN NSString* const kGDataEventTransparencyTransparent _INITIALIZE_AS(@"http://schemas.google.com/g/2005#event.transparent");
  35. _EXTERN NSString* const kGDataEventTransparencyOpaque _INITIALIZE_AS(@"http://schemas.google.com/g/2005#event.opaque");
  36. _EXTERN NSString* const kGDataEventVisibilityDefault _INITIALIZE_AS(@"http://schemas.google.com/g/2005#event.default");
  37. _EXTERN NSString* const kGDataEventVisibilityPublic _INITIALIZE_AS(@"http://schemas.google.com/g/2005#event.public");
  38. _EXTERN NSString* const kGDataEventVisibilityPrivate _INITIALIZE_AS(@"http://schemas.google.com/g/2005#event.private");
  39. _EXTERN NSString* const kGDataEventVisibilityConfidential _INITIALIZE_AS(@"http://schemas.google.com/g/2005#event.confidental");
  40. #import "GDataValueConstruct.h"
  41. #import "GDataWhen.h"
  42. #import "GDataReminder.h"
  43. #import "GDataRecurrence.h"
  44. #import "GDataRecurrenceException.h"
  45. #import "GDataOriginalEvent.h"
  46. #import "GDataComment.h"
  47. #import "GDataWhere.h"
  48. #import "GDataWho.h"
  49. // EventEntry extensions
  50. // These extensions are just subclasses of GDataValueConstruct.
  51. // We're creating them as unique subclasses so they can exist
  52. // separately in the extensions list, which stores found extensions
  53. // by class.
  54. @interface GDataEventStatus : GDataValueConstruct <GDataExtension>
  55. + (NSString *)extensionElementURI;
  56. + (NSString *)extensionElementPrefix;
  57. + (NSString *)extensionElementLocalName;
  58. @end
  59. @interface GDataVisibility : GDataValueConstruct <GDataExtension>
  60. + (NSString *)extensionElementURI;
  61. + (NSString *)extensionElementPrefix;
  62. + (NSString *)extensionElementLocalName;
  63. @end
  64. @interface GDataTransparency : GDataValueConstruct <GDataExtension>
  65. + (NSString *)extensionElementURI;
  66. + (NSString *)extensionElementPrefix;
  67. + (NSString *)extensionElementLocalName;
  68. @end
  69. // EventEntry categories for extensions
  70. // We're defining Reminders as extensions to When elements.
  71. // This category on When elements will simpify access to those
  72. // reminders that are found inside When elements.
  73. @interface GDataWhen (GDataCalendarEntryEventExtensions)
  74. - (NSArray *)reminders;
  75. - (void)setReminders:(NSArray *)arr;
  76. - (void)addReminder:(GDataReminder *)obj;
  77. @end
  78. @interface GDataEntryEvent : GDataEntryBase {
  79. }
  80. // a side-effect of calling setRecurrence is to switch reminder elements
  81. // between recurrence (in the event) and non-recurrence (in the first
  82. // event time)
  83. - (GDataRecurrence *)recurrence;
  84. - (void)setRecurrence:(GDataRecurrence *)obj;
  85. - (NSArray *)recurrenceExceptions;
  86. - (void)setRecurrenceExceptions:(NSArray *)arr;
  87. - (void)addRecurrenceException:(GDataRecurrenceException *)obj;
  88. - (GDataOriginalEvent *)originalEvent;
  89. - (void)setOriginalEvent:(GDataOriginalEvent *)event;
  90. - (GDataComment *)comment;
  91. - (void)setComment:(GDataComment *)event;
  92. // these reminder methods will call the recurrence or non-recurrence
  93. // methods depending on the presence of a recurrence element
  94. - (NSArray *)reminders;
  95. - (void)setReminders:(NSArray *)array;
  96. - (void)addReminder:(GDataReminder *)obj;
  97. - (NSArray *)recurrenceReminders;
  98. - (void)setRecurrenceReminders:(NSArray *)array;
  99. - (void)addRecurrenceReminder:(GDataReminder *)obj;
  100. - (NSArray *)nonRecurrenceReminders;
  101. - (void)setNonRecurrenceReminders:(NSArray *)array;
  102. - (void)addNonRecurrenceReminder:(GDataReminder *)obj;
  103. - (GDataEventStatus *)eventStatus;
  104. - (void)setEventStatus:(GDataEventStatus *)eventStatus;
  105. - (GDataTransparency *)transparency;
  106. - (void)setTransparency:(GDataTransparency *)str;
  107. - (GDataVisibility *)visibility;
  108. - (void)setVisibility:(GDataVisibility *)str;
  109. - (NSArray *)times;
  110. - (void)setTimes:(NSArray *)array;
  111. - (void)addTime:(GDataWhen *)obj;
  112. - (NSArray *)participants;
  113. - (void)setParticipants:(NSArray *)array;
  114. - (void)addParticipant:(GDataWho *)obj;
  115. - (NSArray *)locations;
  116. - (void)setLocations:(NSArray *)array;
  117. - (void)addLocation:(GDataWhere *)obj;
  118. @end
  119. #endif // !GDATA_REQUIRE_SERVICE_INCLUDES || GDATA_INCLUDE_CALENDAR_SERVICE