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.

274 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. DWORD_PTR dwContext
  139. );
  140. DWORD
  141. RMakeHttpReqObjectHandle(
  142. HINTERNET ParentHandle,
  143. HINTERNET *ChildHandle,
  144. CLOSE_HANDLE_FUNC wCloseFunc,
  145. DWORD dwFlags,
  146. DWORD_PTR dwContext
  147. );
  148. //
  149. // non-exported Internet subordinate functions
  150. //
  151. DWORD
  152. HttpWriteData(
  153. IN HINTERNET hRequest,
  154. OUT LPVOID lpBuffer,
  155. IN DWORD dwNumberOfBytesToWrite,
  156. OUT LPDWORD lpdwNumberOfBytesWritten,
  157. IN DWORD dwSocketFlags
  158. );
  159. DWORD
  160. HttpReadData(
  161. IN HINTERNET hHttpRequest,
  162. OUT LPVOID lpBuffer,
  163. IN DWORD dwNumberOfBytesToRead,
  164. OUT LPDWORD lpdwNumberOfBytesRead,
  165. IN DWORD dwSocketFlags
  166. );
  167. PUBLIC
  168. DWORD
  169. wHttpAddRequestHeaders(
  170. IN HINTERNET hRequest,
  171. IN LPCSTR lpszHeaders,
  172. IN DWORD dwHeadersLength,
  173. IN DWORD dwModifiers
  174. );
  175. DWORD
  176. pHttpGetUrlInfo(
  177. IN HANDLE RequestHandle,
  178. IN LPBYTE Headers,
  179. IN DWORD HeadersLength,
  180. IN LPBYTE UrlBuf,
  181. IN OUT DWORD *UrlBufLen,
  182. IN BOOL ReloadFlagCheck
  183. );
  184. BOOLAPI
  185. InternetCanonicalizeUrlA(
  186. IN LPCSTR lpszUrl,
  187. OUT LPSTR lpszBuffer,
  188. IN OUT LPDWORD lpdwBufferLength,
  189. IN DWORD dwFlags
  190. );
  191. BOOLAPI
  192. InternetCanonicalizeUrlW(
  193. IN LPCWSTR lpszUrl,
  194. OUT LPWSTR lpszBuffer,
  195. IN OUT LPDWORD lpdwBufferLength,
  196. IN DWORD dwFlags
  197. );
  198. #ifdef UNICODE
  199. #define InternetCanonicalizeUrl InternetCanonicalizeUrlW
  200. #else
  201. #define InternetCanonicalizeUrl InternetCanonicalizeUrlA
  202. #endif // !UNICODE
  203. BOOLAPI
  204. InternetCombineUrlA(
  205. IN LPCSTR lpszBaseUrl,
  206. IN LPCSTR lpszRelativeUrl,
  207. OUT LPSTR lpszBuffer,
  208. IN OUT LPDWORD lpdwBufferLength,
  209. IN DWORD dwFlags
  210. );
  211. BOOLAPI
  212. InternetCombineUrlW(
  213. IN LPCWSTR lpszBaseUrl,
  214. IN LPCWSTR lpszRelativeUrl,
  215. OUT LPWSTR lpszBuffer,
  216. IN OUT LPDWORD lpdwBufferLength,
  217. IN DWORD dwFlags
  218. );
  219. #ifdef UNICODE
  220. #define InternetCombineUrl InternetCombineUrlW
  221. #else
  222. #define InternetCombineUrl InternetCombineUrlA
  223. #endif // !UNICODE
  224. #if defined(__cplusplus)
  225. }
  226. #endif
  227. #endif // _INETP_