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