PageRenderTime 29ms CodeModel.GetById 16ms app.highlight 11ms RepoModel.GetById 1ms app.codeStats 0ms

/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//
17//  GDataEntryYouTubePlaylist.m
18//
19
20#if !GDATA_REQUIRE_SERVICE_INCLUDES || GDATA_INCLUDE_YOUTUBE_SERVICE
21
22#import "GDataEntryYouTubePlaylist.h"
23#import "GDataYouTubeConstants.h"
24
25@implementation GDataEntryYouTubePlaylist
26
27+ (GDataEntryYouTubePlaylist *)playlistEntry {
28  
29  GDataEntryYouTubePlaylist *entry = [self object];
30
31  [entry setNamespaces:[GDataYouTubeConstants youTubeNamespaces]];
32  
33  return entry;
34}
35
36#pragma mark -
37
38+ (NSString *)standardEntryKind {
39  return kGDataCategoryYouTubePlaylist;
40}
41
42+ (void)load {
43  [self registerEntryClass];
44}
45
46- (void)addExtensionDeclarations {
47  
48  [super addExtensionDeclarations];
49  
50  Class entryClass = [self class];
51  
52  [self addExtensionDeclarationForParentClass:entryClass
53                                   childClass:[GDataYouTubePosition class]];
54}
55
56#if !GDATA_SIMPLE_DESCRIPTIONS
57- (NSMutableArray *)itemsForDescription {
58  
59  NSMutableArray *items = [super itemsForDescription];
60
61  [self addToArray:items objectDescriptionIfNonNil:[self position] withName:@"position"]; 
62    
63  return items;
64}
65#endif
66
67+ (NSString *)videoEntryCategoryTerm {
68  // declare the term for the category that each entry gets in the superclass's
69  // init method
70  return kGDataCategoryYouTubePlaylist;
71}
72
73#pragma mark -
74
75- (GDataYouTubePosition *)position {
76  return [self objectForExtensionClass:[GDataYouTubePosition class]];
77}
78
79- (void)setPosition:(GDataYouTubePosition *)obj {
80  [self setObject:obj forExtensionClass:[GDataYouTubePosition class]];
81}
82
83@end
84
85#endif // !GDATA_REQUIRE_SERVICE_INCLUDES || GDATA_INCLUDE_YOUTUBE_SERVICE