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.

442 lines
17 KiB

  1. //*****************************************************************************
  2. //
  3. // Microsoft Windows Media
  4. // Copyright (C) Microsoft Corporation. All rights reserved.
  5. //
  6. // FileName: datacontainer.idl
  7. //
  8. // Abstract:
  9. //
  10. //*****************************************************************************
  11. cpp_quote("//*****************************************************************************")
  12. cpp_quote("//")
  13. cpp_quote("// Microsoft Windows Media")
  14. cpp_quote("// Copyright (C) Microsoft Corporation. All rights reserved.")
  15. cpp_quote("//")
  16. cpp_quote("// Automatically generated by Midl from datacontainer.idl" )
  17. cpp_quote("//")
  18. cpp_quote("// DO NOT EDIT THIS FILE.")
  19. cpp_quote("//")
  20. cpp_quote("//*****************************************************************************")
  21. import "objidl.idl";
  22. import "WMSBuffer.idl";
  23. import "WMSContext.idl";
  24. import "DataContainerVersion.idl";
  25. import "wmsPacket.idl";
  26. interface IWMSDataSourcePlugin;
  27. interface IWMSDataSourcePluginCallback;
  28. interface IWMSDataContainer;
  29. interface IWMSDataContainerCallback;
  30. interface IWMSDirectory;
  31. interface IWMSPacketList;
  32. cpp_quote( "#define WMS_DATA_CONTAINER_NONSEEKABLE 0xFFFFFFFFFFFFFFFF" )
  33. cpp_quote( "EXTERN_GUID( IID_IWMSDataSourcePlugin, 0xE1CD3525,0x03D7,0x11d2,0x9E,0xED,0x00,0x60,0x97,0xD2,0xD7,0xCF );" )
  34. cpp_quote( "EXTERN_GUID( IID_IWMSDataSourcePluginCallback, 0xE1CD3526,0x03D7,0x11d2,0x9E,0xED,0x00,0x60,0x97,0xD2,0xD7,0xCF );" )
  35. cpp_quote( "EXTERN_GUID( IID_IWMSDataContainer, 0xE6EE9A13,0x0FCC,0x11d2,0x9E,0xEE,0x00,0x60,0x97,0xD2,0xD7,0xCF );" )
  36. cpp_quote( "EXTERN_GUID( IID_IWMSDataContainerCallback, 0x2E34AB82,0x0D3D,0x11d2,0x9E,0xEE,0x00,0x60,0x97,0xD2,0xD7,0xCF );" )
  37. cpp_quote( "EXTERN_GUID( IID_IWMSDirectory, 0x6fa365e7, 0xe8b9, 0x437a, 0x8c, 0x4b, 0x65, 0x52, 0xdf, 0xbb, 0xc, 0x57 );" )
  38. // {9B6C9E51-4813-11d2-9EFF-006097D2D7CF}
  39. cpp_quote( "EXTERN_GUID( IID_IWMSUnknownFormat, 0x9b6c9e51, 0x4813, 0x11d2, 0x9e, 0xff, 0x00, 0x60, 0x97, 0xd2, 0xd7, 0xcf );" )
  40. // {7408CEB0-3A5A-41b6-A5EC-9A4E811C9673}
  41. cpp_quote( "EXTERN_GUID( IID_IWMSDirectoryFormat, 0x7408ceb0, 0x3a5a, 0x41b6, 0xa5, 0xec, 0x9a, 0x4e, 0x81, 0x1c, 0x96, 0x73 );" )
  42. // {c34294ea-e111-4fb2-be6b-ec686a1a9757}
  43. cpp_quote( "EXTERN_GUID( IID_IWMSPlaylistSmilFormat, 0xc34294ea, 0xe111, 0x4fb2, 0xbe, 0x6b, 0xec, 0x68, 0x6a, 0x1a, 0x97, 0x57 );" )
  44. // Flags for OpenDataContainer
  45. typedef [public] enum WMS_DATA_CONTAINER_OPEN_FLAGS
  46. {
  47. WMS_DATA_CONTAINER_READ_ACCESS = 0x0001,
  48. WMS_DATA_CONTAINER_WRITE_ACCESS = 0x0002,
  49. WMS_DATA_CONTAINER_CREATE_NEW_CONTAINER = 0x0004,
  50. WMS_DATA_CONTAINER_ALLOW_BUFFER_IO = 0x0008,
  51. WMS_DATA_CONTAINER_SHARED_SOURCE = 0x0010
  52. } WMS_DATA_CONTAINER_OPEN_FLAGS;
  53. // These are the flags set in each WMSDirectoryEntryInfo
  54. typedef [public] enum WMS_DIRECTORY_ENTRY_FLAGS
  55. {
  56. WMS_DIRECTORY_ENTRY_IS_DIRECTORY = 0x0001
  57. } WMS_DIRECTORY_ENTRY_FLAGS;
  58. // These are the values requested from GetInfo.
  59. typedef [public] enum WMS_DATA_CONTAINER_GETINFO_VALUES
  60. {
  61. WMS_DATA_CONTAINER_SIZE = 1,
  62. WMS_DATA_CONTAINER_MAX_SUPPORTED_READ_SIZE = 2
  63. } WMS_DATA_CONTAINER_GETINFO_VALUES;
  64. // These are the flags passed to OnGetInfo.
  65. // This flag tells you whether the position parameter is
  66. // used in the read and write methods.
  67. typedef [public] enum WMS_DATA_CONTAINER_GETINFO_FLAGS
  68. {
  69. WMS_SEEKABLE_CONTAINER = 0x0001,
  70. WMS_LOCAL_DATA_CONTAINER = 0x0002
  71. } WMS_DATA_CONTAINER_GETINFO_FLAGS;
  72. // These are the flags returned by GetDataSourceAttributes.
  73. typedef [public] enum WMS_DATA_CONTAINER_ATTRIBUTES
  74. {
  75. WMS_DATA_CONTAINER_SUPPORTS_ENUMERATION = 0x0001
  76. } WMS_DATA_CONTAINER_ATTRIBUTES;
  77. typedef unsigned __int64 QWORD;
  78. //////////////////////////////////////////////////////////////////////////////
  79. //
  80. // STORAGE SYSTEM
  81. //
  82. // This manages the name space for a particular storage model, like
  83. // a file system, a network, etc.
  84. //////////////////////////////////////////////////////////////////////////////
  85. //////////////////////////////////////////////////////////////////////////////
  86. [
  87. object,
  88. pointer_default(unique),
  89. uuid(E1CD3525-03D7-11d2-9EED-006097D2D7CF),
  90. version(9.0),
  91. helpstring("Provides methods to manage data containers and retrieve information about them.")
  92. ]
  93. interface IWMSDataSourcePlugin : IUnknown
  94. {
  95. [helpstring("Retrieves the attribute flags associated with a data container.")] HRESULT
  96. GetDataSourceAttributes(
  97. [out] DWORD *pdwFlags
  98. );
  99. [helpstring("Retrieves the physical paths of the root directories associated with a data container.")] HRESULT
  100. GetRootDirectories(
  101. [in] LPWSTR *pstrRootDirectoryList,
  102. [in] DWORD dwMaxRoots,
  103. [in] IWMSDataSourcePluginCallback *pCallback,
  104. [in] QWORD qwContext
  105. );
  106. [helpstring("Opens or creates a data container.")] HRESULT
  107. OpenDataContainer(
  108. [in] IWMSCommandContext *pCommandContext,
  109. [in] IWMSContext *pUserContext,
  110. [in] IWMSContext *pPresentationContext,
  111. [in] LPWSTR pszContainerName,
  112. [in] DWORD dwFlags,
  113. [in] IWMSBufferAllocator *pBufferAllocator,
  114. [in] IWMSDataSourcePluginCallback *pCallback,
  115. [in] QWORD qwContext
  116. );
  117. [helpstring("Opens a directory data container.")] HRESULT
  118. OpenDirectory(
  119. [in] IWMSCommandContext *pCommandContext,
  120. [in] IWMSContext *pUserContext,
  121. [in] IWMSContext *pPresentationContext,
  122. [in] LPWSTR pszContainerName,
  123. [in] DWORD dwFlags,
  124. [in] IWMSBufferAllocator *pBufferAllocator,
  125. [in] IWMSDataSourcePluginCallback *pCallback,
  126. [in] QWORD qwContext
  127. );
  128. [helpstring("Deletes a data container.")] HRESULT
  129. DeleteDataContainer(
  130. [in] LPWSTR pszContainerName,
  131. [in] DWORD dwFlags,
  132. [in] IWMSDataSourcePluginCallback *pCallback,
  133. [in] QWORD qwContext
  134. );
  135. [helpstring("Retrieves version information about a data container.")] HRESULT
  136. GetDataContainerVersion(
  137. [in] IWMSCommandContext *pCommandContext,
  138. [in] IWMSContext *pUserContext,
  139. [in] IWMSContext *pPresContext,
  140. [in] LPWSTR pszContainerName,
  141. [in] DWORD dwFlags,
  142. [in] IWMSDataSourcePluginCallback *pCallback,
  143. [in] QWORD qwContext
  144. );
  145. [helpstring("Creates a directory data container.")] HRESULT
  146. CreateDataSourceDirectory(
  147. [in] IWMSCommandContext *pCommandContext,
  148. [in] LPWSTR pszContainerName,
  149. [in] DWORD dwFlags,
  150. [in] IWMSDataSourcePluginCallback *pCallback,
  151. [in] QWORD qwContext
  152. );
  153. [helpstring("Removes a directory data container.")] HRESULT
  154. DeleteDirectory(
  155. [in] LPWSTR pszContainerName,
  156. [in] DWORD dwFlags,
  157. [in] IWMSDataSourcePluginCallback *pCallback,
  158. [in] QWORD qwContext
  159. );
  160. }; // IWMSDataSourcePlugin
  161. //////////////////////////////////////////////////////////////////////////////
  162. [
  163. object,
  164. pointer_default(unique),
  165. uuid(E1CD3526-03D7-11d2-9EED-006097D2D7CF),
  166. version(9.0),
  167. helpstring("Provides methods to return the results of IWMSDataContainer method calls.")
  168. ]
  169. interface IWMSDataSourcePluginCallback : IUnknown
  170. {
  171. [helpstring("Called by a data source plug-in to return the result of the IWMSDataContainer::OpenDataContainer method call.")] HRESULT
  172. OnOpenDataContainer(
  173. [in] HRESULT hr,
  174. [in] IWMSDataContainer *pDataContainer,
  175. [in] QWORD qwContext
  176. );
  177. [helpstring("Called by a data source plug-in to return the result of the IWMSDataContainer::OpenDirectory method call.")] HRESULT
  178. OnOpenDirectory(
  179. [in] HRESULT hr,
  180. [in] IWMSDirectory *pDirectory,
  181. [in] QWORD qwContext
  182. );
  183. [helpstring("Reserved for future use.")] HRESULT
  184. OnOpenPacketStreamDataContainer(
  185. [in] HRESULT hr,
  186. [in] IUnknown *pLiveDataContainer,
  187. [in] QWORD qwContext
  188. );
  189. [helpstring("Called by a data source plug-in to return the result of the IWMSDataContainer::DeleteDataContainer method call")] HRESULT
  190. OnDeleteDataContainer(
  191. [in] HRESULT hr,
  192. [in] QWORD qwContext
  193. );
  194. [helpstring("Called by a data source plug-in to return the result of the IWMSDataContainer::GetDataContainerVersion method call.")] HRESULT
  195. OnGetDataContainerVersion(
  196. [in] HRESULT hr,
  197. [in] IWMSDataContainerVersion *pVersion,
  198. [in] QWORD qwContext
  199. );
  200. [helpstring("Called by a data source plug-in to return the result of the IWMSDataContainer::GetRootDirectories method call.")] HRESULT
  201. OnGetRootDirectories(
  202. [in] HRESULT hr,
  203. [in] DWORD dwNumReturnedRoots,
  204. [in] DWORD dwTotalNumRoots,
  205. [in] QWORD qwContext
  206. );
  207. [helpstring("Called by a data source plug-in to return the result of the IWMSDataContainer::CreateDirectory method call.")] HRESULT
  208. OnCreateDirectory(
  209. [in] HRESULT hr,
  210. [in] QWORD qwContext
  211. );
  212. [helpstring("Called by a data source plug-in to return the result of the IWMSDataContainer::DeleteDirectory method call.")] HRESULT
  213. OnDeleteDirectory(
  214. [in] HRESULT hr,
  215. [in] QWORD qwContext
  216. );
  217. };
  218. //////////////////////////////////////////////////////////////////////////////
  219. typedef struct
  220. {
  221. LPOLESTR pstrName;
  222. DWORD dwFlags;
  223. QWORD qwSize;
  224. } WMSDirectoryEntryInfo;
  225. //////////////////////////////////////////////////////////////////////////////
  226. //
  227. // DATA CONTAINER
  228. //
  229. //////////////////////////////////////////////////////////////////////////////
  230. //////////////////////////////////////////////////////////////////////////////
  231. [
  232. object,
  233. pointer_default(unique),
  234. uuid(E6EE9A13-0FCC-11d2-9EEE-006097D2D7CF),
  235. version(9.0),
  236. helpstring("Provides methods to manage a data container.")
  237. ]
  238. interface IWMSDataContainer : IUnknown
  239. {
  240. // Return IID_IWMSUnknownFormat if you don't know the format.
  241. [helpstring("Retrieves a GUID that identifies the format of the data container.")] HRESULT
  242. GetContainerFormat( [out] GUID *pFormat );
  243. // Return a pointer to the data source plugin that controls this container.
  244. [helpstring("Retrieves a pointer to the data source plug-in that created the data container.")] HRESULT
  245. GetDataSourcePlugin( [out] IWMSDataSourcePlugin **ppDataSource );
  246. [helpstring("Retrieves information about the data container.")] HRESULT
  247. GetInfo(
  248. [in] DWORD dwInfoValueId,
  249. [in] IWMSDataContainerCallback *pCallback,
  250. [in] QWORD qwContext
  251. );
  252. [helpstring("Reads data from the data container.")] HRESULT
  253. Read(
  254. [in] BYTE *pbBuffer,
  255. [in] QWORD qwOffset, // Must be WMS_DATA_CONTAINER_NONSEEKABLE for a non-seekable device
  256. [in] DWORD dwMaxDataSize,
  257. [in] DWORD dwFlags,
  258. [in] IWMSDataContainerCallback *pCallback,
  259. [in] QWORD qwContext
  260. );
  261. // Non-writeable devices may always return an error.
  262. [helpstring("Writes data from a buffer to the data container.")] HRESULT
  263. Write(
  264. [in] BYTE *pbBuffer,
  265. [in] DWORD dwDataSize,
  266. [in] QWORD qwWritePosition, // Must be WMS_DATA_CONTAINER_NONSEEKABLE for a non-seekable device
  267. [in] IWMSDataContainerCallback *pCallback,
  268. [in] QWORD qwContext
  269. );
  270. // There is no seek, Instead, the GetData methods specify the
  271. // position.
  272. // Get a natural sized block (the transfer size between disk
  273. // and memory) that includes this position.
  274. // Will be called before every call to Read or Write
  275. [helpstring("Retrieves the optimal offset and buffer size, in bytes, to use for read and write access.")] HRESULT
  276. GetTransferParameters(
  277. [in] QWORD qwDesiredOffset,
  278. [in] DWORD dwDesiredMinSize,
  279. [in] DWORD dwDesiredMaxSize,
  280. [out] QWORD *pqwOffset, // Will return WMS_DATA_CONTAINER_NONSEEKABLE for a non-seekable device
  281. [out] DWORD *pdwSize,
  282. [out] DWORD *pdwBufferAlignment
  283. );
  284. [helpstring("Reserved for future use.")] HRESULT
  285. DoDataContainerExtendedCommand(
  286. [in] LPWSTR szCommandName,
  287. [in] IWMSCommandContext *pCommand,
  288. [in] DWORD dwCallFlags,
  289. [in] IWMSDataContainerCallback *pCallback,
  290. [in] QWORD qwContext
  291. );
  292. [helpstring("Modifies data that is sent to a media parser after the media parser has converted it into one or more packet lists.")] HRESULT
  293. FinishParsingPacketlist(
  294. [in] IWMSPacketList *pPacketList
  295. );
  296. }; // IWMSDataContainer
  297. //////////////////////////////////////////////////////////////////////////////
  298. [
  299. object,
  300. pointer_default(unique),
  301. uuid(2E34AB82-0D3D-11d2-9EEE-006097D2D7CF),
  302. version(9.0),
  303. helpstring("Provides methods to return the results of IWMSDataContainer method calls.")
  304. ]
  305. interface IWMSDataContainerCallback : IUnknown
  306. {
  307. [helpstring("Called by a data source plug-in to return the result of the IWMSDataContainer::GetInfo method call to the server.")] HRESULT
  308. OnGetInfo(
  309. [in] HRESULT hr,
  310. [in] DWORD dwFlags,
  311. [in] QWORD qwInfoValue,
  312. [in] QWORD qwContext
  313. );
  314. [helpstring("Called by a data source plug-in to return the result of the IWMSDataContainer::Read method call.")] HRESULT
  315. OnRead(
  316. [in] HRESULT hr,
  317. [in] DWORD dwActualBytesTransferred,
  318. [in] DWORD dwChangeType,
  319. [in] QWORD qwChangeParameter,
  320. [in] QWORD qwContext
  321. );
  322. [helpstring("Called by a data source plug-in to return the result of the IWMSDataContainer::Write method call.")] HRESULT
  323. OnWrite(
  324. [in] HRESULT hr,
  325. [in] DWORD dwActualBytesTransferred,
  326. [in] QWORD qwContext
  327. );
  328. [helpstring("Reserved for future use.")] HRESULT
  329. OnDoDataContainerExtendedCommand(
  330. [in] HRESULT hr,
  331. [in] QWORD qwContext
  332. );
  333. }; // IWMSDataContainerCallback
  334. //////////////////////////////////////////////////////////////////////////////
  335. //
  336. // DIRECTORIES
  337. //
  338. // This is a snapshot of the current state of the directory, like a collection.
  339. //////////////////////////////////////////////////////////////////////////////
  340. //////////////////////////////////////////////////////////////////////////////
  341. [
  342. object,
  343. pointer_default(unique),
  344. uuid(6FA365E7-E8B9-437a-8C4B-6552DFBB0C57),
  345. version(9.0),
  346. helpstring("Provides methods for navigating the structure of a directory data container.")
  347. ]
  348. interface IWMSDirectory : IUnknown
  349. {
  350. // Return a pointer to the data source plugin that controls this directory.
  351. [helpstring("Retrieves a pointer to the data source plug-in that created the directory data container.")] HRESULT
  352. GetDataSourcePlugin( [out] IWMSDataSourcePlugin **ppDataSource );
  353. // Return the full path of this directory including the URL scheme
  354. [helpstring("Retrieves the full path of the directory, including the URL scheme.")] HRESULT
  355. GetName( [out] LPOLESTR *pstrValue );
  356. // Enumerate children. First child index is 0, and this returns
  357. // S_FALSE if dwIndex is too large.
  358. [helpstring("Retrieves information about a specific child in a directory data container.")] HRESULT
  359. GetChildInfo(
  360. [in] DWORD dwIndex,
  361. [out] WMSDirectoryEntryInfo *pInfo
  362. );
  363. };