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.

121 lines
3.2 KiB

  1. #ifndef _HTTPFILT_
  2. #define _HTTPFILT_
  3. //#include <wininet.h>
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7. #define SZFN_FILTEROPEN "HttpFilterOpen"
  8. BOOL
  9. WINAPI
  10. HttpFilterOpen
  11. (
  12. OUT LPVOID *lppvFilterContext,
  13. IN LPCSTR szFilterName,
  14. IN LPVOID lpReserved
  15. );
  16. typedef BOOL (WINAPI *PFN_FILTEROPEN)
  17. (LPVOID*, LPCSTR, LPVOID);
  18. #define SZFN_FILTERCLOSE "HttpFilterClose"
  19. BOOL
  20. WINAPI
  21. HttpFilterClose
  22. (
  23. IN LPVOID lpvFilterContext, // context created by HttpFilterOpen
  24. IN BOOL fInShutdown // TRUE if in DLL_PROCESS_DETACH
  25. );
  26. typedef BOOL (WINAPI *PFN_FILTERCLOSE)
  27. (LPVOID, BOOL);
  28. // Per Transaction
  29. // There are called one for every HTTP transaction that WinInet performs.
  30. #define SZFN_FILTERBEGINNINGTRANSACTION "HttpFilterBeginningTransaction"
  31. BOOL
  32. WINAPI
  33. HttpFilterBeginningTransaction
  34. (
  35. IN LPVOID lpvFilterContext, // context created by HttpFilterOpen
  36. IN OUT LPVOID* lppvTransactionContext,
  37. IN HINTERNET hRequest,
  38. IN LPVOID lpReserved
  39. );
  40. typedef BOOL (WINAPI *PFN_FILTERBEGINNINGTRANSACTION)
  41. (LPVOID, LPVOID*, HINTERNET, LPVOID);
  42. //This is called when a transaction begins. It gives the caller an oppurtunity
  43. // to examine the request header and modify it.
  44. #define SZFN_FILTERONRESPONSE "HttpFilterOnResponse"
  45. BOOL
  46. WINAPI
  47. HttpFilterOnResponse
  48. (
  49. IN LPVOID lpvFilterContext, // context created by HttpFilterOpen
  50. IN OUT LPVOID* lppvTransactionContext,
  51. IN HINTERNET hRequest,
  52. IN LPVOID lpReserved
  53. );
  54. typedef BOOL (WINAPI *PFN_FILTERONRESPONSE)
  55. (LPVOID, LPVOID*, HINTERNET, LPVOID);
  56. // This is called when the HTTP response returns and all of the HTTP headers are
  57. // vailable to examine.
  58. #define SZFN_FILTERONBLOCKINGOPS "HttpFilterOnBlockingOps"
  59. BOOL
  60. WINAPI
  61. HttpFilterOnBlockingOps
  62. (
  63. IN LPVOID lpvFilterContext, // context created by HttpFilterOpen
  64. IN OUT LPVOID* lppvTransactionContext,
  65. IN HINTERNET hRequest,
  66. IN HWND hWnd,
  67. IN LPVOID lpReserved
  68. );
  69. typedef BOOL (WINAPI *PFN_FILTERONBLOCKINGOPS)
  70. (LPVOID, LPVOID*, HINTERNET, HWND, LPVOID);
  71. // Called in response to any of the above APIs returning FALSE and setting the
  72. // GetLastError() value to INTERNET_ERROR_NEED_BLOCKING_UI. The caller can put
  73. // up UI in this situation.using hWnd as the parent Window.
  74. #define SZFN_FILTERONTRANSACTIONCOMPLETE "HttpFilterOnTransactionComplete"
  75. BOOL
  76. WINAPI
  77. HttpFilterOnTransactionComplete
  78. (
  79. IN LPVOID lpvFilterContext, // context created by HttpFilterOpen
  80. IN OUT LPVOID* lppvTransactionContext,
  81. IN HINTERNET hRequest,
  82. IN LPVOID lpReserved
  83. );
  84. typedef BOOL (WINAPI *PFN_FILTERONTRANSACTIONCOMPLETE)
  85. (LPVOID, LPVOID*, HINTERNET, LPVOID);
  86. // Called when I the transaction is complete. This gives the caller an
  87. // opportunity to clean up any transaction specific data. Filter returns TRUE
  88. // to indicate "I took no action - you should proceed", FALSE to indicate that
  89. // the value from GetLastError() will have ben set.
  90. #ifdef __cplusplus
  91. } // extern "C"
  92. #endif
  93. #endif // _HTTPFILT_