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.

272 lines
4.9 KiB

  1. /*++
  2. Copyright (c) 1994 Microsoft Corporation
  3. Module Name:
  4. inetp.h
  5. Abstract:
  6. Contains the Internet Gateway Service private functions proto type
  7. definitions.
  8. Author:
  9. Madan Appiah (madana) 11-Nov-1994
  10. Environment:
  11. User Mode - Win32 - MIDL
  12. Revision History:
  13. --*/
  14. #ifndef _INETP_
  15. #define _INETP_
  16. #if defined(__cplusplus)
  17. extern "C" {
  18. #endif
  19. //
  20. // types
  21. //
  22. typedef enum {
  23. TypeGenericHandle = 'HneG',
  24. TypeInternetHandle = 'tenI',
  25. TypeFtpConnectHandle = 'noCF',
  26. TypeFtpFindHandle = 'dnFF',
  27. TypeFtpFindHandleHtml = 'HnFF',
  28. TypeFtpFileHandle = 'liFF',
  29. TypeFtpFileHandleHtml = 'HlFF',
  30. TypeGopherConnectHandle = 'noCG',
  31. TypeGopherFindHandle = 'dnFG',
  32. TypeGopherFindHandleHtml = 'HnFG',
  33. TypeGopherFileHandle = 'liFG',
  34. TypeGopherFileHandleHtml = 'HlFG',
  35. TypeHttpConnectHandle = 'noCH',
  36. TypeHttpRequestHandle = 'qeRH',
  37. TypeFileRequestHandle = 'flRH',
  38. TypeWildHandle = 'dliW'
  39. } HINTERNET_HANDLE_TYPE, *LPHINTERNET_HANDLE_TYPE;
  40. //
  41. // typedef virtual close function.
  42. //
  43. typedef BOOL ( *CLOSE_HANDLE_FUNC ) ( HINTERNET );
  44. typedef BOOL ( *CONNECT_CLOSE_HANDLE_FUNC ) ( HINTERNET, DWORD );
  45. //
  46. // prototypes
  47. //
  48. BOOL
  49. _InternetCloseHandle(
  50. IN HINTERNET hInternet
  51. );
  52. DWORD
  53. _InternetCloseHandleNoContext(
  54. IN HINTERNET hInternet
  55. );
  56. //
  57. // remote/RPC/object functions
  58. //
  59. DWORD
  60. RIsHandleLocal(
  61. HINTERNET Handle,
  62. BOOL * IsLocalHandle,
  63. BOOL * IsAsyncHandle,
  64. HINTERNET_HANDLE_TYPE ExpectedHandleType
  65. );
  66. DWORD
  67. RGetHandleType(
  68. HINTERNET Handle,
  69. LPHINTERNET_HANDLE_TYPE HandleType
  70. );
  71. DWORD
  72. RSetUrl(
  73. HINTERNET Handle,
  74. LPSTR lpszUrl
  75. );
  76. DWORD
  77. RGetUrl(
  78. HINTERNET Handle,
  79. LPSTR* lpszUrl
  80. );
  81. DWORD
  82. RSetDirEntry(
  83. HINTERNET Handle,
  84. LPSTR lpszDirEntry
  85. );
  86. DWORD
  87. RGetDirEntry(
  88. HINTERNET Handle,
  89. LPSTR* lpszDirEntry
  90. );
  91. DWORD
  92. RSetParentHandle(
  93. HINTERNET hChild,
  94. HINTERNET hParent,
  95. BOOL DeleteWithChild
  96. );
  97. DWORD
  98. RGetContext(
  99. HINTERNET hInternet,
  100. DWORD_PTR *lpdwContext
  101. );
  102. DWORD
  103. RSetContext(
  104. HINTERNET hInternet,
  105. DWORD_PTR dwContext
  106. );
  107. DWORD
  108. RGetTimeout(
  109. HINTERNET hInternet,
  110. DWORD dwTimeoutOption,
  111. LPDWORD lpdwTimeoutValue
  112. );
  113. DWORD
  114. RSetTimeout(
  115. HINTERNET hInternet,
  116. DWORD dwTimeoutOption,
  117. DWORD dwTimeoutValue
  118. );
  119. DWORD
  120. RGetStatusCallback(
  121. IN HINTERNET Handle,
  122. OUT LPWINHTTP_STATUS_CALLBACK lpStatusCallback
  123. );
  124. DWORD
  125. RExchangeStatusCallback(
  126. IN HINTERNET Handle,
  127. IN OUT LPWINHTTP_STATUS_CALLBACK lpStatusCallback,
  128. IN BOOL fType,
  129. IN DWORD dwFlags
  130. );
  131. DWORD
  132. RMakeInternetConnectObjectHandle(
  133. HINTERNET ParentHandle,
  134. HINTERNET *ChildHandle,
  135. LPSTR lpszServerName,
  136. INTERNET_PORT nServerPort,
  137. DWORD dwFlags
  138. );
  139. DWORD
  140. RMakeHttpReqObjectHandle(
  141. HINTERNET ParentHandle,
  142. HINTERNET *ChildHandle,
  143. CLOSE_HANDLE_FUNC wCloseFunc,
  144. DWORD dwFlags
  145. );
  146. //
  147. // non-exported Internet subordinate functions
  148. //
  149. DWORD
  150. HttpWriteData(
  151. IN HINTERNET hRequest,
  152. OUT LPVOID lpBuffer,
  153. IN DWORD dwNumberOfBytesToWrite,
  154. OUT LPDWORD lpdwNumberOfBytesWritten,
  155. IN DWORD dwSocketFlags
  156. );
  157. DWORD
  158. HttpReadData(
  159. IN HINTERNET hHttpRequest,
  160. OUT LPVOID lpBuffer,
  161. IN DWORD dwNumberOfBytesToRead,
  162. OUT LPDWORD lpdwNumberOfBytesRead,
  163. IN DWORD dwSocketFlags
  164. );
  165. PUBLIC
  166. DWORD
  167. wHttpAddRequestHeaders(
  168. IN HINTERNET hRequest,
  169. IN LPCSTR lpszHeaders,
  170. IN DWORD dwHeadersLength,
  171. IN DWORD dwModifiers
  172. );
  173. DWORD
  174. pHttpGetUrlInfo(
  175. IN HANDLE RequestHandle,
  176. IN LPBYTE Headers,
  177. IN DWORD HeadersLength,
  178. IN LPBYTE UrlBuf,
  179. IN OUT DWORD *UrlBufLen,
  180. IN BOOL ReloadFlagCheck
  181. );
  182. BOOLAPI
  183. InternetCanonicalizeUrlA(
  184. IN LPCSTR lpszUrl,
  185. OUT LPSTR lpszBuffer,
  186. IN OUT LPDWORD lpdwBufferLength,
  187. IN DWORD dwFlags
  188. );
  189. BOOLAPI
  190. InternetCanonicalizeUrlW(
  191. IN LPCWSTR lpszUrl,
  192. OUT LPWSTR lpszBuffer,
  193. IN OUT LPDWORD lpdwBufferLength,
  194. IN DWORD dwFlags
  195. );
  196. #ifdef UNICODE
  197. #define InternetCanonicalizeUrl InternetCanonicalizeUrlW
  198. #else
  199. #define InternetCanonicalizeUrl InternetCanonicalizeUrlA
  200. #endif // !UNICODE
  201. BOOLAPI
  202. InternetCombineUrlA(
  203. IN LPCSTR lpszBaseUrl,
  204. IN LPCSTR lpszRelativeUrl,
  205. OUT LPSTR lpszBuffer,
  206. IN OUT LPDWORD lpdwBufferLength,
  207. IN DWORD dwFlags
  208. );
  209. BOOLAPI
  210. InternetCombineUrlW(
  211. IN LPCWSTR lpszBaseUrl,
  212. IN LPCWSTR lpszRelativeUrl,
  213. OUT LPWSTR lpszBuffer,
  214. IN OUT LPDWORD lpdwBufferLength,
  215. IN DWORD dwFlags
  216. );
  217. #ifdef UNICODE
  218. #define InternetCombineUrl InternetCombineUrlW
  219. #else
  220. #define InternetCombineUrl InternetCombineUrlA
  221. #endif // !UNICODE
  222. #if defined(__cplusplus)
  223. }
  224. #endif
  225. #endif // _INETP_