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.

159 lines
4.5 KiB

  1. #ifndef OFFLINE_H
  2. #define OFFLINE_H
  3. typedef enum AGENT_PRIORITY {
  4. AGENT_PRIORITY_NORMAL = 2
  5. } AGENT_PRIORITY;
  6. typedef enum {_INIT_FROM_URL, _INIT_FROM_INTSHCUT, _INIT_FROM_CHANNEL} INIT_SRC_ENUM;
  7. #define MAX_NAME_QUICKLINK MAX_PATH
  8. #define MAX_NAME MAX_NAME_QUICKLINK
  9. #define MAX_URL INTERNET_MAX_URL_LENGTH
  10. #define MAX_USERNAME 127
  11. #define MAX_PASSWORD 63
  12. #define MAX_STATUS 127
  13. #define MAX_PROP_PAGES 10
  14. #define MAX_WC_AGENT_PAGES 2
  15. typedef struct {
  16. int templateRCID;
  17. DLGPROC dlgProc;
  18. } PageType, * LPPageType;
  19. typedef const PageType *CLPPageType;
  20. // PIDL format for this folder...
  21. typedef struct OOEntry
  22. {
  23. DWORD dwSize;
  24. DWORD dwFlags;
  25. CFileTime m_LastUpdated;
  26. CFileTime m_NextUpdate;
  27. LONG m_SizeLimit;
  28. LONG m_ActualSize;
  29. LONG m_RecurseLevels;
  30. LONG m_RecurseFlags;
  31. AGENT_PRIORITY m_Priority;
  32. BOOL bDesktop;
  33. BOOL bChannel;
  34. BOOL bMail;
  35. BOOL bGleam;
  36. BOOL bChangesOnly;
  37. BOOL bNeedPassword;
  38. TASK_TRIGGER m_Trigger;
  39. DWORD fChannelFlags;
  40. SUBSCRIPTIONCOOKIE m_Cookie;
  41. SUBSCRIPTIONCOOKIE groupCookie;
  42. DWORD grfTaskTrigger;
  43. CLSID clsidDest;
  44. SCODE status;
  45. LPTSTR username;
  46. LPTSTR password;
  47. LPTSTR m_URL;
  48. LPTSTR m_Name;
  49. LPTSTR statusStr;
  50. } OOEntry;
  51. typedef UNALIGNED OOEntry * POOEntry;
  52. #define PSF_NO_SCHEDULED_UPDATES 0x00000001
  53. #define PSF_NO_EDITING_SCHEDULES 0x00000002
  54. #define PSF_NO_AUTO_NAME_SCHEDULE 0x00000004
  55. #define PSF_NO_CHECK_SCHED_CONFLICT 0x00000008
  56. #define PSF_IS_ALREADY_SUBSCRIBED 0x00000010
  57. typedef struct
  58. {
  59. DWORD dwFlags;
  60. CFileTime m_LastUpdated;
  61. CFileTime m_NextUpdate;
  62. LONG m_SizeLimit;
  63. LONG m_ActualSize;
  64. LONG m_RecurseLevels;
  65. LONG m_RecurseFlags;
  66. AGENT_PRIORITY m_Priority;
  67. BOOL bDesktop;
  68. BOOL bChannel;
  69. BOOL bMail;
  70. BOOL bGleam;
  71. BOOL bChangesOnly;
  72. BOOL bNeedPassword;
  73. TASK_TRIGGER m_Trigger;
  74. DWORD fChannelFlags;
  75. SUBSCRIPTIONCOOKIE m_Cookie;
  76. SUBSCRIPTIONCOOKIE groupCookie;
  77. DWORD grfTaskTrigger;
  78. CLSID clsidDest;
  79. SCODE status;
  80. TCHAR username[MAX_USERNAME + 1];
  81. TCHAR password[MAX_PASSWORD + 1];
  82. TCHAR m_URL[MAX_URL + 1];
  83. TCHAR m_Name[MAX_NAME + 1];
  84. TCHAR statusStr[MAX_STATUS +1];
  85. DWORD m_dwPropSheetFlags; // used internally by propsheets and wizard
  86. HWND hwndNewSchedDlg;
  87. } OOEBuf, * POOEBuf;
  88. typedef struct
  89. {
  90. USHORT cb;
  91. USHORT usSign;
  92. OOEntry ooe; // Should point to the place right after itself.
  93. } MYPIDL;
  94. typedef UNALIGNED MYPIDL *LPMYPIDL;
  95. typedef struct _ColInfoType {
  96. short int iCol;
  97. short int ids; // Id of string for title
  98. short int cchCol; // Number of characters wide to make column
  99. short int iFmt; // The format of the column;
  100. } ColInfoType;
  101. enum {
  102. ICOLC_SHORTNAME = 0,
  103. ICOLC_LAST,
  104. ICOLC_STATUS,
  105. ICOLC_URL,
  106. ICOLC_ACTUALSIZE
  107. };
  108. #define MYPIDL_MAGIC 0x7405
  109. #define RETURN_ON_FAILURE(hr) if (FAILED(hr)) return hr
  110. #define IS_VALID_MYPIDL(pidl) ((((LPMYPIDL)pidl)->cb > sizeof(MYPIDL)) && \
  111. (((LPMYPIDL)pidl)->usSign == (USHORT)MYPIDL_MAGIC))
  112. #define ARRAYSIZE(a) (sizeof(a)/sizeof(a[0]))
  113. #define NAME(pooe) (LPTSTR)((LPBYTE)(pooe) + (DWORD_PTR)((pooe)->m_Name))
  114. #define URL(pooe) (LPTSTR)((LPBYTE)(pooe) + (DWORD_PTR)((pooe)->m_URL))
  115. #define UNAME(pooe) (LPTSTR)((LPBYTE)(pooe) + (DWORD_PTR)((pooe)->username))
  116. #define PASSWD(pooe) (LPTSTR)((LPBYTE)(pooe) + (DWORD_PTR)((pooe)->password))
  117. #define STATUS(pooe) (LPTSTR)((LPBYTE)(pooe) + (DWORD_PTR)((pooe)->statusStr))
  118. #ifdef __cplusplus
  119. extern "C" {
  120. #endif
  121. extern HINSTANCE g_hInst;
  122. extern const CHAR c_szOpen[];
  123. extern const CHAR c_szUpdate[];
  124. extern const CHAR c_szDelete[];
  125. extern const CHAR c_szProperties[];
  126. extern const CHAR c_szCopy[];
  127. extern const CLSID CLSID_OfflineFolder;
  128. extern const CLSID CLSID_WebcrawlHelper;
  129. extern const CLSID IID_IOfflineObject;
  130. #ifdef __cplusplus
  131. };
  132. #endif
  133. #include "wizards.h"
  134. #include "utils.h" // NOTE: must come at end to get all the definitions
  135. #endif // OFFLINE_H