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.

718 lines
16 KiB

  1. /*++=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. w3spoof.idl
  5. Abstract:
  6. Interface definitions for the w3spoof object model.
  7. Author:
  8. Paul M Midgen (pmidge) 11-July-2000
  9. Revision History:
  10. 11-July-2000 pmidge
  11. Created
  12. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--*/
  13. #include "..\inc\dispids.h"
  14. //
  15. // forward declarations
  16. //
  17. interface IW3SpoofClientSupport;
  18. interface ISession;
  19. interface ISocket;
  20. interface IRequest;
  21. interface IResponse;
  22. interface IEntity;
  23. interface IHeaders;
  24. interface IUrl;
  25. //
  26. // library block
  27. //
  28. [
  29. uuid(a455dd41-5bae-4539-8b5a-2ad6bea97d9d),
  30. helpstring("W3Spoof 1.0 Type Library"),
  31. lcid(0x0000),
  32. version(1.0)
  33. ]
  34. library W3Spoof
  35. {
  36. import "ocidl.idl";
  37. importlib("stdole2.tlb");
  38. [
  39. uuid(c75f2c74-75c4-4fac-8c49-0b98e36ac04b),
  40. appobject,
  41. helpstring("W3Spoof class.")
  42. ]
  43. coclass W3Spoof
  44. {
  45. [default] interface IW3SpoofClientSupport;
  46. };
  47. [
  48. uuid(d75ebe11-94f9-401e-898d-e904a0dbc7c6),
  49. helpstring("Session class.")
  50. ]
  51. coclass Session
  52. {
  53. [default] interface ISession;
  54. };
  55. [
  56. uuid(d68ab483-5bdb-423c-bd22-6d12cd5e2865),
  57. helpstring("Socket class.")
  58. ]
  59. coclass Socket
  60. {
  61. [default] interface ISocket;
  62. };
  63. [
  64. uuid(b77522f4-d78f-47a2-a993-9cf739d0c83d),
  65. helpstring("Headers class.")
  66. ]
  67. coclass Headers
  68. {
  69. [default] interface IHeaders;
  70. };
  71. [
  72. uuid(0b427701-2ef8-4d84-a32c-4251d9f0942b),
  73. helpstring("Entity class.")
  74. ]
  75. coclass Entity
  76. {
  77. [default] interface IEntity;
  78. };
  79. [
  80. uuid(21a6a4f0-4be9-4479-acc2-95dde32b80cd),
  81. helpstring("Url class.")
  82. ]
  83. coclass Url
  84. {
  85. [default] interface IUrl;
  86. };
  87. [
  88. uuid(452bde60-1ba4-4182-b312-c912ff7168a1),
  89. helpstring("Request class.")
  90. ]
  91. coclass Request
  92. {
  93. [default] interface IRequest;
  94. };
  95. [
  96. uuid(fc82c331-051f-44c6-bc09-06dd301ee6c9),
  97. helpstring("Response class.")
  98. ]
  99. coclass Response
  100. {
  101. [default] interface IResponse;
  102. };
  103. }
  104. //
  105. // interface definitions
  106. //
  107. //======================== W3SPOOF ========================
  108. [
  109. object,
  110. uuid(d9bfddc0-1b08-4363-befa-cd8bd3fefbcd),
  111. dual,
  112. oleautomation,
  113. nonextensible,
  114. helpstring("IW3SpoofClientSupport interface"),
  115. pointer_default(unique)
  116. ]
  117. interface IW3SpoofClientSupport : IDispatch
  118. {
  119. [
  120. id(DISPID_W3SPOOF_REGISTERCLIENT),
  121. helpstring("Create a client to script mapping.")
  122. ]
  123. HRESULT RegisterClient(
  124. [in] BSTR Client,
  125. [in] BSTR ScriptPath
  126. );
  127. [
  128. id(DISPID_W3SPOOF_REVOKECLIENT),
  129. helpstring("Revokes a client to script mapping.")
  130. ]
  131. HRESULT RevokeClient(
  132. [in] BSTR Client
  133. );
  134. };
  135. //=========================================================
  136. //======================= ISESSION ========================
  137. [
  138. object,
  139. uuid(b1ba6a09-e7f5-4c7a-bef8-b9d8bb0d2253),
  140. dual,
  141. oleautomation,
  142. nonextensible,
  143. helpstring("ISession interface"),
  144. pointer_default(unique)
  145. ]
  146. interface ISession : IDispatch
  147. {
  148. [
  149. propget,
  150. id(DISPID_SESSION_SOCKET),
  151. helpstring("Accesses the session socket object.")
  152. ]
  153. HRESULT Socket([out, retval] IDispatch** ppdisp);
  154. [
  155. propget,
  156. id(DISPID_SESSION_REQUEST),
  157. helpstring("Accesses the session request object.")
  158. ]
  159. HRESULT Request([out, retval] IDispatch** ppdisp);
  160. [
  161. propget,
  162. id(DISPID_SESSION_RESPONSE),
  163. helpstring("Accesses the session response object.")
  164. ]
  165. HRESULT Response([out, retval] IDispatch** ppdisp);
  166. [
  167. id(DISPID_SESSION_GETPROPERTYBAG),
  168. helpstring("Gets or creates a property bag associated with the current client.")
  169. ]
  170. HRESULT GetPropertyBag(
  171. [in, optional] VARIANT Name,
  172. [out, retval] IDispatch** ppdisp
  173. );
  174. [
  175. propget,
  176. id(DISPID_SESSION_KEEPALIVE),
  177. helpstring("Gets the keep-alive status of the session.")
  178. ]
  179. HRESULT KeepAlive(
  180. [out, retval] VARIANT* IsKA
  181. );
  182. };
  183. //=========================================================
  184. //======================== ISocket ========================
  185. [
  186. object,
  187. uuid(5abe466a-fbc7-40fe-9372-cd5c6e901ff8),
  188. odl,
  189. dual,
  190. oleautomation,
  191. nonextensible,
  192. helpstring("ISocket interface"),
  193. pointer_default(unique)
  194. ]
  195. interface ISocket : IDispatch
  196. {
  197. [
  198. propget,
  199. id(DISPID_SOCKET_PARENT),
  200. helpstring("Accesses the socket parent object.")
  201. ]
  202. HRESULT Parent([out, retval] IDispatch** ppdisp);
  203. [
  204. id(DISPID_SOCKET_SEND),
  205. helpstring("Raw data send method.")
  206. ]
  207. HRESULT Send([in] VARIANT Data);
  208. [
  209. id(DISPID_SOCKET_RECV),
  210. helpstring("Raw data receive method.")
  211. ]
  212. HRESULT Recv([out, retval] VARIANT* Data);
  213. [
  214. propget,
  215. id(DISPID_SOCKET_OPTION),
  216. helpstring("Gets the value of a send option.")
  217. ]
  218. HRESULT Option(
  219. [in] BSTR Option,
  220. [out, retval] VARIANT* Value
  221. );
  222. [
  223. propput,
  224. id(DISPID_SOCKET_OPTION),
  225. helpstring("Sets the value of a send option.")
  226. ]
  227. HRESULT Option(
  228. [in] BSTR Option,
  229. [in] VARIANT Value
  230. );
  231. [
  232. id(DISPID_SOCKET_CLOSE),
  233. helpstring("Closes the connection.")
  234. ]
  235. HRESULT Close([in, optional] VARIANT Method);
  236. [
  237. id(DISPID_SOCKET_RESOLVE),
  238. helpstring("Resolves a host name to an IP address.")
  239. ]
  240. HRESULT Resolve(
  241. [in] BSTR Host,
  242. [out, retval] BSTR* Address
  243. );
  244. [
  245. propget,
  246. id(DISPID_SOCKET_LOCALNAME),
  247. helpstring("Gets the name of the machine running W3Spoof.")
  248. ]
  249. HRESULT LocalName([out, retval] BSTR* Name);
  250. [
  251. propget,
  252. id(DISPID_SOCKET_LOCALADDRESS),
  253. helpstring("Gets the address of the machine running W3Spoof.")
  254. ]
  255. HRESULT LocalAddress([out, retval] BSTR* Address);
  256. [
  257. propget,
  258. id(DISPID_SOCKET_LOCALPORT),
  259. helpstring("Gets the local port number of the connection.")
  260. ]
  261. HRESULT LocalPort([out, retval] VARIANT* Port);
  262. [
  263. propget,
  264. id(DISPID_SOCKET_REMOTENAME),
  265. helpstring("Gets the name of the machine connected to W3Spoof.")
  266. ]
  267. HRESULT RemoteName([out, retval] BSTR* Name);
  268. [
  269. propget,
  270. id(DISPID_SOCKET_REMOTEADDRESS),
  271. helpstring("Gets the address of the machine connected to W3Spoof.")
  272. ]
  273. HRESULT RemoteAddress([out, retval] BSTR* Address);
  274. [
  275. propget,
  276. id(DISPID_SOCKET_REMOTEPORT),
  277. helpstring("Gets the remote port number of the connection.")
  278. ]
  279. HRESULT RemotePort([out, retval] VARIANT* Port);
  280. };
  281. //=========================================================
  282. //======================== IHeaders =======================
  283. [
  284. object,
  285. uuid(ba3a1bb8-b785-4486-8d68-be7ee8cb14dc),
  286. odl,
  287. dual,
  288. oleautomation,
  289. nonextensible,
  290. helpstring("IHeaders interface"),
  291. pointer_default(unique)
  292. ]
  293. interface IHeaders : IDispatch
  294. {
  295. [
  296. propget,
  297. id(DISPID_HEADERS_PARENT),
  298. helpstring("Accesses the headers parent object.")
  299. ]
  300. HRESULT Parent([out, retval] IDispatch** ppdisp);
  301. [
  302. id(DISPID_HEADERS_GET),
  303. helpstring("Returns the raw header blob.")
  304. ]
  305. HRESULT Get([out, retval] BSTR* Headers);
  306. [
  307. id(DISPID_HEADERS_SET),
  308. helpstring("Sets a raw header blob.")
  309. ]
  310. HRESULT Set([in, optional] VARIANT* Headers);
  311. [
  312. id(DISPID_HEADERS_GETHEADER),
  313. helpstring("Gets a specific header value.")
  314. ]
  315. HRESULT GetHeader(
  316. [in] BSTR Header,
  317. [out, retval] VARIANT* Value
  318. );
  319. [
  320. id(DISPID_HEADERS_SETHEADER),
  321. helpstring("Sets a specific header value.")
  322. ]
  323. HRESULT SetHeader(
  324. [in] BSTR Header,
  325. [in, optional] VARIANT* Value
  326. );
  327. };
  328. //=========================================================
  329. //======================== IEntity ========================
  330. [
  331. object,
  332. uuid(16359321-5182-4cf8-8d98-e90880722a23),
  333. odl,
  334. dual,
  335. oleautomation,
  336. nonextensible,
  337. helpstring("IEntity interface"),
  338. pointer_default(unique)
  339. ]
  340. interface IEntity : IDispatch
  341. {
  342. [
  343. propget,
  344. id(DISPID_ENTITY_PARENT),
  345. helpstring("Accesses the entity parent object.")
  346. ]
  347. HRESULT Parent([out, retval] IDispatch** ppdisp);
  348. [
  349. propget,
  350. id(DISPID_ENTITY_LENGTH),
  351. helpstring("Retrieves the length of the entity body.")
  352. ]
  353. HRESULT Length([out, retval] VARIANT* Length);
  354. [
  355. id(DISPID_ENTITY_GET),
  356. helpstring("Gets the entity body data.")
  357. ]
  358. HRESULT Get([out, retval] VARIANT* Entity);
  359. [
  360. id(DISPID_ENTITY_SET),
  361. helpstring("Sets the entity body data.")
  362. ]
  363. HRESULT Set([in] VARIANT Entity);
  364. [
  365. id(DISPID_ENTITY_COMPRESS),
  366. helpstring("Compresses the entity body.")
  367. ]
  368. HRESULT Compress([in] BSTR Method);
  369. [
  370. id(DISPID_ENTITY_DECOMPRESS),
  371. helpstring("Decompresses the entity body.")
  372. ]
  373. HRESULT Decompress([in, optional] VARIANT Method);
  374. };
  375. //=========================================================
  376. //========================== IUrl =========================
  377. [
  378. object,
  379. uuid(bec9b392-d24d-4d40-b6bf-4af3dc6d1a74),
  380. odl,
  381. dual,
  382. oleautomation,
  383. nonextensible,
  384. helpstring("IUrl interface"),
  385. pointer_default(unique)
  386. ]
  387. interface IUrl : IDispatch
  388. {
  389. [
  390. propget,
  391. id(DISPID_URL_PARENT),
  392. helpstring("Accesses the url parent object.")
  393. ]
  394. HRESULT Parent([out, retval] IDispatch** ppdisp);
  395. [
  396. propget,
  397. id(DISPID_URL_ENCODING),
  398. helpstring("Gets the url encoding.")
  399. ]
  400. HRESULT Encoding([out, retval] BSTR* Encoding);
  401. [
  402. propget,
  403. id(DISPID_URL_SCHEME),
  404. helpstring("Gets the url scheme.")
  405. ]
  406. HRESULT Scheme([out, retval] BSTR* Scheme);
  407. [
  408. propput,
  409. id(DISPID_URL_SCHEME),
  410. helpstring("Sets the url scheme.")
  411. ]
  412. HRESULT Scheme([in] BSTR Scheme);
  413. [
  414. propget,
  415. id(DISPID_URL_SERVER),
  416. helpstring("Gets the origin server name.")
  417. ]
  418. HRESULT Server([out, retval] BSTR* Server);
  419. [
  420. propput,
  421. id(DISPID_URL_SERVER),
  422. helpstring("Sets the origin server name.")
  423. ]
  424. HRESULT Server([in] BSTR Server);
  425. [
  426. propget,
  427. id(DISPID_URL_PORT),
  428. helpstring("Gets the origin server port number.")
  429. ]
  430. HRESULT Port([out, retval] VARIANT* Port);
  431. [
  432. propput,
  433. id(DISPID_URL_PORT),
  434. helpstring("Sets the origin server port number.")
  435. ]
  436. HRESULT Port([in] VARIANT Port);
  437. [
  438. propget,
  439. id(DISPID_URL_PATH),
  440. helpstring("Gets the url path.")
  441. ]
  442. HRESULT Path([out, retval] BSTR* Path);
  443. [
  444. propput,
  445. id(DISPID_URL_PATH),
  446. helpstring("Sets the url path.")
  447. ]
  448. HRESULT Path([in] BSTR Path);
  449. [
  450. propget,
  451. id(DISPID_URL_RESOURCE),
  452. helpstring("Gets the resource name.")
  453. ]
  454. HRESULT Resource([out, retval] BSTR* Resource);
  455. [
  456. propput,
  457. id(DISPID_URL_RESOURCE),
  458. helpstring("Sets the resource name.")
  459. ]
  460. HRESULT Resource([in] BSTR Resource);
  461. [
  462. propget,
  463. id(DISPID_URL_QUERY),
  464. helpstring("Gets the query portion of the url.")
  465. ]
  466. HRESULT Query([out, retval] BSTR* Query);
  467. [
  468. propput,
  469. id(DISPID_URL_QUERY),
  470. helpstring("Sets the query portion of the url.")
  471. ]
  472. HRESULT Query([in] BSTR Query);
  473. [
  474. propget,
  475. id(DISPID_URL_FRAGMENT),
  476. helpstring("Gets the fragment portion of the url.")
  477. ]
  478. HRESULT Fragment([out, retval] BSTR* Fragment);
  479. [
  480. propput,
  481. id(DISPID_URL_FRAGMENT),
  482. helpstring("Sets the fragment portion of the url.")
  483. ]
  484. HRESULT Fragment([in] BSTR Fragment);
  485. [
  486. id(DISPID_URL_ESCAPE),
  487. helpstring("Returns an escaped version of the url.")
  488. ]
  489. HRESULT Escape([out, retval] BSTR* Url);
  490. [
  491. id(DISPID_URL_UNESCAPE),
  492. helpstring("Returns an unescaped version of the url.")
  493. ]
  494. HRESULT Unescape([out, retval] BSTR* Url);
  495. [
  496. id(DISPID_URL_SET),
  497. helpstring("Overwrites the url string.")
  498. ]
  499. HRESULT Set([in] BSTR Url);
  500. [
  501. id(DISPID_URL_GET),
  502. helpstring("Retrieves the raw url string.")
  503. ]
  504. HRESULT Get([out, retval] BSTR* Url);
  505. };
  506. //=========================================================
  507. //======================== IRequest =======================
  508. [
  509. object,
  510. uuid(94cbb886-d25b-49e3-848b-da5e54967502),
  511. odl,
  512. dual,
  513. oleautomation,
  514. nonextensible,
  515. helpstring("IRequest interface"),
  516. pointer_default(unique)
  517. ]
  518. interface IRequest : IDispatch
  519. {
  520. [
  521. propget,
  522. id(DISPID_REQUEST_PARENT),
  523. helpstring("Accesses the request parent object.")
  524. ]
  525. HRESULT Parent([out, retval] IDispatch** ppdisp);
  526. [
  527. propget,
  528. id(DISPID_REQUEST_HEADERS),
  529. helpstring("Returns the headers object.")
  530. ]
  531. HRESULT Headers([out, retval] IDispatch** ppdisp);
  532. [
  533. propget,
  534. id(DISPID_REQUEST_ENTITY),
  535. helpstring("Returns the entity object.")
  536. ]
  537. HRESULT Entity([out, retval] IDispatch** ppdisp);
  538. [
  539. propget,
  540. id(DISPID_REQUEST_URL),
  541. helpstring("Returns the url object.")
  542. ]
  543. HRESULT Url([out, retval] IDispatch** ppdisp);
  544. [
  545. propget,
  546. id(DISPID_REQUEST_VERB),
  547. helpstring("Returns the request verb.")
  548. ]
  549. HRESULT Verb([out, retval] BSTR* Verb);
  550. [
  551. propget,
  552. id(DISPID_REQUEST_HTTPVERSION),
  553. helpstring("Returns the request HTTP version.")
  554. ]
  555. HRESULT HttpVersion([out, retval] BSTR* HttpVersion);
  556. };
  557. //=========================================================
  558. //======================= IResponse =======================
  559. [
  560. object,
  561. uuid(2acf58df-8009-4499-b399-0800075a5c8a),
  562. odl,
  563. dual,
  564. oleautomation,
  565. nonextensible,
  566. helpstring("IResponse interface"),
  567. pointer_default(unique)
  568. ]
  569. interface IResponse : IDispatch
  570. {
  571. [
  572. propget,
  573. id(DISPID_RESPONSE_PARENT),
  574. helpstring("Accesses the response object parent.")
  575. ]
  576. HRESULT Parent([out, retval] IDispatch** ppdisp);
  577. [
  578. propget,
  579. id(DISPID_RESPONSE_HEADERS),
  580. helpstring("Gets the headers object.")
  581. ]
  582. HRESULT Headers([out, retval] IDispatch** ppdisp);
  583. [
  584. propputref,
  585. id(DISPID_RESPONSE_HEADERS),
  586. helpstring("Sets the headers object.")
  587. ]
  588. HRESULT Headers([in] IDispatch** ppdisp);
  589. [
  590. propget,
  591. id(DISPID_RESPONSE_ENTITY),
  592. helpstring("Gets the entity object.")
  593. ]
  594. HRESULT Entity([out, retval] IDispatch** ppdisp);
  595. [
  596. propputref,
  597. id(DISPID_RESPONSE_ENTITY),
  598. helpstring("Sets the entity object.")
  599. ]
  600. HRESULT Entity([in] IDispatch** ppdisp);
  601. [
  602. propget,
  603. id(DISPID_RESPONSE_STATUSCODE),
  604. helpstring("Gets the response status code.")
  605. ]
  606. HRESULT StatusCode([out, retval] VARIANT* Code);
  607. [
  608. propput,
  609. id(DISPID_RESPONSE_STATUSCODE),
  610. helpstring("Sets the response status code.")
  611. ]
  612. HRESULT StatusCode([in] VARIANT StatusCode);
  613. [
  614. propget,
  615. id(DISPID_RESPONSE_STATUSTEXT),
  616. helpstring("Gets the response status text.")
  617. ]
  618. HRESULT StatusText([out, retval] BSTR* StatusText);
  619. [
  620. propput,
  621. id(DISPID_RESPONSE_STATUSTEXT),
  622. helpstring("Sets the response status text.")
  623. ]
  624. HRESULT StatusText([in] BSTR StatusText);
  625. };
  626. //=========================================================