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.

147 lines
5.0 KiB

  1. #ifndef __URLHLINK_H
  2. #define __URLHLINK_H
  3. #include "urlmon.h"
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7. // Flags for the UrlDownloadToCacheFile
  8. #define URLOSTRM_USECACHEDCOPY_ONLY 0x1 // Only get from cache
  9. #define URLOSTRM_USECACHEDCOPY URLOSTRM_USECACHEDCOPY_ONLY +1 // Get from cache if available else download
  10. #define URLOSTRM_GETNEWESTVERSION URLOSTRM_USECACHEDCOPY +1 // Get new version only. But put it in cache too
  11. typedef HRESULT (STDAPICALLTYPE *LPFNUOSCALLBACK)(LPBINDSTATUSCALLBACK);
  12. STDAPI URLOpenStreamA(LPUNKNOWN,LPCSTR,DWORD,LPBINDSTATUSCALLBACK);
  13. STDAPI URLOpenStreamW(LPUNKNOWN,LPCWSTR,DWORD,LPBINDSTATUSCALLBACK);
  14. #ifdef UNICODE
  15. #define URLOpenStream URLOpenStreamW
  16. #else
  17. #define URLOpenStream URLOpenStreamA
  18. #endif // !UNICODE
  19. STDAPI URLOpenPullStreamA(LPUNKNOWN,LPCSTR,DWORD,LPBINDSTATUSCALLBACK);
  20. STDAPI URLOpenPullStreamW(LPUNKNOWN,LPCWSTR,DWORD,LPBINDSTATUSCALLBACK);
  21. #ifdef UNICODE
  22. #define URLOpenPullStream URLOpenPullStreamW
  23. #else
  24. #define URLOpenPullStream URLOpenPullStreamA
  25. #endif // !UNICODE
  26. STDAPI URLDownloadToFileA(LPUNKNOWN,LPCSTR,LPCSTR,DWORD,LPBINDSTATUSCALLBACK);
  27. STDAPI URLDownloadToFileW(LPUNKNOWN,LPCWSTR,LPCWSTR,DWORD,LPBINDSTATUSCALLBACK);
  28. #ifdef UNICODE
  29. #define URLDownloadToFile URLDownloadToFileW
  30. #else
  31. #define URLDownloadToFile URLDownloadToFileA
  32. #endif // !UNICODE
  33. STDAPI URLDownloadToCacheFileA(LPUNKNOWN,LPCSTR,LPTSTR,DWORD,DWORD,LPBINDSTATUSCALLBACK);
  34. STDAPI URLDownloadToCacheFileW(LPUNKNOWN,LPCWSTR,LPWSTR,DWORD,DWORD,LPBINDSTATUSCALLBACK);
  35. #ifdef UNICODE
  36. #define URLDownloadToCacheFile URLDownloadToCacheFileW
  37. #else
  38. #define URLDownloadToCacheFile URLDownloadToCacheFileA
  39. #endif // !UNICODE
  40. STDAPI URLOpenBlockingStreamA(LPUNKNOWN,LPCSTR,LPSTREAM*,DWORD,LPBINDSTATUSCALLBACK);
  41. STDAPI URLOpenBlockingStreamW(LPUNKNOWN,LPCWSTR,LPSTREAM*,DWORD,LPBINDSTATUSCALLBACK);
  42. #ifdef UNICODE
  43. #define URLOpenBlockingStream URLOpenBlockingStreamW
  44. #else
  45. #define URLOpenBlockingStream URLOpenBlockingStreamA
  46. #endif // !UNICODE
  47. #define UOSM_PUSH 0
  48. #define UOSM_PULL 1
  49. #define UOSM_BLOCK 2
  50. #define UOSM_FILE 3
  51. #define UOS_URLENCODEPOSTDATA BINDINFOF_URLENCODESTGMEDDATA
  52. #define UOS_URLENCODEURL BINDINFOF_URLENCODEDEXTRAINFO
  53. typedef struct _UOSHTTPINFOA
  54. {
  55. ULONG ulSize;
  56. LPUNKNOWN punkCaller;
  57. LPCSTR szURL;
  58. LPCSTR szVerb;
  59. LPCSTR szHeaders;
  60. LPBYTE pbPostData;
  61. ULONG ulPostDataLen;
  62. ULONG fURLEncode;
  63. ULONG ulResv;
  64. ULONG ulMode;
  65. LPCSTR szFileName;
  66. LPSTREAM * ppStream;
  67. LPBINDSTATUSCALLBACK pbscb;
  68. } UOSHTTPINFOA, * LPUOSHTTPINFOA;
  69. typedef struct _UOSHTTPINFOW
  70. {
  71. ULONG ulSize;
  72. LPUNKNOWN punkCaller;
  73. LPCWSTR szURL;
  74. LPCWSTR szVerb;
  75. LPCWSTR szHeaders;
  76. LPBYTE pbPostData;
  77. ULONG ulPostDataLen;
  78. ULONG fURLEncode;
  79. ULONG ulResv;
  80. ULONG ulMode;
  81. LPCWSTR szFileName;
  82. LPSTREAM * ppStream;
  83. LPBINDSTATUSCALLBACK pbscb;
  84. } UOSHTTPINFOW, * LPUOSHTTPINFOW;
  85. #ifdef UNICODE
  86. typedef UOSHTTPINFOW UOSHTTPINFO;
  87. typedef LPUOSHTTPINFOW LPUOSHTTPINFO;
  88. #else
  89. typedef UOSHTTPINFOA UOSHTTPINFO;
  90. typedef LPUOSHTTPINFOA LPUOSHTTPINFO;
  91. #endif // UNICODE
  92. STDAPI URLOpenHttpStreamA(LPUOSHTTPINFOA);
  93. STDAPI URLOpenHttpStreamW(LPUOSHTTPINFOW);
  94. #ifdef UNICODE
  95. #define URLOpenHttpStream URLOpenHttpStreamW
  96. #else
  97. #define URLOpenHttpStream URLOpenHttpStreamA
  98. #endif // !UNICODE
  99. struct IBindStatusCallback;
  100. STDAPI HlinkSimpleNavigateToString(
  101. /* [in] */ LPCWSTR szTarget, // required - target document - null if local jump w/in doc
  102. /* [in] */ LPCWSTR szLocation, // optional, for navigation into middle of a doc
  103. /* [in] */ LPCWSTR szTargetFrameName, // optional, for targeting frame-sets
  104. /* [in] */ IUnknown *pUnk, // required - we'll search this for other necessary interfaces
  105. /* [in] */ IBindCtx *pbc, // optional. caller may register an IBSC in this
  106. /* [in] */ IBindStatusCallback *,
  107. /* [in] */ DWORD grfHLNF, // flags (TBD - HadiP needs to define this correctly?)
  108. /* [in] */ DWORD dwReserved // for future use, must be NULL
  109. );
  110. STDAPI HlinkSimpleNavigateToMoniker(
  111. /* [in] */ IMoniker *pmkTarget, // required - target document - (may be null if local jump w/in doc)
  112. /* [in] */ LPCWSTR szLocation, // optional, for navigation into middle of a doc
  113. /* [in] */ LPCWSTR szTargetFrameName, // optional, for targeting frame-sets
  114. /* [in] */ IUnknown *pUnk, // required - we'll search this for other necessary interfaces
  115. /* [in] */ IBindCtx *pbc, // optional. caller may register an IBSC in this
  116. /* [in] */ IBindStatusCallback *,
  117. /* [in] */ DWORD grfHLNF, // flags (TBD - HadiP needs to define this correctly?)
  118. /* [in] */ DWORD dwReserved // for future use, must be NULL
  119. );
  120. STDAPI HlinkGoBack(IUnknown *pUnk);
  121. STDAPI HlinkGoForward(IUnknown *pUnk);
  122. STDAPI HlinkNavigateString(IUnknown *pUnk, LPCWSTR szTarget);
  123. STDAPI HlinkNavigateMoniker(IUnknown *pUnk, IMoniker *pmkTarget);
  124. #ifdef __cplusplus
  125. }
  126. #endif
  127. #endif