Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

242 lines
7.7 KiB

  1. // TvRatings.idl : IDL source for TvRatings.dll
  2. //
  3. // This file will be processed by the MIDL tool to
  4. // produce the type library (TvRatings.tlb) and marshalling code.
  5. import "oaidl.idl";
  6. import "ocidl.idl";
  7. typedef enum
  8. {
  9. MPAA = 0,
  10. US_TV = 1,
  11. Canadian_English = 2,
  12. Canadian_French = 3,
  13. Reserved4 = 4, // filler - not used.
  14. System5 = 5, // maps to system 5 of XDS rating table 19
  15. System6 = 6, // maps to system 6 of XDS rating table 19
  16. Reserved7 = 7, // filler - not used.
  17. TvRat_kSystems = 8, // used for allocating structures
  18. TvRat_SystemDontKnow = 255 // haven't gotten a data value yet... (perhaps change to 0)
  19. } EnTvRat_System;
  20. typedef enum // constraint is that must be in increasing order, and max < 2^8
  21. {
  22. TvRat_0 = 0,
  23. TvRat_1 = 1,
  24. TvRat_2 = 2,
  25. TvRat_3 = 3,
  26. TvRat_4 = 4,
  27. TvRat_5 = 5,
  28. TvRat_6 = 6,
  29. TvRat_7 = 7,
  30. TvRat_kLevels = 8, // used for allocating structures
  31. TvRat_LevelDontKnow = 255 // haven't gotten a data value yet... (perhaps change to _7)
  32. } EnTvRat_GenericLevel;
  33. typedef enum
  34. {
  35. MPAA_NotApplicable = TvRat_0,
  36. MPAA_G = TvRat_1,
  37. MPAA_PG = TvRat_2,
  38. MPAA_PG13 = TvRat_3,
  39. MPAA_R = TvRat_4,
  40. MPAA_NC17 = TvRat_5,
  41. MPAA_X = TvRat_6,
  42. MPAA_NotRated = TvRat_7
  43. } EnTvRat_MPAA;
  44. typedef enum
  45. {
  46. US_TV_None = TvRat_0,
  47. US_TV_Y = TvRat_1,
  48. US_TV_Y7 = TvRat_2,
  49. US_TV_G = TvRat_3,
  50. US_TV_PG = TvRat_4,
  51. US_TV_14 = TvRat_5,
  52. US_TV_MA = TvRat_6,
  53. US_TV_None7 = TvRat_7
  54. } EnTvRat_US_TV;
  55. typedef enum
  56. {
  57. CAE_TV_Exempt = TvRat_0,
  58. CAE_TV_C = TvRat_1,
  59. CAE_TV_C8 = TvRat_2,
  60. CAE_TV_G = TvRat_3,
  61. CAE_TV_PG = TvRat_4,
  62. CAE_TV_14 = TvRat_5,
  63. CAE_TV_18 = TvRat_6,
  64. CAE_TV_Reserved = TvRat_7
  65. } EnTvRat_CAE_TV;
  66. typedef enum
  67. {
  68. CAF_TV_Exempt = TvRat_0,
  69. CAF_TV_G = TvRat_1,
  70. CAF_TV_8 = TvRat_2,
  71. CAF_TV_13 = TvRat_3,
  72. CAF_TV_16 = TvRat_4,
  73. CAF_TV_18 = TvRat_5,
  74. CAF_TV_Reserved6 = TvRat_6,
  75. CAF_TV_Reserved = TvRat_7
  76. } EnTvRat_CAF_TV;
  77. // -------------------
  78. typedef enum
  79. {
  80. BfAttrNone = 0, // no bits set (for initialization)
  81. BfIsBlocked = 1, // if set,
  82. BfIsAttr_1 = 2,
  83. BfIsAttr_2 = 4,
  84. BfIsAttr_3 = 8,
  85. BfIsAttr_4 = 16,
  86. BfIsAttr_5 = 32, // no bits set...
  87. BfIsAttr_6 = 64,
  88. BfIsAttr_7 = 128,
  89. BfValidAttrSubmask = 255 // IsBlocked is not a valid attribute to display
  90. } BfEnTvRat_GenericAttributes;
  91. typedef enum
  92. {
  93. US_TV_IsBlocked = BfIsBlocked,
  94. US_TV_IsViolent = BfIsAttr_1,
  95. US_TV_IsSexualSituation = BfIsAttr_2,
  96. US_TV_IsAdultLanguage = BfIsAttr_3,
  97. US_TV_IsSexuallySuggestiveDialog = BfIsAttr_4,
  98. US_TV_ValidAttrSubmask = 31 // IsBlocked is not a valid attribute for TV
  99. } BfEnTvRat_Attributes_US_TV;
  100. typedef enum
  101. {
  102. MPAA_IsBlocked = BfIsBlocked,
  103. MPAA_ValidAttrSubmask = 1 // IsBlocked is not a valid attribute
  104. } BfEnTvRat_Attributes_MPAA;
  105. typedef enum
  106. {
  107. CAE_IsBlocked = BfIsBlocked,
  108. CAE_ValidAttrSubmask = 1 // IsBlocked is not a valid attribute
  109. } BfEnTvRat_Attributes_CAE_TV;
  110. typedef enum
  111. {
  112. CAF_IsBlocked = BfIsBlocked,
  113. CAF_ValidAttrSubmask = 1 // IsBlocked is not a valid attribute
  114. } BfEnTvRat_Attributes_CAF_TV;
  115. // -------------------------------------------------------
  116. // -------------------------------------------------------
  117. [
  118. object,
  119. uuid(C5C5C5B0-3ABC-11D6-B25B-00C04FA0C026),
  120. dual,
  121. helpstring("IXDSToRat Interface"),
  122. pointer_default(unique)
  123. ]
  124. interface IXDSToRat : IDispatch
  125. {
  126. [id(1), helpstring("method Init")]
  127. HRESULT Init();
  128. [id(2), helpstring("method ParseXDSBytePair")]
  129. HRESULT ParseXDSBytePair(
  130. [in] BYTE byte1,
  131. [in] BYTE byte2,
  132. [out] EnTvRat_System *pEnSystem,
  133. [out] EnTvRat_GenericLevel *pEnLevel,
  134. [out] LONG *plBfEnAttributes // bitfield of BfEnTvRat_GenericAttributes
  135. );
  136. };
  137. // ------------------------
  138. [
  139. object,
  140. uuid(C5C5C5B1-3ABC-11D6-B25B-00C04FA0C026),
  141. dual,
  142. helpstring("IEvalRat Interface"),
  143. pointer_default(unique)
  144. ]
  145. interface IEvalRat : IDispatch
  146. {
  147. [propget, id(1), helpstring("property BlockedRatingAttributes")]
  148. HRESULT BlockedRatingAttributes(
  149. [in] EnTvRat_System enSystem,
  150. [in] EnTvRat_GenericLevel enLevel,
  151. [out, retval] LONG *plbfAttrs // bitfield of BfEnTvRat_GenericAttributes
  152. );
  153. [propput, id(1), helpstring("property BlockedRatingAttributes")]
  154. HRESULT BlockedRatingAttributes(
  155. [in] EnTvRat_System enSystem,
  156. [in] EnTvRat_GenericLevel enLevel,
  157. [in] LONG lbfAttrs // bitfield of BfEnTvRat_GenericAttributes
  158. );
  159. [propget, id(2), helpstring("property BlockUnRated")]
  160. HRESULT BlockUnRated(
  161. [out, retval] BOOL *pfBlockUnRatedShows
  162. );
  163. [propput, id(2), helpstring("property BlockUnRated")]
  164. HRESULT BlockUnRated(
  165. [in] BOOL fBlockUnRatedShows
  166. );
  167. [ id(3), helpstring("method MostRestrictiveRating")]
  168. HRESULT MostRestrictiveRating(
  169. [in] EnTvRat_System enSystem1,
  170. [in] EnTvRat_GenericLevel enEnLevel1,
  171. [in] LONG lbfEnAttr1, // bitfield of BfEnTvRat_GenericAttributes
  172. [in] EnTvRat_System enSystem2,
  173. [in] EnTvRat_GenericLevel enEnLevel2,
  174. [in] LONG lbfEnAttr2, // bitfield of BfEnTvRat_GenericAttributes
  175. [out] EnTvRat_System *penSystem,
  176. [out] EnTvRat_GenericLevel *penEnLevel,
  177. [out] LONG *plbfEnAttr // bitfield of BfEnTvRat_GenericAttributes
  178. );
  179. [ id(4), helpstring("method TestRating")]
  180. HRESULT TestRating(
  181. [in] EnTvRat_System enShowSystem,
  182. [in] EnTvRat_GenericLevel enShowLevel,
  183. [in] LONG lbfEnShowAttributes // bitfield of BfEnTvRat_GenericAttributes
  184. );
  185. };
  186. // This is enforcing a particular implementation on folk...
  187. // Don't need this particular TypeLib, just as long
  188. // as some library/libraries exists that supports the two coClasses,
  189. // with the give ClassID's.
  190. [
  191. uuid(C5C5C500-3ABC-11D6-B25B-00C04FA0C026),
  192. version(1.0),
  193. helpstring("TvRatings 1.0 Type Library")
  194. ]
  195. library TVRATINGSLib
  196. {
  197. importlib("stdole32.tlb");
  198. importlib("stdole2.tlb");
  199. [
  200. uuid(C5C5C5F0-3ABC-11D6-B25B-00C04FA0C026),
  201. helpstring("XDSToRat Class")
  202. ]
  203. coclass XDSToRat
  204. {
  205. [default] interface IXDSToRat;
  206. };
  207. [
  208. uuid(C5C5C5F1-3ABC-11D6-B25B-00C04FA0C026),
  209. helpstring("EvalRat Class")
  210. ]
  211. coclass EvalRat
  212. {
  213. [default] interface IEvalRat;
  214. };
  215. };