PageRenderTime 58ms CodeModel.GetById 14ms app.highlight 40ms RepoModel.GetById 2ms app.codeStats 0ms

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

http://macfuse.googlecode.com/
Objective C | 265 lines | 177 code | 41 blank | 47 comment | 1 complexity | 7780308256d66b683272ce90d379e5d3 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//  GDataYouTubeElements.m
 18//
 19
 20#if !GDATA_REQUIRE_SERVICE_INCLUDES || GDATA_INCLUDE_YOUTUBE_SERVICE
 21
 22// http://code.google.com/apis/youtube/reference.html#Elements
 23
 24#import "GDataYouTubeElements.h"
 25#import "GDataYouTubeConstants.h"
 26
 27
 28// user info, like <yt:aboutMe>I am hot</yt:about me>
 29@implementation GDataYouTubeAboutMe
 30+ (NSString *)extensionElementURI       { return kGDataNamespaceYouTube; }
 31+ (NSString *)extensionElementPrefix    { return kGDataNamespaceYouTubePrefix; }
 32+ (NSString *)extensionElementLocalName { return @"aboutMe"; }
 33@end
 34
 35// user's age, an integer, like <yt:age>32</yt:age>
 36@implementation GDataYouTubeAge
 37+ (NSString *)extensionElementURI       { return kGDataNamespaceYouTube; }
 38+ (NSString *)extensionElementPrefix    { return kGDataNamespaceYouTubePrefix; }
 39+ (NSString *)extensionElementLocalName { return @"age"; }
 40@end
 41
 42// aspect ratio, like <yt:aspectRatio>widescreen</yt:aspectRatio>
 43@implementation GDataYouTubeAspectRatio
 44+ (NSString *)extensionElementURI       { return kGDataNamespaceYouTube; }
 45+ (NSString *)extensionElementPrefix    { return kGDataNamespaceYouTubePrefix; }
 46+ (NSString *)extensionElementLocalName { return @"aspectRatio"; }
 47@end
 48
 49// user's books, like <yt:books>Pride and Prejudice</yt:books>
 50@implementation GDataYouTubeBooks 
 51+ (NSString *)extensionElementURI       { return kGDataNamespaceYouTube; }
 52+ (NSString *)extensionElementPrefix    { return kGDataNamespaceYouTubePrefix; }
 53+ (NSString *)extensionElementLocalName { return @"books"; }
 54@end
 55
 56// rating of comment, like <yt:commentRating>1</yt:commentRating>
 57@implementation GDataYouTubeCommentRating
 58+ (NSString *)extensionElementURI       { return kGDataNamespaceYouTube; }
 59+ (NSString *)extensionElementPrefix    { return kGDataNamespaceYouTubePrefix; }
 60+ (NSString *)extensionElementLocalName { return @"commentRating"; }
 61@end
 62
 63// user's company, like <yt:company>Self employed</yt:company>
 64@implementation GDataYouTubeCompany
 65+ (NSString *)extensionElementURI       { return kGDataNamespaceYouTube; }
 66+ (NSString *)extensionElementPrefix    { return kGDataNamespaceYouTubePrefix; }
 67+ (NSString *)extensionElementLocalName { return @"company"; }
 68@end
 69
 70// count hint for entry content, like <yt:countHint>10</yt:countHint>
 71@implementation GDataYouTubeCountHint
 72+ (NSString *)extensionElementURI       { return kGDataNamespaceYouTube; }
 73+ (NSString *)extensionElementPrefix    { return kGDataNamespaceYouTubePrefix; }
 74+ (NSString *)extensionElementLocalName { return @"countHint"; }
 75@end
 76
 77// caption track derivation, like <yt:derived>speechRecognition</yt:derived>
 78@implementation GDataYouTubeDerived
 79+ (NSString *)extensionElementURI       { return kGDataNamespaceYouTube; }
 80+ (NSString *)extensionElementPrefix    { return kGDataNamespaceYouTubePrefix; }
 81+ (NSString *)extensionElementLocalName { return @"derived"; }
 82@end
 83
 84// user's hobbies, like <yt:hobbies>Reading, skiing</yt:hobbies>
 85@implementation GDataYouTubeHobbies
 86+ (NSString *)extensionElementURI       { return kGDataNamespaceYouTube; }
 87+ (NSString *)extensionElementPrefix    { return kGDataNamespaceYouTubePrefix; }
 88+ (NSString *)extensionElementLocalName { return @"hobbies"; }
 89@end
 90
 91// user's hometown, like <yt:hometown>Seattle</yt:hometown>
 92@implementation GDataYouTubeHometown
 93+ (NSString *)extensionElementURI       { return kGDataNamespaceYouTube; }
 94+ (NSString *)extensionElementPrefix    { return kGDataNamespaceYouTubePrefix; }
 95+ (NSString *)extensionElementLocalName { return @"hometown"; }
 96@end
 97
 98// user's location, like <yt:location>Longbourn in Hertfordshire, Pemberley in Derbyshire</yt:location>
 99@implementation GDataYouTubeLocation
