/core/externals/update-engine/externals/gdata-objectivec-client/Source/Elements/GDataEntryContent.h

http://macfuse.googlecode.com/ · C++ Header · 79 lines · 33 code · 18 blank · 28 comment · 0 complexity · f3e94789443e0033776263a7d69818bf 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. // GDataEntryContent.h
  17. //
  18. #import "GDataObject.h"
  19. #undef _EXTERN
  20. #undef _INITIALIZE_AS
  21. #ifdef GDATAENTRYCONTENT_DEFINE_GLOBALS
  22. #define _EXTERN
  23. #define _INITIALIZE_AS(x) =x
  24. #else
  25. #define _EXTERN GDATA_EXTERN
  26. #define _INITIALIZE_AS(x)
  27. #endif
  28. _EXTERN NSString* const kGDataContentTypeKML _INITIALIZE_AS(@"application/vnd.google-earth.kml+xml");
  29. // per http://www.atomenabled.org/developers/syndication/atom-format-spec.php#element.content
  30. //
  31. // For typed content, like <content type="text">Here go the ferrets</content>
  32. //
  33. // or media content with a source URI specified,
  34. // <content src="http://lh.google.com/image/Car.jpg" type="image/jpeg"/>
  35. //
  36. // or a child feed or entry, like
  37. // <content type="application/atom+xml;feed"> <feed>...</feed> </content>
  38. //
  39. // Text type can be text, text/plain, html, text/html, xhtml, text/xhtml
  40. @interface GDataEntryContent : GDataObject {
  41. GDataObject *childObject_;
  42. }
  43. + (id)contentWithString:(NSString *)str;
  44. + (id)contentWithSourceURI:(NSString *)str type:(NSString *)type;
  45. + (id)contentWithXMLValue:(NSXMLNode *)node type:(NSString *)type;
  46. + (id)textConstructWithString:(NSString *)str; // deprecated
  47. - (NSString *)lang;
  48. - (void)setLang:(NSString *)str;
  49. - (NSString *)type;
  50. - (void)setType:(NSString *)str;
  51. - (NSString *)sourceURI;
  52. - (void)setSourceURI:(NSString *)str;
  53. - (NSURL *)sourceURL;
  54. - (NSString *)stringValue;
  55. - (void)setStringValue:(NSString *)str;
  56. - (GDataObject *)childObject;
  57. - (void)setChildObject:(GDataObject *)obj;
  58. - (NSArray *)XMLValues;
  59. - (void)setXMLValues:(NSArray *)arr;
  60. - (void)addXMLValue:(NSXMLNode *)node;
  61. @end