/core/externals/update-engine/externals/gdata-objectivec-client/Source/Clients/YouTube/GDataEntryYouTubePlaylist.m

http://macfuse.googlecode.com/ · Objective C · 85 lines · 41 code · 25 blank · 19 comment · 1 complexity · d443344bd80d4264cd281bf672a7d3b3 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. // GDataEntryYouTubePlaylist.m
  17. //
  18. #if !GDATA_REQUIRE_SERVICE_INCLUDES || GDATA_INCLUDE_YOUTUBE_SERVICE
  19. #import "GDataEntryYouTubePlaylist.h"
  20. #import "GDataYouTubeConstants.h"
  21. @implementation GDataEntryYouTubePlaylist
  22. + (GDataEntryYouTubePlaylist *)playlistEntry {
  23. GDataEntryYouTubePlaylist *entry = [self object];
  24. [entry setNamespaces:[GDataYouTubeConstants youTubeNamespaces]];
  25. return entry;
  26. }
  27. #pragma mark -
  28. + (NSString *)standardEntryKind {
  29. return kGDataCategoryYouTubePlaylist;
  30. }
  31. + (void)load {
  32. [self registerEntryClass];
  33. }
  34. - (void)addExtensionDeclarations {
  35. [super addExtensionDeclarations];
  36. Class entryClass = [self class];
  37. [self addExtensionDeclarationForParentClass:entryClass
  38. childClass:[GDataYouTubePosition class]];
  39. }
  40. #if !GDATA_SIMPLE_DESCRIPTIONS
  41. - (NSMutableArray *)itemsForDescription {
  42. NSMutableArray *items = [super itemsForDescription];
  43. [self addToArray:items objectDescriptionIfNonNil:[self position] withName:@"position"];
  44. return items;
  45. }
  46. #endif
  47. + (NSString *)videoEntryCategoryTerm {
  48. // declare the term for the category that each entry gets in the superclass's
  49. // init method
  50. return kGDataCategoryYouTubePlaylist;
  51. }
  52. #pragma mark -
  53. - (GDataYouTubePosition *)position {
  54. return [self objectForExtensionClass:[GDataYouTubePosition class]];
  55. }
  56. - (void)setPosition:(GDataYouTubePosition *)obj {
  57. [self setObject:obj forExtensionClass:[GDataYouTubePosition class]];
  58. }
  59. @end
  60. #endif // !GDATA_REQUIRE_SERVICE_INCLUDES || GDATA_INCLUDE_YOUTUBE_SERVICE