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.

397 lines
11 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1995.
  5. //
  6. // File: webchk.idl
  7. //
  8. // Contents:
  9. //
  10. // Classes:
  11. //
  12. // Functions:
  13. //
  14. // History: 11-17-1996 JohannP (Johann Posch) Created
  15. //
  16. //----------------------------------------------------------------------------
  17. import "objidl.idl";
  18. import "oleidl.idl";
  19. interface IOInetItem;
  20. interface IOInetDestination;
  21. // the client exposes this interfaces
  22. interface IOInetItemSink;
  23. interface IOInetItemFilter;
  24. // the core of the webcheck agent
  25. interface IOInetAgent;
  26. //interface IOInetSpooler;
  27. //+---------------------------------------------------------------------------
  28. //
  29. // Copyright (C) Microsoft Corporation, 1995 - 1996.
  30. //
  31. // Contents: IOInetItem interface definition
  32. //
  33. // Description:
  34. //
  35. // An item is an object which might be delivered by
  36. // a protocol or the client which should be delivered
  37. // to a destination at a given "WHEN"
  38. //
  39. // The data for an item might not be available as the item
  40. // gets announced for availability.
  41. //
  42. // Many items will in fact arrive with all data.
  43. //
  44. // The same object will expose I(Async)Moniker and the client
  45. // can call BindToXXX to bind to the object of the data.
  46. //
  47. //----------------------------------------------------------------------------
  48. cpp_quote("#ifndef _LPWCHKITEM")
  49. cpp_quote("#define _LPWCHKITEM")
  50. [
  51. local,
  52. object,
  53. uuid(79eacbe1-baf9-11ce-8c82-00aa004ba90b),
  54. pointer_default(unique)
  55. ]
  56. interface IOInetItem : IUnknown
  57. {
  58. typedef [unique] IOInetItem *LPWCHKITEM;
  59. typedef enum _tagITEMDATA_FLAGS
  60. {
  61. ID_FROMCACHE = 0x00000001
  62. } ITEMDATA_FLAGS;
  63. typedef enum _tagITEM_TYPE
  64. {
  65. IT_ANOUNCMENT = 1
  66. ,IT_ALERT
  67. ,IT_ALERT_NO_ITEM
  68. ,IT_DATA
  69. } ITEMTYPE;
  70. typedef struct _tagItemData
  71. {
  72. ULONG cbSize;
  73. // more info about category etc.
  74. ITEMDATA_FLAGS grfItem;
  75. // the prefered tymed the client wants the data
  76. TYMED tymedPrefered;
  77. STGMEDIUM stgmed;
  78. } ITEMDATA, *LPITEMDATA;
  79. HRESULT GetURL(
  80. [out] LPOLESTR *ppwzUrl
  81. );
  82. HRESULT GetInfo(
  83. [in] DWORD dwOptions,
  84. [out] LPOLESTR *ppwzItemMime,
  85. [out] LPCLSID *pclsidItem,
  86. [out] LPOLESTR *ppwzProtocol,
  87. [out] LPCLSID *pclsidProtocol,
  88. [out] DWORD *pdwOut
  89. );
  90. HRESULT GetItemData(
  91. [in, out] DWORD *grfITEMF,
  92. [in, out, unique] ITEMDATA * pitemdata
  93. );
  94. // new hresult: data might not be available
  95. //
  96. // Question: is the following method needed or is QI enough?
  97. //HRESULT GetMoniker(
  98. // [out, unique] IMoniker **ppMoniker
  99. // );
  100. }
  101. cpp_quote("#endif")
  102. //+---------------------------------------------------------------------------
  103. //
  104. // Copyright (C) Microsoft Corporation, 1995 - 1996.
  105. //
  106. // Contents: IOInetItemSink interface definition
  107. //
  108. // Description:
  109. //
  110. // The item sink is the interface where an item gets consumed or added to
  111. // the agent where it might be downloaded later and put to the destination.
  112. //
  113. // The ItemSink migh also act as the item filter, hence it can drop an item.
  114. //----------------------------------------------------------------------------
  115. cpp_quote("#ifndef _LPWCHKITEMSINK_DEFINED")
  116. cpp_quote("#define _LPWCHKITEMSINK_DEFINED")
  117. [
  118. local,
  119. object,
  120. uuid(79eacbe5-baf9-11ce-8c82-00aa004ba90b),
  121. pointer_default(unique)
  122. ]
  123. interface IOInetItemSink : IUnknown
  124. {
  125. typedef [unique] IOInetItemSink *LPWCHKITEMSINK;
  126. HRESULT OnItem(
  127. [in] ITEMTYPE itemtype,
  128. [in] IOInetItem *pWChkItem,
  129. [in] DWORD dwReserved
  130. );
  131. }
  132. cpp_quote("#endif")
  133. //+---------------------------------------------------------------------------
  134. //
  135. // Copyright (C) Microsoft Corporation, 1995 - 1996.
  136. //
  137. // Contents: IOInetDestination interface definition
  138. //
  139. // Description:
  140. //
  141. // This interface is the gateway to the item data's destination.
  142. //
  143. //----------------------------------------------------------------------------
  144. cpp_quote("#ifndef _LPWCHKDESTINATION_DEFINED")
  145. cpp_quote("#define _LPWCHKDESTINATION_DEFINED")
  146. [
  147. local,
  148. object,
  149. uuid(79eacbea-baf9-11ce-8c82-00aa004ba90b),
  150. pointer_default(unique)
  151. ]
  152. interface IOInetDestination : IUnknown
  153. {
  154. typedef [unique] IOInetDestination *LPWCHKDESTINATION;
  155. }
  156. cpp_quote("#endif")
  157. //+---------------------------------------------------------------------------
  158. //
  159. // Copyright (C) Microsoft Corporation, 1995 - 1996.
  160. //
  161. // Contents: IOInetAgent interface definition
  162. //
  163. // Description:
  164. //
  165. // This is the object provide by webcheck will can start listening on
  166. // different protocols (APP) by using the custom verb "listen".
  167. //
  168. // The clien can also add an item to the agents scheduler or spooler which
  169. // will the item deliver to a distination at a given "WHEN"
  170. //
  171. //----------------------------------------------------------------------------
  172. cpp_quote("#ifndef _LPWCHKAGENT_DEFINED")
  173. cpp_quote("#define _LPWCHKAGENT_DEFINED")
  174. [
  175. local,
  176. object,
  177. uuid(79eacbe7-baf9-11ce-8c82-00aa004ba90b),
  178. pointer_default(unique)
  179. ]
  180. interface IOInetAgent : IUnknown
  181. {
  182. typedef [unique] IOInetAgent *LPWCHKAGENT;
  183. typedef enum _tagScheduleMode
  184. {
  185. SMODE_ONCEAT = 1,
  186. SMODE_FIRSTAT
  187. } SCHEDULEMODE;
  188. typedef struct _tagScheduleTime
  189. {
  190. ULONG date;
  191. ULONG time;
  192. } SCHEDULETIME;
  193. typedef struct _tagScheduleData
  194. {
  195. SCHEDULEMODE schMode;
  196. SCHEDULETIME schtimeFirst;
  197. SCHEDULETIME schtimeRepeat;
  198. } SCHEDULEDATA;
  199. // will start a listening protocol (APP) and listen for items
  200. // eg. mc or alert etc.
  201. HRESULT StartListen(
  202. [in] const LPCWSTR szProtocol,
  203. [in] IOInetItemFilter *pWChkItemFilter,
  204. [in] DWORD grfMode,
  205. [out] CLSID *pclsidProtocol,
  206. [in] DWORD dwReserved
  207. );
  208. // will release the sink passed in at StartListen
  209. HRESULT StopListen(
  210. [out] CLSID *pclsidProtocol
  211. );
  212. // add item to the spooler
  213. HRESULT ScheduleItem(
  214. [in] IOInetItem *pWChkItem,
  215. [in] IOInetDestination *pWChkDest,
  216. [in] SCHEDULEDATA *pschdata,
  217. [in] DWORD dwMode,
  218. [out, unique] DWORD *pdwCookie
  219. );
  220. HRESULT RevokeItem(
  221. [in] DWORD dwCookie
  222. );
  223. }
  224. cpp_quote("#endif")
  225. //+---------------------------------------------------------------------------
  226. //
  227. // Copyright (C) Microsoft Corporation, 1995 - 1996.
  228. //
  229. // Contents: IOInetAdvisor interface definition
  230. //
  231. // Description:
  232. //
  233. // This is the object provide by webcheck will can start listening on
  234. // different protocols (APP) by using the custom verb "listen".
  235. //
  236. // The clien can also add an item to the agents scheduler or spooler which
  237. // will the item deliver to a distination at a given "WHEN"
  238. //
  239. //----------------------------------------------------------------------------
  240. cpp_quote("#ifndef _LPWCHKADVISOR_DEFINED")
  241. cpp_quote("#define _LPWCHKADVISOR_DEFINED")
  242. [
  243. local,
  244. object,
  245. uuid(79eacbe8-baf9-11ce-8c82-00aa004ba90b),
  246. pointer_default(unique)
  247. ]
  248. interface IOInetAdvisor : IUnknown
  249. {
  250. typedef [unique] IOInetAdvisor *LPWCHKADVISOR;
  251. // will start a listening protocol (APP) and listen for items
  252. // eg. mc or alert etc.
  253. HRESULT StartListen(
  254. [in] const LPCWSTR szProtocol,
  255. [in] IOInetItemFilter *pWChkItemFilter,
  256. [in] DWORD grfMode,
  257. [out] CLSID *pclsidProtocol,
  258. [in] DWORD dwReserved
  259. );
  260. // will release the sink passed in at StartListen
  261. HRESULT StopListen(
  262. [out] CLSID *pclsidProtocol
  263. );
  264. HRESULT Advise(
  265. [in] IOInetItemSink *pWChkItemSink,
  266. [in] DWORD grfMode,
  267. [in] ULONG cMimes,
  268. [in] const LPCWSTR *ppwzItemMimes,
  269. [in] DWORD dwReserved
  270. );
  271. HRESULT Unadvise(
  272. [in] IOInetItemSink *pWChkItemSink,
  273. [in] ULONG cMimes,
  274. [in] const LPCWSTR *ppwzItemMimes
  275. );
  276. HRESULT SendAdvise(
  277. [in] ITEMTYPE itemtype,
  278. [in] IOInetItem *pWChkItem,
  279. [in] DWORD grfMode,
  280. [in] LPCWSTR pwzItemMimes,
  281. [in] DWORD dwReserved
  282. );
  283. }
  284. cpp_quote("#endif")
  285. //+---------------------------------------------------------------------------
  286. //
  287. // Copyright (C) Microsoft Corporation, 1995 - 1996.
  288. //
  289. // Contents: IOInetItemSink interface definition
  290. //
  291. // Description:
  292. //
  293. // The item sink is the interface where an item gets consumed or added to
  294. // the agent where it might be downloaded later and put to the destination.
  295. //
  296. // The ItemSink migh also act as the item filter, hence it can drop an item.
  297. //----------------------------------------------------------------------------
  298. cpp_quote("#ifndef _LPWCHKITEMFILTER_DEFINED")
  299. cpp_quote("#define _LPWCHKITEMFILTER_DEFINED")
  300. [
  301. local,
  302. object,
  303. uuid(79eacbe9-baf9-11ce-8c82-00aa004ba90b),
  304. pointer_default(unique)
  305. ]
  306. interface IOInetItemFilter : IUnknown
  307. {
  308. typedef [unique] IOInetItemFilter *LPWCHKITEMFILTER;
  309. typedef struct _tagAnouncmentData
  310. {
  311. ULONG cbSize;
  312. // more info about category etc.
  313. LPWSTR pwzName;
  314. } ANOUNCMENTDATA, *LPANOUNCMENTDATA;
  315. HRESULT OnAnouncment(
  316. [in] ANOUNCMENTDATA *pAnouncementData,
  317. [in] LPCWSTR pwzUrl,
  318. [in] DWORD dwReserved
  319. );
  320. }
  321. cpp_quote("#endif")
  322. // new API
  323. #pragma midl_echo("STDAPI GetOInetAdvisor(DWORD dwMode, IOInetAdvisor **ppOInetAdvisor, DWORD dwReserved); ")
  324. cpp_quote("#define INET_E_USE_DEFAULT_PROTOCOLHANDLER _HRESULT_TYPEDEF_(0x800C0011L) ")
  325. cpp_quote("#define INET_E_USE_DEFAULT_SETTING _HRESULT_TYPEDEF_(0x800C0012L) ")