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.

111 lines
4.4 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1997 - 2000
  6. //
  7. // File: update.h
  8. //
  9. //--------------------------------------------------------------------------
  10. #ifndef __INCLUDE_CSCUIEXT_H
  11. #define __INCLUDE_CSCUIEXT_H
  12. //
  13. // Semi-public header for CSCUI.DLL.
  14. // CSCUI.DLL provides the user interface for client-side caching.
  15. // The code interacts with the CSC agent, Sync Manager (mobsync),
  16. // winlogon, the shell, and the system tray (systray.exe).
  17. //
  18. //
  19. STDAPI_(HWND) CSCUIInitialize(HANDLE hToken, DWORD dwFlags);
  20. STDAPI_(LRESULT) CSCUISetState(UINT uMsg, WPARAM wParam, LPARAM lParam);
  21. typedef HWND (*PFNCSCUIINITIALIZE)(HANDLE hToken, DWORD dwFlags);
  22. //
  23. // Flags for CSCUIInitialize
  24. //
  25. #define CI_INITIALIZE 0x0001
  26. #define CI_TERMINATE 0x0002
  27. #define CI_CREATEWINDOW 0x0004
  28. #define CI_DESTROYWINDOW 0x0008
  29. //
  30. // These values are returned by CSCUISetState().
  31. //
  32. #define LRESULT_CSCWORKOFFLINE 1011
  33. #define LRESULT_CSCFAIL 1012
  34. #define LRESULT_CSCRETRY 1016
  35. //
  36. // These values are passed to CSCUISetState() as the uMsg arg.
  37. //
  38. #define STWM_CSCNETUP (WM_USER + 209)
  39. #define STWM_CSCQUERYNETDOWN (WM_USER + 210)
  40. #define STWM_CSCCLOSEDIALOGS (WM_USER + 212)
  41. #define STWM_CSCNETDOWN (WM_USER + 213)
  42. #define STWM_CACHE_CORRUPTED (WM_USER + 214)
  43. //
  44. // These values are passed to CSCUISetState() as the wParam arg.
  45. //
  46. #define CSCUI_NO_AUTODIAL 0
  47. #define CSCUI_AUTODIAL_FOR_UNCACHED_SHARE 1
  48. #define CSCUI_AUTODIAL_FOR_CACHED_SHARE 2
  49. //
  50. // These messages are private for the CSCUI hidden notification
  51. // window in systray.exe.
  52. //
  53. #define CSCWM_DONESYNCING (WM_USER + 300)
  54. #define CSCWM_UPDATESTATUS (WM_USER + 301)
  55. #define CSCWM_RECONNECT (WM_USER + 302)
  56. #define CSCWM_SYNCHRONIZE (WM_USER + 303)
  57. #define CSCWM_ISSERVERBACK (WM_USER + 304)
  58. #define CSCWM_VIEWFILES (WM_USER + 305)
  59. #define CSCWM_SETTINGS (WM_USER + 306)
  60. #define CSCWM_GETSHARESTATUS (WM_USER + 307)
  61. //
  62. // These constants are obtained by sending a CSCWM_GETSHARESTATUS
  63. // message to the CSCUI hidden window. They correspond to the
  64. // OfflineFolderStatus enumeration constants defined in shldisp.h.
  65. // These must remain in sync for the shell folder webview to work properly.
  66. //
  67. #define CSC_SHARESTATUS_INACTIVE -1 // Same as OFS_INACTIVE
  68. #define CSC_SHARESTATUS_ONLINE 0 // Same as OFS_ONLINE
  69. #define CSC_SHARESTATUS_OFFLINE 1 // Same as OFS_OFFLINE
  70. #define CSC_SHARESTATUS_SERVERBACK 2 // Same as OFS_SERVERBACK
  71. #define CSC_SHARESTATUS_DIRTYCACHE 3 // Same as OFS_DIRTYCACHE
  72. //
  73. // Class name and title for the CSCUI hidden notification window.
  74. //
  75. #define STR_CSCHIDDENWND_CLASSNAME TEXT("CSCHiddenWindow")
  76. #define STR_CSCHIDDENWND_TITLE TEXT("CSC Notifications Window")
  77. //
  78. // Function for deleting folders & contents from the cache.
  79. //
  80. // pszFolder -- UNC path of folder to remove
  81. // pfnCB -- optional, may be NULL. Return FALSE to abort, TRUE to continue.
  82. // lParam -- passed to pfnCB
  83. //
  84. typedef BOOL (CALLBACK *PFN_CSCUIRemoveFolderCallback)(LPCWSTR, LPARAM);
  85. STDAPI CSCUIRemoveFolderFromCache(LPCWSTR pszFolder, DWORD dwReserved, PFN_CSCUIRemoveFolderCallback pfnCB, LPARAM lParam);
  86. //
  87. // One of these is returned in the *pdwTsMode
  88. // argument to CSCUI_IsTerminalServerCompatibleWithCSC API.
  89. //
  90. // CSCTSF_ = "CSC Terminal Server Flag"
  91. //
  92. #define CSCTSF_UNKNOWN 0 // Can't obtain TS status.
  93. #define CSCTSF_CSC_OK 1 // OK to use CSC.
  94. #define CSCTSF_APP_SERVER 2 // TS is configured as an app server.
  95. #define CSCTSF_MULTI_CNX 3 // Multiple connections are allowed.
  96. #define CSCTSF_REMOTE_CNX 4 // There are currently remote connections active.
  97. #define CSCTSF_FUS_ENABLED 5 // Fast User Switching is enabled.
  98. #define CSCTSF_COUNT 6
  99. //
  100. // Returns:
  101. // S_OK - Terminal Server is in a mode that is compatible with CSC.
  102. // S_FALSE - Not OK to use CSC. Inspect *pdwTsMode for reason.
  103. // other - Failure. *pdwTsMode contains CSCTSF_UNKNOWN.
  104. //
  105. HRESULT CSCUIIsTerminalServerCompatibleWithCSC(DWORD *pdwTsMode);
  106. #endif // __INCLUDE_CSCUIEXT_H