Source code of Windows XP (NT5)
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.

427 lines
14 KiB

  1. // --------------------------------------------------------
  2. // EncDecTag.idl
  3. //
  4. //
  5. // Encrypter-Tagger/DeCrypter-Detagger filter definitions
  6. //
  7. //
  8. // Copyright (c) Microsoft, 2002
  9. // ---------------------------------------------------------
  10. //
  11. // Guide to CLSIDS:
  12. //
  13. // -- 8x Enc/dec Properties
  14. // -- 9x Tag Properties
  15. // -- Ax
  16. // -- Bx IFilter
  17. // -- Cx IFilterEvents
  18. // -- Dx IFilterConfig
  19. // -- Ex
  20. // -- Fx CFilter (coclass)
  21. //
  22. // x = 1 - Encrypter-Tagger
  23. // x = 2 - Decrypter-Detagger
  24. cpp_quote("//+-------------------------------------------------------------------------")
  25. cpp_quote("//")
  26. cpp_quote("// Microsoft Windows")
  27. cpp_quote("// Copyright (C) Microsoft Corporation, 2002.")
  28. cpp_quote("//")
  29. cpp_quote("//--------------------------------------------------------------------------")
  30. cpp_quote("#pragma once")
  31. import "oaidl.idl";
  32. import "ocidl.idl";
  33. import "TvRatings.idl";
  34. // -----------------
  35. // filter ClassID's
  36. cpp_quote ("// {C4C4C481-0049-4E2B-98FB-9537F6CE516D}")
  37. cpp_quote ("DEFINE_GUID(CLSID_ETFilterEncProperties,")
  38. cpp_quote ("0xC4C4C481, 0x0049, 0x4E2B, 0x98, 0xFB, 0x95, 0x37, 0xF6, 0xCE, 0x51, 0x6D);")
  39. cpp_quote ("// {C4C4C491-0049-4E2B-98FB-9537F6CE516D}")
  40. cpp_quote ("DEFINE_GUID(CLSID_ETFilterTagProperties,")
  41. cpp_quote ("0xC4C4C491, 0x0049, 0x4E2B, 0x98, 0xFB, 0x95, 0x37, 0xF6, 0xCE, 0x51, 0x6D);")
  42. /* CLSID defined in coclass below
  43. cpp_quote ("// {C4C4C4F1-0049-4E2B-98FB-9537F6CE516D}")
  44. cpp_quote ("DEFINE_GUID(CLSID_ETFilter,")
  45. cpp_quote ("0xC4C4C4F1, 0x0049, 0x4E2B, 0x98, 0xFB, 0x95, 0x37, 0xF6, 0xCE, 0x51, 0x6D);")
  46. */
  47. cpp_quote ("// {C4C4C482-0049-4E2B-98FB-9537F6CE516D}")
  48. cpp_quote ("DEFINE_GUID(CLSID_DTFilterEncProperties,")
  49. cpp_quote ("0xC4C4C482, 0x0049, 0x4E2B, 0x98, 0xFB, 0x95, 0x37, 0xF6, 0xCE, 0x51, 0x6D);")
  50. cpp_quote ("// {C4C4C492-0049-4E2B-98FB-9537F6CE516D}")
  51. cpp_quote ("DEFINE_GUID(CLSID_DTFilterTagProperties,")
  52. cpp_quote ("0xC4C4C492, 0x0049, 0x4E2B, 0x98, 0xFB, 0x95, 0x37, 0xF6, 0xCE, 0x51, 0x6D);")
  53. /*
  54. cpp_quote ("// {C4C4C4F2-0049-4E2B-98FB-9537F6CE516D}")
  55. cpp_quote ("DEFINE_GUID(CLSID_DTFilter,")
  56. cpp_quote ("0xC4C4C4F2, 0x0049, 0x4E2B, 0x98, 0xFB, 0x95, 0x37, 0xF6, 0xCE, 0x51, 0x6D);")
  57. */
  58. cpp_quote ("// {C4C4C482-0049-4E2B-98FB-9537F6CE516D}")
  59. cpp_quote ("DEFINE_GUID(CLSID_XDSCodecProperties,")
  60. cpp_quote ("0xC4C4C483, 0x0049, 0x4E2B, 0x98, 0xFB, 0x95, 0x37, 0xF6, 0xCE, 0x51, 0x6D);")
  61. cpp_quote ("// {C4C4C492-0049-4E2B-98FB-9537F6CE516D}")
  62. cpp_quote ("DEFINE_GUID(CLSID_XDSCodecTagProperties,")
  63. cpp_quote ("0xC4C4C493, 0x0049, 0x4E2B, 0x98, 0xFB, 0x95, 0x37, 0xF6, 0xCE, 0x51, 0x6D);")
  64. /*
  65. cpp_quote ("// {C4C4C4F3-0049-4E2B-98FB-9537F6CE516D}")
  66. cpp_quote ("DEFINE_GUID(CLSID_XDSCodec,")
  67. cpp_quote ("0xC4C4C4F3, 0x0049, 0x4E2B, 0x98, 0xFB, 0x95, 0x37, 0xF6, 0xCE, 0x51, 0x6D);")
  68. */
  69. cpp_quote ("// {C4C4C4FC-0049-4E2B-98FB-9537F6CE516D}")
  70. cpp_quote ("DEFINE_GUID(CLSID_CPCAFiltersCategory,")
  71. cpp_quote ("0xC4C4C4FC, 0x0049, 0x4E2B, 0x98, 0xFB, 0x95, 0x37, 0xF6, 0xCE, 0x51, 0x6D);")
  72. // broadcast eventID's
  73. // sent by XDSCodec when get a new rating
  74. cpp_quote ("// {C4C4C4E0-0049-4E2B-98FB-9537F6CE516D}")
  75. cpp_quote ("DEFINE_GUID(EVENTID_XDSCodecNewXDSRating,")
  76. cpp_quote ("0xC4C4C4E0, 0x0049, 0x4E2B, 0x98, 0xFB, 0x95, 0x37, 0xF6, 0xCE, 0x51, 0x6D);")
  77. // sent by XDSCodec when get a duplicate to a current non DontKnow rating
  78. cpp_quote ("// {C4C4C4DF-0049-4E2B-98FB-9537F6CE516D}")
  79. cpp_quote ("DEFINE_GUID(EVENTID_XDSCodecDuplicateXDSRating,")
  80. cpp_quote ("0xC4C4C4DF, 0x0049, 0x4E2B, 0x98, 0xFB, 0x95, 0x37, 0xF6, 0xCE, 0x51, 0x6D);")
  81. // sent by XDS Codec when get some other XDS packet
  82. cpp_quote ("// {C4C4C4E1-0049-4E2B-98FB-9537F6CE516D}")
  83. cpp_quote ("DEFINE_GUID(EVENTID_XDSCodecNewXDSPacket,")
  84. cpp_quote ("0xC4C4C4E1, 0x0049, 0x4E2B, 0x98, 0xFB, 0x95, 0x37, 0xF6, 0xCE, 0x51, 0x6D);")
  85. // sent by Decrypter/Detagger when rating changes
  86. cpp_quote ("// {C4C4C4E2-0049-4E2B-98FB-9537F6CE516D}")
  87. cpp_quote ("DEFINE_GUID(EVENTID_DTFilterRatingChange,")
  88. cpp_quote ("0xC4C4C4E2, 0x0049, 0x4E2B, 0x98, 0xFB, 0x95, 0x37, 0xF6, 0xCE, 0x51, 0x6D);")
  89. // sent by Decrypter/DeTagger when show rating exceeds max allowable
  90. cpp_quote ("// {C4C4C4E3-0049-4E2B-98FB-9537F6CE516D}")
  91. cpp_quote ("DEFINE_GUID(EVENTID_DTFilterRatingsBlock,")
  92. cpp_quote ("0xC4C4C4E3, 0x0049, 0x4E2B, 0x98, 0xFB, 0x95, 0x37, 0xF6, 0xCE, 0x51, 0x6D);")
  93. // sent by Decrypter/DeTagger when show rating drops below max allowable
  94. cpp_quote ("// {C4C4C4E4-0049-4E2B-98FB-9537F6CE516D}")
  95. cpp_quote ("DEFINE_GUID(EVENTID_DTFilterRatingsUnblock,")
  96. cpp_quote ("0xC4C4C4E4, 0x0049, 0x4E2B, 0x98, 0xFB, 0x95, 0x37, 0xF6, 0xCE, 0x51, 0x6D);")
  97. // sent by Decrypter/DeTagger when get new XDS packet
  98. cpp_quote ("// {C4C4C4E5-0049-4E2B-98FB-9537F6CE516D}")
  99. cpp_quote ("DEFINE_GUID(EVENTID_DTFilterXDSPacket,")
  100. cpp_quote ("0xC4C4C4E5, 0x0049, 0x4E2B, 0x98, 0xFB, 0x95, 0x37, 0xF6, 0xCE, 0x51, 0x6D);")
  101. // sent by Decrypter when data format is OK again (only after a failure)...
  102. cpp_quote ("// {C4C4C4EC-0049-4E2B-98FB-9537F6CE516D}")
  103. cpp_quote ("DEFINE_GUID(EVENTID_DTFilterDataFormatOK,")
  104. cpp_quote ("0xC4C4C4ED, 0x0049, 0x4E2B, 0x98, 0xFB, 0x95, 0x37, 0xF6, 0xCE, 0x51, 0x6D);")
  105. //cpp_quote ("0xC4C4C4EC, 0x0049, 0x4E2B, 0x98, 0xFB, 0x95, 0x37, 0xF6, 0xCE, 0x51, 0x6D);")
  106. // for now, Format errors act like License errors...
  107. // sent by Decrypter when data format is corrupt (old file?)
  108. cpp_quote ("// {C4C4C4ED-0049-4E2B-98FB-9537F6CE516D}")
  109. cpp_quote ("DEFINE_GUID(EVENTID_DTFilterDataFormatFailure,")
  110. cpp_quote ("0xC4C4C4EF, 0x0049, 0x4E2B, 0x98, 0xFB, 0x95, 0x37, 0xF6, 0xCE, 0x51, 0x6D);")
  111. //cpp_quote ("0xC4C4C4ED, 0x0049, 0x4E2B, 0x98, 0xFB, 0x95, 0x37, 0xF6, 0xCE, 0x51, 0x6D);")
  112. // sent by Encrypter or Decrypter when DRM license is OK again (only after a failure)...
  113. cpp_quote ("// {C4C4C4EE-0049-4E2B-98FB-9537F6CE516D}")
  114. cpp_quote ("DEFINE_GUID(EVENTID_ETDTFilterLicenseOK,")
  115. cpp_quote ("0xC4C4C4EE, 0x0049, 0x4E2B, 0x98, 0xFB, 0x95, 0x37, 0xF6, 0xCE, 0x51, 0x6D);")
  116. // sent by Encrypter or Decrypter when fail to get DRM license
  117. cpp_quote ("// {C4C4C4EF-0049-4E2B-98FB-9537F6CE516D}")
  118. cpp_quote ("DEFINE_GUID(EVENTID_ETDTFilterLicenseFailure,")
  119. cpp_quote ("0xC4C4C4EF, 0x0049, 0x4E2B, 0x98, 0xFB, 0x95, 0x37, 0xF6, 0xCE, 0x51, 0x6D);")
  120. // Other Guids
  121. // media subtype sent out of encrypter filter
  122. cpp_quote ("// {C4C4C4D0-0049-4E2B-98FB-9537F6CE516D}")
  123. cpp_quote ("DEFINE_GUID(MEDIASUBTYPE_ETDTFilter_Tagged,")
  124. cpp_quote ("0xC4C4C4D0, 0x0049, 0x4E2B, 0x98, 0xFB, 0x95, 0x37, 0xF6, 0xCE, 0x51, 0x6D);")
  125. // format block type sent out of encrypter filter
  126. // only used if no format block currently avaiable
  127. cpp_quote ("// {C4C4C4D1-0049-4E2B-98FB-9537F6CE516D}")
  128. cpp_quote ("DEFINE_GUID(FORMATTYPE_ETDTFilter_Tagged,")
  129. cpp_quote ("0xC4C4C4D1, 0x0049, 0x4E2B, 0x98, 0xFB, 0x95, 0x37, 0xF6, 0xCE, 0x51, 0x6D);")
  130. //------------------------------------------------------
  131. #ifndef REFERENCE_TIME
  132. typedef LONGLONG REFERENCE_TIME;
  133. #endif
  134. typedef LONG PackedTvRating; // internal storage format for 3-part TvRatings
  135. //------------------------------------------------------
  136. typedef enum EnTag_Mode // flags to turn various processing bits off
  137. { // (see d:\nt\public\sd
  138. EnTag_Remove = 0x0,
  139. EnTag_Once = 0x1,
  140. EnTag_Repeat = 0x2,
  141. } EnTag_Mode;
  142. [
  143. restricted,
  144. object,
  145. uuid (C4C4C4D1-0049-4E2B-98FB-9537F6CE516D),
  146. // dual
  147. helpstring("IETFilterConfig Interface"),
  148. pointer_default(unique)
  149. ]
  150. interface IETFilterConfig : IUnknown
  151. {
  152. [ id(10), helpstring("method InitLicense")]
  153. HRESULT InitLicense(
  154. [in] int LicenseId // which license (0-N to use)
  155. );
  156. [ id(11), helpstring("method GetSecureChannelObject")]
  157. HRESULT GetSecureChannelObject(
  158. [out] IUnknown **ppUnkDRMSecureChannel // an IDRMSecureChannel
  159. );
  160. };
  161. [
  162. restricted,
  163. object,
  164. uuid (C4C4C4D2-0049-4E2B-98FB-9537F6CE516D),
  165. // dual
  166. helpstring("IDTFilterConfig Interface"),
  167. pointer_default(unique)
  168. ]
  169. interface IDTFilterConfig : IUnknown
  170. {
  171. [ id(11), helpstring("method GetSecureChannelObject")]
  172. HRESULT GetSecureChannelObject(
  173. [out] IUnknown **ppUnkDRMSecureChannel // an IDRMSecureChannel
  174. );
  175. };
  176. [
  177. object,
  178. uuid (C4C4C4D3-0049-4E2B-98FB-9537F6CE516D),
  179. // dual
  180. helpstring("IXDSCodecConfig Interface"),
  181. pointer_default(unique)
  182. ]
  183. interface IXDSCodecConfig : IUnknown
  184. {
  185. // [propget, id(1), helpstring("property CCMode")] HRESULT CCMode([out, retval] int *pCCMode);
  186. };
  187. // --------------------------------
  188. [
  189. uuid(C4C4C400-0049-4E2B-98FB-9537F6CE516D),
  190. version(1.0),
  191. helpstring("Microsoft Encypter-Tagger/Decrypter-Detagger Filters")
  192. ]
  193. library EncDec
  194. {
  195. importlib("stdole32.tlb");
  196. importlib("stdole2.tlb");
  197. // importlib("TvRatings.tlb");
  198. [
  199. object,
  200. uuid (C4C4C4B1-0049-4E2B-98FB-9537F6CE516D),
  201. // dual
  202. helpstring("IETFilter Interface"),
  203. pointer_default(unique)
  204. ]
  205. interface IETFilter : IUnknown
  206. {
  207. [propget, id(1), helpstring("property EvalRatObjOK")]
  208. HRESULT EvalRatObjOK([out, retval] HRESULT *pHrCoCreateRetVal);
  209. [ id(2), helpstring("method GetCurrRating")]
  210. HRESULT GetCurrRating(
  211. [out] EnTvRat_System *pEnSystem,
  212. [out] EnTvRat_GenericLevel *pEnRating,
  213. [out] LONG *plbfEnAttr // bitfield of BfEnTvRat_GenericAttributes
  214. );
  215. };
  216. [
  217. uuid(C4C4C4C1-0049-4E2B-98FB-9537F6CE516D),
  218. helpstring("IETFilterEvents")
  219. ]
  220. dispinterface IETFilterEvents
  221. {
  222. properties:
  223. methods:
  224. };
  225. [
  226. uuid(C4C4C4F1-0049-4E2B-98FB-9537F6CE516D),
  227. helpstring("ETFilter Class")
  228. ]
  229. coclass ETFilter
  230. {
  231. [default] interface IETFilter;
  232. interface IETFilterConfig;
  233. [default, source] dispinterface IETFilterEvents;
  234. };
  235. // ---------------------------------------------------
  236. [
  237. object,
  238. uuid (C4C4C4B2-0049-4E2B-98FB-9537F6CE516D),
  239. // dual
  240. helpstring("IDTFilter Interface"),
  241. pointer_default(unique)
  242. ]
  243. interface IDTFilter : IUnknown
  244. {
  245. [propget, id(1), helpstring("property EvalRatObjOK")]
  246. HRESULT EvalRatObjOK([out, retval] HRESULT *pHrCoCreateRetVal);
  247. [ id(2), helpstring("method GetCurrRating")]
  248. HRESULT GetCurrRating(
  249. [out] EnTvRat_System *pEnSystem,
  250. [out] EnTvRat_GenericLevel *pEnRating,
  251. [out] LONG *plbfEnAttr // bitfield of BfEnTvRat_GenericAttributes
  252. );
  253. [propget, id(3), helpstring("property BlockedRatingAttributes")]
  254. HRESULT BlockedRatingAttributes(
  255. [in] EnTvRat_System enSystem,
  256. [in] EnTvRat_GenericLevel enLevel,
  257. [out, retval] LONG *plbfEnAttr
  258. );
  259. [propput, id(3), helpstring("property BlockedRatingAttributes")]
  260. HRESULT BlockedRatingAttributes(
  261. [in] EnTvRat_System enSystem,
  262. [in] EnTvRat_GenericLevel enLevel,
  263. [in] LONG lbfAttrs // bitfield of BfEnTvRat_GenericAttributes
  264. );
  265. [propget, id(4), helpstring("property BlockUnRated")]
  266. HRESULT BlockUnRated(
  267. [out, retval] BOOL *pfBlockUnRatedShows
  268. );
  269. [propput, id(4), helpstring("property BlockUnRated")]
  270. HRESULT BlockUnRated(
  271. [in] BOOL fBlockUnRatedShows
  272. );
  273. [propget, id(5), helpstring("property BlockUnRatedDelay")]
  274. HRESULT BlockUnRatedDelay(
  275. [out, retval] LONG *pmsecsDelayBeforeBlock
  276. );
  277. [propput, id(5), helpstring("property BlockUnRatedDelay")]
  278. HRESULT BlockUnRatedDelay(
  279. [in] LONG msecsDelayBeforeBlock
  280. );
  281. };
  282. [
  283. uuid(C4C4C4C2-0049-4E2B-98FB-9537F6CE516D),
  284. helpstring("IDTFilterEvents")
  285. ]
  286. dispinterface IDTFilterEvents
  287. {
  288. properties:
  289. methods:
  290. };
  291. [
  292. uuid(C4C4C4F2-0049-4E2B-98FB-9537F6CE516D),
  293. helpstring("CDTFilter Class")
  294. ]
  295. coclass DTFilter
  296. {
  297. [default] interface IDTFilter;
  298. interface IDTFilterConfig;
  299. [default, source] dispinterface IDTFilterEvents;
  300. };
  301. // ---------------------------------------------------
  302. [
  303. object,
  304. uuid (C4C4C4B3-0049-4E2B-98FB-9537F6CE516D),
  305. // dual
  306. helpstring("IXDSCodec Interface"),
  307. pointer_default(unique)
  308. ]
  309. interface IXDSCodec : IUnknown
  310. {
  311. [propget, id(1), helpstring("property XDSToRatObjOK")]
  312. HRESULT XDSToRatObjOK([out, retval] HRESULT *pHrCoCreateRetVal);
  313. [propput, id(2), helpstring("property CCSubstreamService")]
  314. HRESULT CCSubstreamService([in] long SubstreamMask);
  315. [propget, id(2), helpstring("property CCSubstreamService")]
  316. HRESULT CCSubstreamService([out, retval] long *pSubstreamMask);
  317. [ id(3), helpstring("method GetContentAdvisoryRating") ]
  318. HRESULT GetContentAdvisoryRating(
  319. [out] PackedTvRating *pRat, // TvRating
  320. [out] long *pPktSeqID,
  321. [out] long *pCallSeqID,
  322. [out] REFERENCE_TIME *pTimeStart, // time this sample started
  323. [out] REFERENCE_TIME *pTimeEnd
  324. );
  325. [ id(4), helpstring("method GetXDSPacket") ]
  326. HRESULT GetXDSPacket(
  327. [out] long *pXDSClassPkt, // ENUM EnXDSClass
  328. [out] long *pXDSTypePkt,
  329. [out] BSTR *pBstrXDSPkt,
  330. [out] long *pPktSeqID,
  331. [out] long *pCallSeqID,
  332. [out] REFERENCE_TIME *pTimeStart, // time this sample started
  333. [out] REFERENCE_TIME *pTimeEnd
  334. );
  335. };
  336. [
  337. uuid(C4C4C4C3-0049-4E2B-98FB-9537F6CE516D),
  338. helpstring("IXDSCodecEvents")
  339. ]
  340. dispinterface IXDSCodecEvents
  341. {
  342. properties:
  343. methods:
  344. };
  345. [
  346. uuid(C4C4C4F3-0049-4E2B-98FB-9537F6CE516D),
  347. helpstring("CXDSCodec Class")
  348. ]
  349. coclass XDSCodec
  350. {
  351. [default] interface IXDSCodec;
  352. interface IXDSCodecConfig;
  353. [default, source] dispinterface IXDSCodecEvents;
  354. };
  355. };