PageRenderTime 18ms CodeModel.GetById 13ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/core/externals/update-engine/externals/gdata-objectivec-client/Source/Clients/YouTube/GDataYouTubeMediaElements.h

http://macfuse.googlecode.com/
C++ Header | 88 lines | 41 code | 17 blank | 30 comment | 1 complexity | 642b895cc1a35e7602d083324b35c9ab 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//  GDataYouTubeMediaElements.h
18//
19
20#if !GDATA_REQUIRE_SERVICE_INCLUDES || GDATA_INCLUDE_YOUTUBE_SERVICE
21
22#import "GDataObject.h"
23
24#undef _EXTERN
25#undef _INITIALIZE_AS
26#ifdef GDATAYOUTUBEMEDIAELEMENTS_DEFINE_GLOBALS
27#define _EXTERN 
28#define _INITIALIZE_AS(x) =x
29#else
30#define _EXTERN GDATA_EXTERN
31#define _INITIALIZE_AS(x)
32#endif
33
34_EXTERN const int kGDataYouTubeMediaContentFormatRTSPStream       _INITIALIZE_AS(1);
35_EXTERN const int kGDataYouTubeMediaContentFormatHTTPURL          _INITIALIZE_AS(5);
36_EXTERN const int kGDataYouTubeMediaContentFormatMobileRTSPStream _INITIALIZE_AS(6);
37
38#import "GDataMedia.h"
39#import "GDataYouTubeElements.h"
40
41// media content with YouTube's addition of an integer format attribute, 
42// like yt:format="1"
43//
44// Note: iPhone seems to support playback of RTSP streams (formats 1 and 6)
45
46@interface GDataMediaContent (YouTubeExtensions)
47- (NSNumber *)youTubeFormatNumber;
48- (void)setYouTubeFormatNumber:(NSNumber *)num;
49@end
50
51// media rating with YouTube's addition of a country attribute, 
52// like yt:country="USA"
53@interface GDataMediaRating (YouTubeExtensions)
54- (NSString *)youTubeCountry;
55- (void)setYouTubeCountry:(NSString *)str;
56@end
57
58// media credit with YouTube's addition of a type attribute,
59// like yt:type="partner" (v2.0)
60@interface GDataMediaCredit (YouTubeExtensions)
61- (NSString *)youTubeCreditType;
62- (void)setYouTubeCreditType:(NSString *)str;
63@end
64
65
66// a media group that uses the YouTube media content elements instead
67// of the generic media content elements
68@interface GDataYouTubeMediaGroup : GDataMediaGroup
69- (NSNumber *)duration; // int, in seconds
70- (void)setDuration:(NSNumber *)num;
71
72- (BOOL)isPrivate;
73- (void)setIsPrivate:(BOOL)flag;
74
75// videoID available in v2.0
76- (NSString *)videoID;
77- (void)setVideoID:(NSString *)str;
78
79// uploadedDate available in v2.0
80- (GDataDateTime *)uploadedDate;
81- (void)setUploadedDate:(GDataDateTime *)dateTime;
82
83// convenience accessors
84- (GDataMediaThumbnail *)highQualityThumbnail;
85- (GDataMediaContent *)mediaContentWithFormatNumber:(NSInteger)formatNumber;
86@end
87
88#endif // !GDATA_REQUIRE_SERVICE_INCLUDES || GDATA_INCLUDE_YOUTUBE_SERVICE