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.

308 lines
12 KiB

  1. #if !defined( _MSFS_H )
  2. #define _MSFS_H
  3. /*
  4. * M S F S . H
  5. *
  6. *
  7. * Copyright Microsoft Corporation 1993-1995, All Rights Reserved
  8. *
  9. *
  10. * Definitions used by the the Microsoft Mail transport, address book
  11. * and shared folder service providers. CFG properties are programatically
  12. * configurable via calls to ConfigureMsgService().
  13. *
  14. * The following MSFS defined properties are configurable via ConfigureMsgService()
  15. * calls. They are grouped by function.
  16. *
  17. * C o n n e c t i o n P r o p e r t i e s
  18. *
  19. * PR_CFG_SERVER_PATH
  20. * -- The path to the users post office. Mapped network drives, UNC and NETWARE paths
  21. * are acceptable. NETWARE paths of the type NWServer/share:dir\dir1 are converted to
  22. * UNC paths of the type \\NWServer\share\dir\dir1.
  23. * $REVIEW: If no path is specified, the path will default to the path found in MAIL.DAT
  24. * or if MAIL.DAT is not found to m:
  25. *
  26. * PR_CFG_MAILBOX
  27. * -- The users mailbox name. eg. in a NET/PO/USER address,
  28. * this is USER. The maximum mailbox name is 10 characters.
  29. *
  30. * PR_CFG_PASSWORD
  31. * -- The users mailbox password. The maximum password is 8 characters.
  32. *
  33. * PR_CFG_REMEMBER
  34. * -- A boolean value indicating whether the users password is
  35. * to be remembered in the profile or not.
  36. *
  37. * PR_CFG_CONN_TYPE
  38. * -- The connection type. This may be one of CFG_CONN_LAN,
  39. * CFG_CONN_REMOTE, CFG_CONN_OFFLINE as defined below.
  40. *
  41. * PR_CFG_SESSION_LOG
  42. * -- A boolean value indicating whether session logging
  43. * is/is not required.
  44. *
  45. * PR_CFG_SESSION_LOG_FILE
  46. * -- The path to the session log file.
  47. *
  48. * D e l i v e r y P r o p e r t i e s
  49. *
  50. * PR_CFG_ENABLE_UPLOAD
  51. * -- A boolean value which indicates whether mail in the outbox
  52. * is sent.
  53. *
  54. * PR_CFG_ENABLE_DOWNLOAD
  55. * -- A boolean value which indicates whether mail in the server
  56. * mailbag is downloaded.
  57. *
  58. * PR_CFG_UPLOADTO
  59. * -- A bit array which allows the user to indicate which addresses
  60. * for which the transport is to attempt delivery. This is useful
  61. * in order to allow a user to specify that a transport only handle
  62. * delivery for a subset of the addresses it can really process.
  63. * When multiple transports are installed and the user wants a
  64. * different transport to handle some specific address types they
  65. * can use this bit array to specify that the MSMAIL transport
  66. * only handle a specific set of addresses.
  67. *
  68. * Possible values as defined below include:
  69. *
  70. * CFG_UPLOADTO_PCMAIL -- Local Post Office and External Post Office address types
  71. * CFG_UPLOADTO_PROFS -- PROFS address types
  72. * CFG_UPLOADTO_SNADS -- SNADS address types
  73. * CFG_UPLOADTO_OV -- OfficeVision address types
  74. * CFG_UPLOADTO_MCI -- MCI address types
  75. * CFG_UPLOADTO_X400 -- X.400 address types
  76. * CFG_UPLOADTO_FAX -- FAX address types
  77. * CFG_UPLOADTO_MHS -- MHS address types
  78. * CFG_UPLOADTO_SMTP -- SMTP address types
  79. * CFG_UPLOADTO_MACMAIL -- MacMail address types
  80. * CFG_UPLOADTO_ALL -- All MSMAIL address types
  81. *
  82. *
  83. * PR_CFG_NETBIOS_NTFY
  84. * -- A boolean value which indicates whether a netbios notification
  85. * is sent to a recipients transport when mail is delivered to
  86. * their server inbox.
  87. *
  88. * PR_CFG_SPOOLER_POLL
  89. * -- The polling interval in minutes when the transport
  90. * checks for new mail. 1 <= polling interval <= 9999
  91. *
  92. * F a s t L A N P r o p e r t i e s
  93. *
  94. * PR_CFG_LAN_HEADERS
  95. * -- A boolean value which indicates whether the user wants to enable
  96. * headers while working on the LAN. Headers mode allows the user
  97. * to download message headers and selectively choose which mail
  98. * to download.
  99. *
  100. * PR_CFG_LAN_LOCAL_AB
  101. * -- A boolean value which indicates whether the user wants to use
  102. * name resolution based on a local copy of the server address book
  103. * rather than the server address book itself.
  104. *
  105. * S l o w L A N P r o p e r t i e s
  106. *
  107. * PR_CFG_RAS_HEADERS
  108. * -- A boolean value which indicates whether the user wants to enable
  109. * headers while working over a slow speed link. Headers mode
  110. * allows the user to download message headers and selectively
  111. * choose which mail to download.
  112. *
  113. * PR_CFG_RAS_LOCAL_AB
  114. * -- A boolean value which indicates whether the user wants to use
  115. * name resolution based on a local copy of the server address book
  116. * rather than the server address book itself.
  117. *
  118. * PR_CFG_RAS_INIT_ON_START
  119. * -- A boolean value which indicates that a RAS connection should
  120. * be established when the transport provider starts up.
  121. *
  122. * PR_CFG_RAS_TERM_ON_HDRS
  123. * -- A boolean value which indicates that a RAS connection should
  124. * be automatically terminated when headers are finished downloading.
  125. *
  126. * PR_CFG_RAS_TERM_ON_XFER
  127. * -- A boolean value which indicates that a RAS connection should
  128. * be automatically terminated after mail has finished being sent
  129. * received.
  130. *
  131. * PR_CFG_RAS_TERM_ON_EXIT
  132. * -- A boolean value which indicates that a RAS connection should
  133. * be automatically terminated when the provider is exited.
  134. *
  135. * PR_CFG_RAS_PROFILE
  136. * -- The name of the RAS profile that the transport will use by
  137. * default to attempt the connection.
  138. *
  139. * PR_CFG_RAS_RETRYATTEMPTS
  140. * -- Number of times to attempt dial for connection.
  141. * 1 <= retry attempts <= 9999
  142. *
  143. * PR_CFG_RAS_RETRYDELAY
  144. * -- Delay between retry attempts in seconds.
  145. * 30 <= retry delay <= 9999
  146. *
  147. * PR_CFG_RAS_CONFIRM
  148. * -- A value which determines whether, on a RAS connection, the
  149. * user should be prompted to select a RAS phonebook entry.
  150. * Possible values as defined below include:
  151. * CFG_ALWAYS -- Always use the default RAS profile.
  152. * Never prompt the user.
  153. * CFG_ASK_FIRST -- Prompt the user to select a profile on the
  154. * first connection or after any error occurs.
  155. * CFG_ASK_EVERY -- Always prompt the user to select the RAS
  156. * profile.
  157. *
  158. * S c h e d u l e d S e s s i o n P r o p e r t i e s
  159. *
  160. * PR_CFG_SCHED_SESS
  161. * -- A property that contains information on scheduled sessions. The
  162. * maximum number of entries that may be stored is CFG_SS_MAX. The
  163. * information is stored in the data structure SchedSess.
  164. * $REVIEW Probably want to flesh this out more.
  165. *
  166. */
  167. #include <ras.h>
  168. #include <mapitags.h>
  169. /*
  170. * Connection Properties
  171. */
  172. #define PR_CFG_SERVER_PATH PROP_TAG (PT_STRING8, 0x6600)
  173. #define PR_CFG_MAILBOX PROP_TAG (PT_STRING8, 0x6601)
  174. // Password must be in the secure property range (See MAPITAGS.H)
  175. #define PR_CFG_PASSWORD PROP_TAG (PT_STRING8, PROP_ID_SECURE_MIN)
  176. #define PR_CFG_CONN_TYPE PROP_TAG (PT_LONG, 0x6603)
  177. #define CFG_CONN_LAN 0
  178. #define CFG_CONN_REMOTE 1
  179. #define CFG_CONN_OFFLINE 2
  180. #define PR_CFG_SESSION_LOG PROP_TAG (PT_BOOLEAN, 0x6604)
  181. #define PR_CFG_SESSION_LOG_FILE PROP_TAG (PT_STRING8, 0x6605)
  182. #define PR_CFG_REMEMBER PROP_TAG (PT_BOOLEAN, 0x6606)
  183. /*
  184. * Delivery Properties
  185. */
  186. #define PR_CFG_ENABLE_UPLOAD PROP_TAG (PT_BOOLEAN, 0x6620)
  187. #define PR_CFG_ENABLE_DOWNLOAD PROP_TAG (PT_BOOLEAN, 0x6621)
  188. #define PR_CFG_UPLOADTO PROP_TAG (PT_LONG, 0x6622)
  189. #define CFG_UPLOADTO_PCMAIL 0x00000001
  190. #define CFG_UPLOADTO_PROFS 0x00000002
  191. #define CFG_UPLOADTO_SNADS 0x00000004
  192. #define CFG_UPLOADTO_MCI 0x00000008
  193. #define CFG_UPLOADTO_X400 0x00000010
  194. #define CFG_UPLOADTO_FAX 0x00000040
  195. #define CFG_UPLOADTO_MHS 0x00000080
  196. #define CFG_UPLOADTO_SMTP 0x00000100
  197. #define CFG_UPLOADTO_OV 0x00000800
  198. #define CFG_UPLOADTO_MACMAIL 0x00001000
  199. #define CFG_UPLOADTO_ALL CFG_UPLOADTO_PCMAIL | CFG_UPLOADTO_PROFS | CFG_UPLOADTO_SNADS | \
  200. CFG_UPLOADTO_MCI | CFG_UPLOADTO_X400 | CFG_UPLOADTO_FAX | \
  201. CFG_UPLOADTO_MHS | CFG_UPLOADTO_SMTP | CFG_UPLOADTO_OV | \
  202. CFG_UPLOADTO_MACMAIL
  203. #define PR_CFG_NETBIOS_NTFY PROP_TAG (PT_BOOLEAN, 0x6623)
  204. #define PR_CFG_SPOOLER_POLL PROP_TAG (PT_STRING8, 0x6624)
  205. /*
  206. * Fast LAN Properties
  207. */
  208. #define PR_CFG_LAN_HEADERS PROP_TAG (PT_BOOLEAN, 0x6630)
  209. #define PR_CFG_LAN_LOCAL_AB PROP_TAG (PT_BOOLEAN, 0x6631)
  210. /*
  211. * Slow LAN Properties
  212. */
  213. #define PR_CFG_RAS_HEADERS PROP_TAG (PT_BOOLEAN, 0x6640)
  214. #define PR_CFG_RAS_LOCAL_AB PROP_TAG (PT_BOOLEAN, 0x6641)
  215. #define PR_CFG_RAS_INIT_ON_START PROP_TAG (PT_BOOLEAN, 0x6642)
  216. #define PR_CFG_RAS_TERM_ON_HDRS PROP_TAG (PT_BOOLEAN, 0x6643)
  217. #define PR_CFG_RAS_TERM_ON_XFER PROP_TAG (PT_BOOLEAN, 0x6644)
  218. #define PR_CFG_RAS_TERM_ON_EXIT PROP_TAG (PT_BOOLEAN, 0x6645)
  219. #define PR_CFG_RAS_PROFILE PROP_TAG (PT_STRING8, 0x6646)
  220. #define PR_CFG_RAS_CONFIRM PROP_TAG (PT_LONG, 0x6647)
  221. #define CFG_ALWAYS 0
  222. #define CFG_ASK_FIRST 1
  223. #define CFG_ASK_EVERY 2
  224. #define PR_CFG_RAS_RETRYATTEMPTS PROP_TAG (PT_STRING8, 0x6648)
  225. #define PR_CFG_RAS_RETRYDELAY PROP_TAG (PT_STRING8, 0x6649)
  226. /*
  227. * Message Header Property
  228. */
  229. #define PR_CFG_LOCAL_HEADER PROP_TAG (PT_BOOLEAN, 0x6650)
  230. /*
  231. * Scheduled Session Properties
  232. */
  233. #define CFG_SS_MAX 16
  234. #define CFG_SS_BASE_ID 0x6700
  235. #define CFG_SS_MAX_ID CFG_SS_BASE_ID + CFG_SS_MAX - 1
  236. #define SchedPropTag(n) PROP_TAG (PT_BINARY, CFG_SS_BASE_ID+(n))
  237. #define PR_CFG_SCHED_SESS SchedPropTag(0)
  238. typedef struct SchedSess {
  239. USHORT sSessType;
  240. USHORT sDayMask;
  241. FILETIME ftTime; // sched time
  242. FILETIME ftStart; // start time
  243. ULONG ulFlags; // flags and task list
  244. TCHAR szPhoneEntry[RAS_MaxEntryName+1];
  245. } SCHEDSESS, FAR *LPSCHEDSESS;
  246. // Day bits
  247. #define CFG_SS_SUN 0x0001
  248. #define CFG_SS_MON 0x0002
  249. #define CFG_SS_TUE 0x0004
  250. #define CFG_SS_WED 0x0008
  251. #define CFG_SS_THU 0x0010
  252. #define CFG_SS_FRI 0x0020
  253. #define CFG_SS_SAT 0x0040
  254. #define IsDayChecked(sDayMask, nDay) ( (sDayMask) & (1<<(nDay)) )
  255. // Session types
  256. #define CFG_SS_EVERY 0
  257. #define CFG_SS_WEEKLY 1
  258. #define CFG_SS_ONCE 2
  259. #define CFG_SS_NULLTYPE 3
  260. // Property range identifiers; useful for asserting
  261. #define PR_CFG_MIN PROP_TAG (PT_STRING8, 0x6600)
  262. #define PR_CFG_MAX SchedPropTag(CFG_SS_MAX-1)
  263. // Shared Folder Service Provider Properties
  264. // PR_ASSIGNED_ACCESS - MAPI Access rights given to users other than the owner of the folder
  265. // This property can be retrieved and set. The following MAPI access flags
  266. // are valid:
  267. // MAPI_ACCESS_READ
  268. // (MAPI_ACCESS_CREATE_HIERARCHY | MAPI_ACCESS_CREATE_CONTENTS)
  269. // MAPI_ACCESS_DELETE
  270. //
  271. #define PR_ASSIGNED_ACCESS PROP_TAG(PT_LONG, 0x66ff)
  272. // SFSP_ACCESS_OWNER - This flag is returned when PR_ASSIGNED_ACCESS is retrieved by the owner
  273. // of the folder. It can not be set.
  274. #define SFSP_ACCESS_OWNER 0x8000
  275. // Unique Provider Identifiers
  276. //
  277. #define MSFS_UID_ABPROVIDER { 0x00,0x60,0x94,0x64,0x60,0x41,0xb8,0x01, \
  278. 0x08,0x00,0x2b,0x2b,0x8a,0x29,0x00,0x00 }
  279. #define MSFS_UID_SFPROVIDER { 0x00,0xff,0xb8,0x64,0x60,0x41,0xb8,0x01, \
  280. 0x08,0x00,0x2b,0x2b,0x8a,0x29,0x00,0x00 }
  281. #endif // _MSFS_H