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.

401 lines
11 KiB

  1. //
  2. // Copyright (c) Microsoft Corporation. All rights reserved.
  3. //
  4. cpp_quote("/* Copyright (c) Microsoft Corporation. All rights reserved. */")
  5. // This file will be processed by the MIDL tool to
  6. // produce the type library (termmgr.tlb) and marshalling code.
  7. #ifndef __TERMINAL_MANAGER_IDL__
  8. #define __TERMINAL_MANAGER_IDL__
  9. // Doesn't seem to work: midl_pragma warning( disable: 2039 );
  10. import "Objsafe.idl";
  11. import "tapi3if.idl"; // for TERMINAL_STATE, etc.
  12. import "tapi3ds.idl"; // for MST interfaces
  13. import "strmif.idl"; // for IGraphBuilder, IBaseFilter, etc.
  14. import "msp.idl"; // for MSP_HANDLE
  15. typedef enum
  16. {
  17. TMGR_TD_CAPTURE = 1,
  18. TMGR_TD_RENDER = 2,
  19. TMGR_TD_BOTH = 3
  20. } TMGR_DIRECTION;
  21. const BSTR CLSID_String_VideoSuperclass = L"{714C6F8C-6244-4685-87B3-B91F3F9EADA7}";
  22. const BSTR CLSID_String_StreamingSuperclass = L"{214F4ACC-AE0B-4464-8405-07029003F8E2}";
  23. const BSTR CLSID_String_FileSuperclass = L"{B4790031-56DB-4d3e-88C8-6FFAAFA08A91}";
  24. //
  25. // This interface is implemented on all DirectShow terminals. It provides
  26. // methods for connection, disconnection, and dynamic filter graph control.
  27. //
  28. [
  29. uuid( AED6483B-3304-11d2-86F1-006008B0E5D2 ),
  30. helpstring("ITTerminalControl interface"),
  31. dual
  32. ]
  33. interface ITTerminalControl : IUnknown
  34. {
  35. [id(1), propget, helpstring("method get_AddressHandle")]
  36. HRESULT AddressHandle(
  37. [out] MSP_HANDLE * phtAddress
  38. );
  39. // enters each of the internal filters into the filter graph
  40. // connects the internal filters together (if applicable)
  41. // and returns a set of pins for connection
  42. [id(2), helpstring("method ConnectTerminal")]
  43. HRESULT ConnectTerminal(
  44. [in] IGraphBuilder * pGraph,
  45. [in] DWORD dwTerminalDirection,
  46. [in, out] DWORD * pdwNumPins,
  47. [out] IPin ** ppPins
  48. );
  49. [id(3), helpstring("method CompleteConnectTerminal")]
  50. HRESULT CompleteConnectTerminal(
  51. );
  52. // disconnects the internal filters and removes them from the filter graph
  53. // filter graph parameter is used for validation, to make sure the terminal
  54. // is disconnected from the same graph that it was originally connected to
  55. [id(4), helpstring("method DisconnectTerminal")]
  56. HRESULT DisconnectTerminal(
  57. [in] IGraphBuilder * pGraph,
  58. [in] DWORD dwReserved
  59. );
  60. // stops the rightmost render filter in the terminal
  61. // (needed for dynamic filter graphs)
  62. [id(5), helpstring("method RunRenderFilter")]
  63. HRESULT RunRenderFilter(
  64. );
  65. // stops the rightmost render filter in the terminal
  66. // (needed for dynamic filter graphs)
  67. [id(6), helpstring("method StopRenderFilter")]
  68. HRESULT StopRenderFilter(
  69. );
  70. }
  71. //
  72. // this interface is implemented by pluggable terminals
  73. //
  74. [
  75. uuid(AED6483C-3304-11d2-86F1-006008B0E5D2),
  76. helpstring("TAPI 3.0 ITPluggableTerminalInitialization interface"),
  77. dual
  78. ]
  79. interface ITPluggableTerminalInitialization : IUnknown
  80. {
  81. [id(1), helpstring("method InitializeDynamic")]
  82. HRESULT InitializeDynamic (
  83. [in] IID iidTerminalClass,
  84. [in] DWORD dwMediaType,
  85. [in] TERMINAL_DIRECTION Direction,
  86. [in] MSP_HANDLE htAddress
  87. );
  88. }
  89. [
  90. object,
  91. uuid(7170F2DE-9BE3-11D0-A009-00AA00B605A4),
  92. helpstring("ITTerminalManager Interface"),
  93. pointer_default(unique),
  94. hidden
  95. ]
  96. interface ITTerminalManager : IUnknown
  97. {
  98. [id(1), helpstring("method GetDynamicTerminalClasses")]
  99. HRESULT GetDynamicTerminalClasses(
  100. [in] DWORD dwMediaTypes,
  101. [in, out] DWORD * pdwNumClasses,
  102. [out] IID * pTerminalClasses
  103. );
  104. [id(2), helpstring("method CreateDynamicTerminal")]
  105. HRESULT CreateDynamicTerminal(
  106. [in] IUnknown * pOuterUnknown,
  107. [in] IID iidTerminalClass,
  108. [in] DWORD dwMediaType,
  109. [in] TERMINAL_DIRECTION Direction,
  110. [in] MSP_HANDLE htAddress,
  111. [out] ITTerminal ** ppTerminal
  112. );
  113. };
  114. [
  115. uuid(BB33DEC6-B2C7-46E6-9ED1-498B91FA85AC),
  116. helpstring("ITTerminalManager2 Interface"),
  117. pointer_default(unique),
  118. hidden
  119. ]
  120. interface ITTerminalManager2 : ITTerminalManager
  121. {
  122. [id(3), helpstring("method GetPluggableSuperclasses")]
  123. HRESULT GetPluggableSuperclasses(
  124. [in, out] DWORD * pdwNumSuperclasses,
  125. [out] IID * pSuperclasses
  126. );
  127. [id(4), helpstring("method GetPluggableTerminalClasses")]
  128. HRESULT GetPluggableTerminalClasses(
  129. [in] IID iidSuperclass,
  130. [in] DWORD dwMediaTypes,
  131. [in, out] DWORD * pdwNumClasses,
  132. [out] IID * pTerminalClasses
  133. );
  134. };
  135. //
  136. // --- ITPluggableTerminal ---
  137. // This interface describes the registry entry for a terminal
  138. //
  139. [
  140. object,
  141. uuid(924A3723-A00B-4f5f-9FEE-8E9AEB9E82AA),
  142. dual,
  143. helpstring("ITPluggableTerminalClassRegistration Interface"),
  144. pointer_default(unique)
  145. ]
  146. interface ITPluggableTerminalClassRegistration : IDispatch
  147. {
  148. //
  149. // Terminal Friendly Name
  150. //
  151. [id(1), propget, helpstring("property Name")]
  152. HRESULT Name(
  153. [out, retval] BSTR* pName
  154. );
  155. [id(1), propput, helpstring("property Name")]
  156. HRESULT Name(
  157. [in] BSTR bstrName
  158. );
  159. //
  160. // Company name
  161. //
  162. [id(2), propget, helpstring("property Company")]
  163. HRESULT Company(
  164. [out, retval] BSTR* pCompany
  165. );
  166. [id(2), propput, helpstring("property Company")]
  167. HRESULT Company(
  168. [in] BSTR bstrCompany
  169. );
  170. //
  171. // Terminal Version
  172. //
  173. [id(3), propget, helpstring("property Version")]
  174. HRESULT Version(
  175. [out, retval] BSTR* pVersion
  176. );
  177. [id(3), propput, helpstring("property Version")]
  178. HRESULT Version(
  179. [in] BSTR bstrVersion
  180. );
  181. //
  182. // TerminalClass
  183. //
  184. [id(4), propget, helpstring("property TerminalClass")]
  185. HRESULT TerminalClass(
  186. [out, retval] BSTR* pTerminalClass
  187. );
  188. [id(4), propput, helpstring("property TerminalClass")]
  189. HRESULT TerminalClass(
  190. [in] BSTR bstrTerminalClass
  191. );
  192. //
  193. // This CLSID is used to CoCreate the terminal
  194. //
  195. [id(5), propget, helpstring("property CLSID")]
  196. HRESULT CLSID(
  197. [out, retval] BSTR* pCLSID
  198. );
  199. [id(5), propput, helpstring("property CLSID")]
  200. HRESULT CLSID(
  201. [in] BSTR bstrCLSID
  202. );
  203. //
  204. // Direction supported by terminal
  205. //
  206. [id(6), propget, helpstring("property Direction")]
  207. HRESULT Direction(
  208. [out, retval] TMGR_DIRECTION* pDirection
  209. );
  210. [id(6), propput, helpstring("property Direction")]
  211. HRESULT Direction(
  212. [in] TMGR_DIRECTION nDirection
  213. );
  214. //
  215. // Media Types supported by terminal
  216. //
  217. [id(7), propget, helpstring("property MediaTypes")]
  218. HRESULT MediaTypes(
  219. [out, retval] long* pMediaTypes
  220. );
  221. [id(7), propput, helpstring("property MediaTypes")]
  222. HRESULT MediaTypes(
  223. [in] long nMediaTypes
  224. );
  225. //
  226. // Add terminal into the registry
  227. // If already exist an entry for terminal
  228. // edit this entry
  229. //
  230. [id(8), helpstring("method Add")]
  231. HRESULT Add(
  232. [in] BSTR bstrSuperclass
  233. );
  234. //
  235. // Delete the temrinal entry from registry
  236. //
  237. [id(9), helpstring("method Delete")]
  238. HRESULT Delete(
  239. [in] BSTR bstrSuperclass
  240. );
  241. //
  242. // Get all information from registry for
  243. // specific terminal
  244. //
  245. [id(10), helpstring("method GetTerminalClassInfo")]
  246. HRESULT GetTerminalClassInfo(
  247. [in] BSTR bstrSuperclass
  248. );
  249. };
  250. //
  251. // --- ITPluggableTerminalSuperlassRegistration ---
  252. // This interface describes the registry entry for a terminal superclass
  253. //
  254. [
  255. object,
  256. uuid(60D3C08A-C13E-4195-9AB0-8DE768090F25),
  257. dual,
  258. helpstring("ITPluggableTerminalSuperclassRegistration Interface"),
  259. pointer_default(unique)
  260. ]
  261. interface ITPluggableTerminalSuperclassRegistration : IDispatch
  262. {
  263. [id(1), propget, helpstring("property Name")]
  264. HRESULT Name(
  265. [out, retval] BSTR* pName
  266. );
  267. [id(1), propput, helpstring("property Name")]
  268. HRESULT Name(
  269. [in] BSTR bstrName
  270. );
  271. [id(2), propget, helpstring("property CLSID")]
  272. HRESULT CLSID(
  273. [out, retval] BSTR* pCLSID
  274. );
  275. [id(2), propput, helpstring("property CLSID")]
  276. HRESULT CLSID(
  277. [in] BSTR bstrCLSID
  278. );
  279. [id(3), helpstring("method Add")]
  280. HRESULT Add(
  281. );
  282. [id(4), helpstring("method Delete")]
  283. HRESULT Delete(
  284. );
  285. [id(5), helpstring("method GetTerminalSuperclassInfo")]
  286. HRESULT GetTerminalSuperclassInfo(
  287. );
  288. [id(6), propget, helpstring("method TerminalClasses")]
  289. HRESULT TerminalClasses(
  290. [out, retval] VARIANT* pTerminals
  291. );
  292. [id(7), helpstring("method EnumerateTerminalClasses"), hidden]
  293. HRESULT EnumerateTerminalClasses(
  294. [out, retval] IEnumTerminalClass** ppTerminals
  295. );
  296. };
  297. [
  298. uuid(28DCD85B-ACA4-11D0-A028-00AA00B605A4),
  299. version(1.0),
  300. helpstring("TAPI3 Terminal Manager 1.0 Type Library")
  301. ]
  302. library TERMMGRLib
  303. {
  304. importlib("stdole2.tlb");
  305. [
  306. uuid(7170F2E0-9BE3-11D0-A009-00AA00B605A4),
  307. helpstring("TAPI 3.0 TerminalManager Class"),
  308. hidden
  309. ]
  310. coclass TerminalManager
  311. {
  312. [default] interface ITTerminalManager;
  313. };
  314. [
  315. uuid(BB918E32-2A5C-4986-AB40-1686A034390A),
  316. helpstring("PluggableTerminalSuperclass Class")
  317. ]
  318. coclass PluggableSuperclassRegistration
  319. {
  320. [default] interface ITPluggableTerminalSuperclassRegistration;
  321. };
  322. [
  323. uuid(45234E3E-61CC-4311-A3AB-248082554482),
  324. helpstring("PluggableTerminalClass Class")
  325. ]
  326. coclass PluggableTerminalRegistration
  327. {
  328. [default] interface ITPluggableTerminalClassRegistration;
  329. };
  330. };
  331. #endif // __TERMINAL_MANAGER_IDL__