100+ (NSString *)extensionElementURI       { return kGDataNamespaceYouTube; }
101+ (NSString *)extensionElementPrefix    { return kGDataNamespaceYouTubePrefix; }
102+ (NSString *)extensionElementLocalName { return @"location"; }
103@end
104
105// user's movies, like <yt:movies>Pride and Prejudice, 2005</yt:movies>
106@implementation GDataYouTubeMovies
107+ (NSString *)extensionElementURI       { return kGDataNamespaceYouTube; }
108+ (NSString *)extensionElementPrefix    { return kGDataNamespaceYouTubePrefix; }
109+ (NSString *)extensionElementLocalName { return @"movies"; }
110@end
111
112// user's music, like <yt:music>Pink Floyd</yt:music>
113@implementation GDataYouTubeMusic
114+ (NSString *)extensionElementURI       { return kGDataNamespaceYouTube; }
115+ (NSString *)extensionElementPrefix    { return kGDataNamespaceYouTubePrefix; }
116+ (NSString *)extensionElementLocalName { return @"music"; }
117@end
118
119// user's occupation, like <yt:occupation>Doctor of quackery</yt:occupation>
120@implementation GDataYouTubeOccupation
121+ (NSString *)extensionElementURI       { return kGDataNamespaceYouTube; }
122+ (NSString *)extensionElementPrefix    { return kGDataNamespaceYouTubePrefix; }
123+ (NSString *)extensionElementLocalName { return @"occupation"; }
124@end
125
126// user's school, like <yt:school>Rocky Mountain High</yt:school>
127@implementation GDataYouTubeSchool
128+ (NSString *)extensionElementURI       { return kGDataNamespaceYouTube; }
129+ (NSString *)extensionElementPrefix    { return kGDataNamespaceYouTubePrefix; }
130+ (NSString *)extensionElementLocalName { return @"school"; }
131@end
132
133// user's gender, like <yt:gender>f</yt:gender>
134@implementation GDataYouTubeGender
135+ (NSString *)extensionElementURI       { return kGDataNamespaceYouTube; }
136+ (NSString *)extensionElementPrefix    { return kGDataNamespaceYouTubePrefix; }
137+ (NSString *)extensionElementLocalName { return @"gender"; }
138@end
139
140// user's relationship, like <yt:relationship>available</yt:relationship>
141@implementation GDataYouTubeRelationship
142+ (NSString *)extensionElementURI       { return kGDataNamespaceYouTube; }
143+ (NSString *)extensionElementPrefix    { return kGDataNamespaceYouTubePrefix; }
144+ (NSString *)extensionElementLocalName { return @"relationship"; }
145@end
146
147// video duration in seconds, like <yt:duration seconds="2462" />
148@implementation GDataYouTubeDuration
149+ (NSString *)extensionElementURI       { return kGDataNamespaceYouTube; }
150+ (NSString *)extensionElementPrefix    { return kGDataNamespaceYouTubePrefix; }
151+ (NSString *)extensionElementLocalName { return @"duration"; }
152
153- (NSString *)attributeName {
154  return @"seconds";
155}
156@end
157
158// element indicating non-embeddable video, <yt:noembed/>
159@implementation GDataYouTubeNonEmbeddable
160+ (NSString *)extensionElementURI       { return kGDataNamespaceYouTube; }
161+ (NSString *)extensionElementPrefix    { return kGDataNamespaceYouTubePrefix; }
162+ (NSString *)extensionElementLocalName { return @"noembed"; }
163@end
164
165// position in a playlist, an integer, like <yt:position>1</yt:position>
166@implementation GDataYouTubePosition
167+ (NSString *)extensionElementURI       { return kGDataNamespaceYouTube; }
168+ (NSString *)extensionElementPrefix    { return kGDataNamespaceYouTubePrefix; }
169+ (NSString *)extensionElementLocalName { return @"position"; }
170@end
171
172@implementation GDataYouTubePrivate
173+ (NSString *)extensionElementURI       { return kGDataNamespaceYouTube; }
174+ (NSString *)extensionElementPrefix    { return kGDataNamespaceYouTubePrefix; }
175+ (NSString *)extensionElementLocalName { return @"private"; }
176@end
177
178@implementation GDataYouTubeFirstName
179+ (NSString *)extensionElementURI       { return kGDataNamespaceYouTube; }
180+ (NSString *)extensionElementPrefix    { return kGDataNamespaceYouTubePrefix; }
181+ (NSString *)extensionElementLocalName { return @"firstName"; }
182@end
183
184@implementation GDataYouTubeLastName
185+ (NSString *)extensionElementURI       { return kGDataNamespaceYouTube; }
186+ (NSString *)extensionElementPrefix    { return kGDataNamespaceYouTubePrefix; }
187+ (NSString *)extensionElementLocalName { return @"lastName"; }
188@end
189
190@implementation GDataYouTubePlaylistID
191+ (NSString *)extensionElementURI       { return kGDataNamespaceYouTube; }
192+ (NSString *)extensionElementPrefix    { return kGDataNamespaceYouTubePrefix; }
193+ (NSString *)extensionElementLocalName { return @"playlistId"; }
194@end
195
196@implementation GDataYouTubePlaylistTitle
197+ (NSString *)extensionElementURI       { return kGDataNamespaceYouTube; }
198+ (NSString *)extensionElementPrefix    { return kGDataNamespaceYouTubePrefix; }
199+ (NSString *)extensionElementLocalName { return @"playlistTitle"; }
200@end
201
202@implementation GDataYouTubeQueryString
203+ (NSString *)extensionElementURI       { return kGDataNamespaceYouTube; }
204+ (NSString *)extensionElementPrefix    { return kGDataNamespaceYouTubePrefix; }
205+ (NSString *)extensionElementLocalName { return @"queryString"; }
206@end
207
208// hint that the containing entry is spam, like <yt:spam/>
209@implementation GDataYouTubeSpam
210+ (NSString *)extensionElementURI       { return kGDataNamespaceYouTube; }
211+ (NSString *)extensionElementPrefix    { return kGDataNamespaceYouTubePrefix; }
212+ (NSString *)extensionElementLocalName { return @"spam"; }
213@end
214
215// status, like <yt:status>accepted</yt:status>
216@implementation GDataYouTubeStatus
217+ (NSString *)extensionElementURI       { return kGDataNamespaceYouTube; }
218+ (NSString *)extensionElementPrefix    { return kGDataNamespaceYouTubePrefix; }
219+ (NSString *)extensionElementLocalName { return @"status"; }
220@end
221
222// user's name, like <yt:username>liz</yt:username>
223@implementation GDataYouTubeUsername
224+ (NSString *)extensionElementURI       { return kGDataNamespaceYouTube; }
225+ (NSString *)extensionElementPrefix    { return kGDataNamespaceYouTubePrefix; }
226+ (NSString *)extensionElementLocalName { return @"username"; }
227@end
228
229// token extension to edit-media links, like <yt:token>LongForm</yt:token>
230@implementation GDataYouTubeToken
231+ (NSString *)extensionElementURI       { return kGDataNamespaceYouTube; }
232+ (NSString *)extensionElementPrefix    { return kGDataNamespaceYouTubePrefix; }
233+ (NSString *)extensionElementLocalName { return @"token"; }
234@end
235
236// date video was recorded <yt:recorded>1998-12-1</yt:recorded>
237@implementation GDataYouTubeRecordedDate
238+ (NSString *)extensionElementURI       { return kGDataNamespaceYouTube; }
239+ (NSString *)extensionElementPrefix    { return kGDataNamespaceYouTubePrefix; }
240+ (NSString *)extensionElementLocalName { return @"recorded"; }
241@end
242
243// uploaded date for v2 feeds, like <yt:uploaded>2008-03-06T23:49:12.000Z</yt:uploaded>
244@implementation GDataYouTubeUploadedDate
245+ (NSString *)extensionElementURI       { return kGDataNamespaceYouTube;       }
246+ (NSString *)extensionElementPrefix    { return kGDataNamespaceYouTubePrefix; }
247+ (NSString *)extensionElementLocalName { return @"uploaded";                  }
248@end
249
250// video ID for v2 feeds, like <yt:videoid>I-t-7lTw6mA</yt:videoid>
251@implementation GDataYouTubeVideoID
252+ (NSString *)extensionElementURI       { return kGDataNamespaceYouTube; }
253+ (NSString *)extensionElementPrefix    { return kGDataNamespaceYouTubePrefix; }
254+ (NSString *)extensionElementLocalName { return @"videoid"; }
255@end
256
257// element inside an app:control indicating an incompletely-defined video,
258// like <yt:incomplete/>
259@implementation GDataYouTubeIncomplete
260+ (NSString *)extensionElementURI       { return kGDataNamespaceYouTube; }
261+ (NSString *)extensionElementPrefix    { return kGDataNamespaceYouTubePrefix; }
262+ (NSString *)extensionElementLocalName { return @"incomplete"; }
263@end
264
265#endif // !GDATA_REQUIRE_SERVICE_INCLUDES || GDATA_INCLUDE_YOUTUBE_SERVICE