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.

118 lines
2.5 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows NT Security
  4. // Copyright (C) Microsoft Corporation, 1997 - 1999
  5. //
  6. // File: offurl.h
  7. //
  8. // Contents: Offline URL Caching
  9. //
  10. // History: 19-Jan-00 philh Created
  11. // 01-Jan-02 philh Changed to internally use UNICODE Urls
  12. //
  13. //----------------------------------------------------------------------------
  14. #if !defined(__CRYPTNET_OFFURL_H__)
  15. #define __CRYPTNET_OFFURL_H__
  16. #include <origin.h>
  17. VOID
  18. WINAPI
  19. InitializeOfflineUrlCache();
  20. VOID
  21. WINAPI
  22. DeleteOfflineUrlCache();
  23. //
  24. // Offline Url Time Information.
  25. //
  26. // For each offline detection, dwOfflineCnt is incrmented and
  27. // EarliestOnlineTime =
  28. // CurrentTime + rgdwOfflineUrlDeltaSeconds[dwOfflineCnt - 1]
  29. //
  30. // On the next online detection, dwOfflineCnt is cleared.
  31. //
  32. typedef struct _OFFLINE_URL_TIME_INFO {
  33. // If dwOfflineCnt != 0, then, offline and the wire
  34. // won't be hit until CurrentTime >= EarliestOnlineTime
  35. DWORD dwOfflineCnt;
  36. FILETIME EarliestOnlineTime;
  37. } OFFLINE_URL_TIME_INFO, *POFFLINE_URL_TIME_INFO;
  38. //
  39. // Return status:
  40. // +1 - Online
  41. // 0 - Offline, current time >= earliest online time, hit the wire
  42. // -1 - Offline, current time < earliest onlime time
  43. //
  44. LONG
  45. WINAPI
  46. GetOfflineUrlTimeStatus(
  47. IN POFFLINE_URL_TIME_INFO pInfo
  48. );
  49. VOID
  50. WINAPI
  51. SetOfflineUrlTime(
  52. IN OUT POFFLINE_URL_TIME_INFO pInfo
  53. );
  54. VOID
  55. WINAPI
  56. SetOnlineUrlTime(
  57. IN OUT POFFLINE_URL_TIME_INFO pInfo
  58. );
  59. LONG
  60. WINAPI
  61. GetOriginUrlStatusW(
  62. IN CRYPT_ORIGIN_IDENTIFIER OriginIdentifier,
  63. IN LPCWSTR pwszUrl,
  64. IN LPCSTR pszContextOid,
  65. IN DWORD dwRetrievalFlags
  66. );
  67. VOID
  68. WINAPI
  69. SetOnlineOriginUrlW(
  70. IN CRYPT_ORIGIN_IDENTIFIER OriginIdentifier,
  71. IN LPCWSTR pwszUrl,
  72. IN LPCSTR pszContextOid,
  73. IN DWORD dwRetrievalFlags
  74. );
  75. VOID
  76. WINAPI
  77. SetOfflineOriginUrlW(
  78. IN CRYPT_ORIGIN_IDENTIFIER OriginIdentifier,
  79. IN LPCWSTR pwszUrl,
  80. IN LPCSTR pszContextOid,
  81. IN DWORD dwRetrievalFlags
  82. );
  83. LONG
  84. WINAPI
  85. GetUrlStatusW(
  86. IN LPCWSTR pwszUrl,
  87. IN LPCSTR pszContextOid,
  88. IN DWORD dwRetrievalFlags
  89. );
  90. VOID
  91. WINAPI
  92. SetOnlineUrlW(
  93. IN LPCWSTR pwszUrl,
  94. IN LPCSTR pszContextOid,
  95. IN DWORD dwRetrievalFlags
  96. );
  97. VOID
  98. WINAPI
  99. SetOfflineUrlW(
  100. IN LPCWSTR pwszUrl,
  101. IN LPCSTR pszContextOid,
  102. IN DWORD dwRetrievalFlags
  103. );
  104. #endif