/core/externals/update-engine/externals/gdata-objectivec-client/Source/Clients/Calendar/GDataRecurrence.m

http://macfuse.googlecode.com/ · Objective C · 62 lines · 22 code · 11 blank · 29 comment · 1 complexity · de756646b60bf3fa8908dad1d1f38c2f MD5 · raw file

  1. /* Copyright (c) 2007-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. // GDataRecurrence.m
  17. //
  18. #if !GDATA_REQUIRE_SERVICE_INCLUDES || GDATA_INCLUDE_CALENDAR_SERVICE
  19. #import "GDataRecurrence.h"
  20. @implementation GDataRecurrence
  21. // a gd:recurrence, as in
  22. //
  23. // <gd:recurrence>
  24. // DTSTART;TZID=America/Los_Angeles:20060314T060000
  25. // DURATION:PT3600S ...
  26. // END:DAYLIGHT
  27. // END:VTIMEZONE
  28. // </gd:recurrence>
  29. //
  30. // http://code.google.com/apis/gdata/common-elements.html#gdRecurrence
  31. //
  32. // See RFC 2445: http://www.ietf.org/rfc/rfc2445.txt
  33. + (NSString *)extensionElementURI { return kGDataNamespaceGData; }
  34. + (NSString *)extensionElementPrefix { return kGDataNamespaceGDataPrefix; }
  35. + (NSString *)extensionElementLocalName { return @"recurrence"; }
  36. + (GDataRecurrence *)recurrenceWithString:(NSString *)str {
  37. GDataRecurrence* obj = [self object];
  38. [obj setStringValue:str];
  39. return obj;
  40. }
  41. - (void)addParseDeclarations {
  42. [self addContentValueDeclaration];
  43. }
  44. - (NSString *)stringValue {
  45. return [self contentStringValue];
  46. }
  47. - (void)setStringValue:(NSString *)str {
  48. [self setContentStringValue:str];
  49. }
  50. @end
  51. #endif // !GDATA_REQUIRE_SERVICE_INCLUDES || GDATA_INCLUDE_CALENDAR_SERVICE