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.

1128 lines
43 KiB

  1. /*
  2. * EDKMDB.H
  3. *
  4. * Microsoft Exchange Information Store
  5. * Copyright (C) 1986-1996, Microsoft Corporation
  6. *
  7. * Contains declarations of additional properties and interfaces
  8. * offered by Microsoft Exchange Information Store
  9. */
  10. #ifndef EDKMDB_INCLUDED
  11. #define EDKMDB_INCLUDED
  12. /*
  13. * WARNING: Many of the property id values contained within this
  14. * file are subject to change. For best results please use the
  15. * literals declared here instead of the numerical values.
  16. */
  17. #define pidExchangeXmitReservedMin 0x3FE0
  18. #define pidExchangeNonXmitReservedMin 0x65E0
  19. #define pidProfileMin 0x6600
  20. #define pidStoreMin 0x6618
  21. #define pidFolderMin 0x6638
  22. #define pidMessageReadOnlyMin 0x6640
  23. #define pidMessageWriteableMin 0x6658
  24. #define pidAttachReadOnlyMin 0x666C
  25. #define pidSpecialMin 0x6670
  26. #define pidAdminMin 0x6690
  27. #define pidSecureProfileMin PROP_ID_SECURE_MIN
  28. /*------------------------------------------------------------------------
  29. *
  30. * PROFILE properties
  31. *
  32. * These are used in profiles which contain the Exchange Messaging
  33. * Service. These profiles contain a "global section" used to store
  34. * common data, plus individual sections for the transport provider,
  35. * one store provider for the user, one store provider for the public
  36. * store, and one store provider for each additional mailbox the user
  37. * has delegate access to.
  38. *
  39. *-----------------------------------------------------------------------*/
  40. /* GUID of the global section */
  41. #define pbGlobalProfileSectionGuid "\x13\xDB\xB0\xC8\xAA\x05\x10\x1A\x9B\xB0\x00\xAA\x00\x2F\xC4\x5A"
  42. /* Properties in the global section */
  43. #define PR_PROFILE_VERSION PROP_TAG( PT_LONG, pidProfileMin+0x00)
  44. #define PR_PROFILE_CONFIG_FLAGS PROP_TAG( PT_LONG, pidProfileMin+0x01)
  45. #define PR_PROFILE_HOME_SERVER PROP_TAG( PT_STRING8, pidProfileMin+0x02)
  46. #define PR_PROFILE_HOME_SERVER_DN PROP_TAG( PT_STRING8, pidProfileMin+0x12)
  47. #define PR_PROFILE_HOME_SERVER_ADDRS PROP_TAG( PT_MV_STRING8, pidProfileMin+0x13)
  48. #define PR_PROFILE_USER PROP_TAG( PT_STRING8, pidProfileMin+0x03)
  49. #define PR_PROFILE_CONNECT_FLAGS PROP_TAG( PT_LONG, pidProfileMin+0x04)
  50. #define PR_PROFILE_TRANSPORT_FLAGS PROP_TAG( PT_LONG, pidProfileMin+0x05)
  51. #define PR_PROFILE_UI_STATE PROP_TAG( PT_LONG, pidProfileMin+0x06)
  52. #define PR_PROFILE_UNRESOLVED_NAME PROP_TAG( PT_STRING8, pidProfileMin+0x07)
  53. #define PR_PROFILE_UNRESOLVED_SERVER PROP_TAG( PT_STRING8, pidProfileMin+0x08)
  54. #define PR_PROFILE_BINDING_ORDER PROP_TAG( PT_STRING8, pidProfileMin+0x09)
  55. #define PR_PROFILE_MAX_RESTRICT PROP_TAG( PT_LONG, pidProfileMin+0x0D)
  56. #define PR_PROFILE_AB_FILES_PATH PROP_TAG( PT_STRING8, pidProfileMin+0xE)
  57. #define PR_PROFILE_OFFLINE_STORE_PATH PROP_TAG( PT_STRING8, pidProfileMin+0x10)
  58. #define PR_PROFILE_OFFLINE_INFO PROP_TAG( PT_BINARY, pidProfileMin+0x11)
  59. #define PR_PROFILE_ADDR_INFO PROP_TAG( PT_BINARY, pidSpecialMin+0x17)
  60. #define PR_PROFILE_OPTIONS_DATA PROP_TAG( PT_BINARY, pidSpecialMin+0x19)
  61. #define PR_PROFILE_SECURE_MAILBOX PROP_TAG( PT_BINARY, pidSecureProfileMin + 0)
  62. #define PR_DISABLE_WINSOCK PROP_TAG( PT_LONG, pidProfileMin+0x18)
  63. /* Properties passed through the Service Entry to the OST */
  64. #define PR_OST_ENCRYPTION PROP_TAG(PT_LONG, 0x6702)
  65. /* Values for PR_OST_ENCRYPTION */
  66. #define OSTF_NO_ENCRYPTION ((DWORD)0x80000000)
  67. #define OSTF_COMPRESSABLE_ENCRYPTION ((DWORD)0x40000000)
  68. #define OSTF_BEST_ENCRYPTION ((DWORD)0x20000000)
  69. /* Properties in each profile section */
  70. #define PR_PROFILE_OPEN_FLAGS PROP_TAG( PT_LONG, pidProfileMin+0x09)
  71. #define PR_PROFILE_TYPE PROP_TAG( PT_LONG, pidProfileMin+0x0A)
  72. #define PR_PROFILE_MAILBOX PROP_TAG( PT_STRING8, pidProfileMin+0x0B)
  73. #define PR_PROFILE_SERVER PROP_TAG( PT_STRING8, pidProfileMin+0x0C)
  74. #define PR_PROFILE_SERVER_DN PROP_TAG( PT_STRING8, pidProfileMin+0x14)
  75. /* Properties in the Public Folders section */
  76. #define PR_PROFILE_FAVFLD_DISPLAY_NAME PROP_TAG(PT_STRING8, pidProfileMin+0x0F)
  77. #define PR_PROFILE_FAVFLD_COMMENT PROP_TAG(PT_STRING8, pidProfileMin+0x15)
  78. #define PR_PROFILE_ALLPUB_DISPLAY_NAME PROP_TAG(PT_STRING8, pidProfileMin+0x16)
  79. #define PR_PROFILE_ALLPUB_COMMENT PROP_TAG(PT_STRING8, pidProfileMin+0x17)
  80. // Current value for PR_PROFILE_VERSION
  81. #define PROFILE_VERSION ((ULONG)0x501)
  82. // Bit values for PR_PROFILE_CONFIG_FLAGS
  83. #define CONFIG_SERVICE ((ULONG)1)
  84. #define CONFIG_SHOW_STARTUP_UI ((ULONG)2)
  85. #define CONFIG_SHOW_CONNECT_UI ((ULONG)4)
  86. #define CONFIG_PROMPT_FOR_CREDENTIALS ((ULONG)8)
  87. // Bit values for PR_PROFILE_CONNECT_FLAGS
  88. #define CONNECT_USE_ADMIN_PRIVILEGE ((ULONG)1)
  89. #define CONNECT_NO_RPC_ENCRYPTION ((ULONG)2)
  90. // Bit values for PR_PROFILE_TRANSPORT_FLAGS
  91. #define TRANSPORT_DOWNLOAD ((ULONG)1)
  92. #define TRANSPORT_UPLOAD ((ULONG)2)
  93. // Bit values for PR_PROFILE_OPEN_FLAGS
  94. #define OPENSTORE_USE_ADMIN_PRIVILEGE ((ULONG)1)
  95. #define OPENSTORE_PUBLIC ((ULONG)2)
  96. #define OPENSTORE_HOME_LOGON ((ULONG)4)
  97. #define OPENSTORE_TAKE_OWNERSHIP ((ULONG)8)
  98. #define OPENSTORE_OVERRIDE_HOME_MDB ((ULONG)16)
  99. #define OPENSTORE_TRANSPORT ((ULONG)32)
  100. #define OPENSTORE_REMOTE_TRANSPORT ((ULONG)64)
  101. // Values for PR_PROFILE_TYPE
  102. #define PROFILE_PRIMARY_USER ((ULONG)1)
  103. #define PROFILE_DELEGATE ((ULONG)2)
  104. #define PROFILE_PUBLIC_STORE ((ULONG)3)
  105. #define PROFILE_SUBSCRIPTION ((ULONG)4)
  106. /*------------------------------------------------------------------------
  107. *
  108. * MDB object properties
  109. *
  110. *-----------------------------------------------------------------------*/
  111. /* PR_MDB_PROVIDER GUID in stores table */
  112. #define pbExchangeProviderPrimaryUserGuid "\x54\x94\xA1\xC0\x29\x7F\x10\x1B\xA5\x87\x08\x00\x2B\x2A\x25\x17"
  113. #define pbExchangeProviderDelegateGuid "\x9e\xb4\x77\x00\x74\xe4\x11\xce\x8c\x5e\x00\xaa\x00\x42\x54\xe2"
  114. #define pbExchangeProviderPublicGuid "\x78\xb2\xfa\x70\xaf\xf7\x11\xcd\x9b\xc8\x00\xaa\x00\x2f\xc4\x5a"
  115. #define pbExchangeProviderXportGuid "\xa9\x06\x40\xe0\xd6\x93\x11\xcd\xaf\x95\x00\xaa\x00\x4a\x35\xc3"
  116. // All properties in this section are readonly
  117. // Identity of store
  118. // All stores
  119. #define PR_USER_ENTRYID PROP_TAG( PT_BINARY, pidStoreMin+0x01)
  120. #define PR_USER_NAME PROP_TAG( PT_STRING8, pidStoreMin+0x02)
  121. // All mailbox stores
  122. #define PR_MAILBOX_OWNER_ENTRYID PROP_TAG( PT_BINARY, pidStoreMin+0x03)
  123. #define PR_MAILBOX_OWNER_NAME PROP_TAG( PT_STRING8, pidStoreMin+0x04)
  124. #define PR_OOF_STATE PROP_TAG( PT_BOOLEAN, pidStoreMin+0x05)
  125. // Public stores -- name of hierarchy server
  126. #define PR_HIERARCHY_SERVER PROP_TAG( PT_TSTRING, pidStoreMin+0x1B)
  127. // Entryids of special folders
  128. // All mailbox stores
  129. #define PR_SCHEDULE_FOLDER_ENTRYID PROP_TAG( PT_BINARY, pidStoreMin+0x06)
  130. // All mailbox and gateway stores
  131. #define PR_IPM_DAF_ENTRYID PROP_TAG( PT_BINARY, pidStoreMin+0x07)
  132. // Public store
  133. #define PR_NON_IPM_SUBTREE_ENTRYID PROP_TAG( PT_BINARY, pidStoreMin+0x08)
  134. #define PR_EFORMS_REGISTRY_ENTRYID PROP_TAG( PT_BINARY, pidStoreMin+0x09)
  135. #define PR_SPLUS_FREE_BUSY_ENTRYID PROP_TAG( PT_BINARY, pidStoreMin+0x0A)
  136. #define PR_OFFLINE_ADDRBOOK_ENTRYID PROP_TAG( PT_BINARY, pidStoreMin+0x0B)
  137. #define PR_EFORMS_FOR_LOCALE_ENTRYID PROP_TAG( PT_BINARY, pidStoreMin+0x0C)
  138. #define PR_FREE_BUSY_FOR_LOCAL_SITE_ENTRYID PROP_TAG( PT_BINARY, pidStoreMin+0x0D)
  139. #define PR_ADDRBOOK_FOR_LOCAL_SITE_ENTRYID PROP_TAG( PT_BINARY, pidStoreMin+0x0E)
  140. #define PR_OFFLINE_MESSAGE_ENTRYID PROP_TAG( PT_BINARY, pidStoreMin+0x0F)
  141. #define PR_IPM_FAVORITES_ENTRYID PROP_TAG( PT_BINARY, pidStoreMin+0x18)
  142. #define PR_IPM_PUBLIC_FOLDERS_ENTRYID PROP_TAG( PT_BINARY, pidStoreMin+0x19)
  143. // Gateway stores
  144. #define PR_GW_MTSIN_ENTRYID PROP_TAG( PT_BINARY, pidStoreMin+0x10)
  145. #define PR_GW_MTSOUT_ENTRYID PROP_TAG( PT_BINARY, pidStoreMin+0x11)
  146. #define PR_TRANSFER_ENABLED PROP_TAG( PT_BOOLEAN, pidStoreMin+0x12)
  147. // This property is preinitialized to 256 bytes of zeros
  148. // GetProp on this property is guaranteed to RPC. May be used
  149. // to determine line speed of connection to server.
  150. #define PR_TEST_LINE_SPEED PROP_TAG( PT_BINARY, pidStoreMin+0x13)
  151. // Used with OpenProperty to get interface, also on folders
  152. #define PR_HIERARCHY_SYNCHRONIZER PROP_TAG( PT_OBJECT, pidStoreMin+0x14)
  153. #define PR_CONTENTS_SYNCHRONIZER PROP_TAG( PT_OBJECT, pidStoreMin+0x15)
  154. #define PR_COLLECTOR PROP_TAG( PT_OBJECT, pidStoreMin+0x16)
  155. // Used with OpenProperty to get interface for folders, messages, attachmentson
  156. #define PR_FAST_TRANSFER PROP_TAG( PT_OBJECT, pidStoreMin+0x17)
  157. // This property is available on mailbox and public stores. If it exists
  158. // and its value is TRUE, the store is connected to the offline store provider.
  159. #define PR_STORE_OFFLINE PROP_TAG( PT_BOOLEAN, pidStoreMin+0x1A)
  160. // In transit state for store object. This state is
  161. // set when mail is being moved and it pauses mail delivery
  162. // to the mail box
  163. #define PR_IN_TRANSIT PROP_TAG( PT_BOOLEAN, pidStoreMin)
  164. // Writable only with Admin rights, available on public stores and folders
  165. #define PR_REPLICATION_STYLE PROP_TAG( PT_LONG, pidAdminMin)
  166. #define PR_REPLICATION_SCHEDULE PROP_TAG( PT_BINARY, pidAdminMin+0x01)
  167. #define PR_REPLICATION_MESSAGE_PRIORITY PROP_TAG( PT_LONG, pidAdminMin+0x02)
  168. // Writable only with Admin rights, available on public stores
  169. #define PR_OVERALL_MSG_AGE_LIMIT PROP_TAG( PT_LONG, pidAdminMin+0x03 )
  170. #define PR_REPLICATION_ALWAYS_INTERVAL PROP_TAG( PT_LONG, pidAdminMin+0x04 )
  171. #define PR_REPLICATION_MSG_SIZE PROP_TAG( PT_LONG, pidAdminMin+0x05 )
  172. // default replication style=always interval (minutes)
  173. #define STYLE_ALWAYS_INTERVAL_DEFAULT (ULONG) 15
  174. // default replication message size limit (KB)
  175. #define REPLICATION_MESSAGE_SIZE_LIMIT_DEFAULT (ULONG) 100
  176. // Values for PR_REPLICATION_STYLE
  177. #define STYLE_NEVER (ULONG) 0 // never replicate
  178. #define STYLE_NORMAL (ULONG) 1 // use 84 byte schedule TIB
  179. #define STYLE_ALWAYS (ULONG) 2 // replicate at fastest rate
  180. #define STYLE_DEFAULT (ULONG) -1 // default value
  181. /*------------------------------------------------------------------------
  182. *
  183. * INCREMENTAL CHANGE SYNCHRONIZATION
  184. * folder and message properties
  185. *
  186. *-----------------------------------------------------------------------*/
  187. #define PR_SOURCE_KEY PROP_TAG( PT_BINARY, pidExchangeNonXmitReservedMin+0x0)
  188. #define PR_PARENT_SOURCE_KEY PROP_TAG( PT_BINARY, pidExchangeNonXmitReservedMin+0x1)
  189. #define PR_CHANGE_KEY PROP_TAG( PT_BINARY, pidExchangeNonXmitReservedMin+0x2)
  190. #define PR_PREDECESSOR_CHANGE_LIST PROP_TAG( PT_BINARY, pidExchangeNonXmitReservedMin+0x3)
  191. /*------------------------------------------------------------------------
  192. *
  193. * FOLDER object properties
  194. *
  195. *-----------------------------------------------------------------------*/
  196. // Read only, available on all folders
  197. #define PR_FOLDER_CHILD_COUNT PROP_TAG( PT_LONG, pidFolderMin)
  198. #define PR_RIGHTS PROP_TAG( PT_LONG, pidFolderMin+0x01)
  199. #define PR_ACL_TABLE PROP_TAG( PT_OBJECT, pidExchangeXmitReservedMin)
  200. #define PR_RULES_TABLE PROP_TAG( PT_OBJECT, pidExchangeXmitReservedMin+0x1)
  201. #define PR_HAS_RULES PROP_TAG( PT_BOOLEAN, pidFolderMin+0x02)
  202. //Read only, available only for public folders
  203. #define PR_ADDRESS_BOOK_ENTRYID PROP_TAG( PT_BINARY, pidFolderMin+0x03)
  204. //Writable, available on folders in all stores
  205. #define PR_ACL_DATA PROP_TAG( PT_BINARY, pidExchangeXmitReservedMin)
  206. #define PR_RULES_DATA PROP_TAG( PT_BINARY, pidExchangeXmitReservedMin+0x1)
  207. #define PR_FOLDER_DESIGN_FLAGS PROP_TAG( PT_LONG, pidExchangeXmitReservedMin+0x2)
  208. #define PR_DESIGN_IN_PROGRESS PROP_TAG( PT_BOOLEAN, pidExchangeXmitReservedMin+0x4)
  209. #define PR_SECURE_ORIGINATION PROP_TAG( PT_BOOLEAN, pidExchangeXmitReservedMin+0x5)
  210. //Writable, available only for public folders
  211. #define PR_PUBLISH_IN_ADDRESS_BOOK PROP_TAG( PT_BOOLEAN, pidExchangeXmitReservedMin+0x6)
  212. #define PR_RESOLVE_METHOD PROP_TAG( PT_LONG, pidExchangeXmitReservedMin+0x7)
  213. #define PR_ADDRESS_BOOK_DISPLAY_NAME PROP_TAG( PT_TSTRING, pidExchangeXmitReservedMin+0x8)
  214. //Writable, used to indicate locale id for eforms registry subfolders
  215. #define PR_EFORMS_LOCALE_ID PROP_TAG( PT_LONG, pidExchangeXmitReservedMin+0x9)
  216. // Writable only with Admin rights, available only for public folders
  217. #define PR_REPLICA_LIST PROP_TAG( PT_BINARY, pidAdminMin+0x8)
  218. #define PR_OVERALL_AGE_LIMIT PROP_TAG( PT_LONG, pidAdminMin+0x9)
  219. //PR_RESOLVE_METHOD values
  220. #define RESOLVE_METHOD_DEFAULT ((LONG)0) // default handling attach conflicts
  221. #define RESOLVE_METHOD_LAST_WRITER_WINS ((LONG)1) // the last writer will win conflict
  222. #define RESOLVE_METHOD_NO_CONFLICT_NOTIFICATION ((LONG)2) // no conflict notif
  223. //Read only, available only for public folder favorites
  224. #define PR_PUBLIC_FOLDER_ENTRYID PROP_TAG( PT_BINARY, pidFolderMin+0x04)
  225. /*------------------------------------------------------------------------
  226. *
  227. * MESSAGE object properties
  228. *
  229. *-----------------------------------------------------------------------*/
  230. // Read only, automatically set on all messages in all stores
  231. #define PR_HAS_NAMED_PROPERTIES PROP_TAG(PT_BOOLEAN, pidMessageReadOnlyMin+0x0A)
  232. // Read only but outside the provider specific range for replication thru GDK-GWs
  233. #define PR_CREATOR_NAME PROP_TAG(PT_TSTRING, pidExchangeXmitReservedMin+0x18)
  234. #define PR_CREATOR_ENTRYID PROP_TAG(PT_BINARY, pidExchangeXmitReservedMin+0x19)
  235. #define PR_LAST_MODIFIER_NAME PROP_TAG(PT_TSTRING, pidExchangeXmitReservedMin+0x1A)
  236. #define PR_LAST_MODIFIER_ENTRYID PROP_TAG(PT_BINARY, pidExchangeXmitReservedMin+0x1B)
  237. // Read only, appears on messages which have DAM's pointing to them
  238. #define PR_HAS_DAMS PROP_TAG( PT_BOOLEAN, pidExchangeXmitReservedMin+0xA)
  239. #define PR_RULE_TRIGGER_HISTORY PROP_TAG( PT_BINARY, pidExchangeXmitReservedMin+0x12)
  240. #define PR_MOVE_TO_STORE_ENTRYID PROP_TAG( PT_BINARY, pidExchangeXmitReservedMin+0x13)
  241. #define PR_MOVE_TO_FOLDER_ENTRYID PROP_TAG( PT_BINARY, pidExchangeXmitReservedMin+0x14)
  242. // Read only, available only on messages in the public store
  243. #define PR_REPLICA_SERVER PROP_TAG(PT_TSTRING, pidMessageReadOnlyMin+0x4)
  244. // Writeable, used for recording send option dialog settings
  245. #define PR_DEFERRED_SEND_NUMBER PROP_TAG( PT_LONG, pidExchangeXmitReservedMin+0xB)
  246. #define PR_DEFERRED_SEND_UNITS PROP_TAG( PT_LONG, pidExchangeXmitReservedMin+0xC)
  247. #define PR_EXPIRY_NUMBER PROP_TAG( PT_LONG, pidExchangeXmitReservedMin+0xD)
  248. #define PR_EXPIRY_UNITS PROP_TAG( PT_LONG, pidExchangeXmitReservedMin+0xE)
  249. // Writeable, deferred send time
  250. #define PR_DEFERRED_SEND_TIME PROP_TAG( PT_SYSTIME, pidExchangeXmitReservedMin+0xF)
  251. //Writeable, intended for both folders and messages in gateway mailbox
  252. #define PR_GW_ADMIN_OPERATIONS PROP_TAG( PT_LONG, pidMessageWriteableMin)
  253. //Writeable, used for DMS messages
  254. #define PR_P1_CONTENT PROP_TAG( PT_BINARY, 0x1100)
  255. #define PR_P1_CONTENT_TYPE PROP_TAG( PT_BINARY, 0x1101)
  256. // Properties on deferred action messages
  257. #define PR_CLIENT_ACTIONS PROP_TAG(PT_BINARY, pidMessageReadOnlyMin+0x5)
  258. #define PR_DAM_ORIGINAL_ENTRYID PROP_TAG(PT_BINARY, pidMessageReadOnlyMin+0x6)
  259. #define PR_DAM_BACK_PATCHED PROP_TAG( PT_BOOLEAN, pidMessageReadOnlyMin+0x7)
  260. // Properties on deferred action error messages
  261. #define PR_RULE_ERROR PROP_TAG(PT_LONG, pidMessageReadOnlyMin+0x8)
  262. #define PR_RULE_ACTION_TYPE PROP_TAG(PT_LONG, pidMessageReadOnlyMin+0x9)
  263. #define PR_RULE_ACTION_NUMBER PROP_TAG(PT_LONG, pidMessageReadOnlyMin+0x10)
  264. #define PR_RULE_FOLDER_ENTRYID PROP_TAG(PT_BINARY, pidMessageReadOnlyMin+0x11)
  265. // Property on conflict notification indicating entryid of conflicting object
  266. #define PR_CONFLICT_ENTRYID PROP_TAG(PT_BINARY, pidExchangeXmitReservedMin+0x10)
  267. // Property on messages to indicate the language client used to create this message
  268. #define PR_MESSAGE_LOCALE_ID PROP_TAG(PT_LONG, pidExchangeXmitReservedMin+0x11)
  269. // Properties on Quota warning messages to indicate Storage quota and Excess used
  270. #define PR_STORAGE_QUOTA_LIMIT PROP_TAG(PT_LONG, pidExchangeXmitReservedMin+0x15)
  271. #define PR_EXCESS_STORAGE_USED PROP_TAG(PT_LONG, pidExchangeXmitReservedMin+0x16)
  272. #define PR_SVR_GENERATING_QUOTA_MSG PROP_TAG(PT_TSTRING, pidExchangeXmitReservedMin+0x17)
  273. // Property affixed by delegation rule and deleted on forwards
  274. #define PR_DELEGATED_BY_RULE PROP_TAG( PT_BOOLEAN, pidExchangeXmitReservedMin+0x3)
  275. // Message status bit used to indicate message is in conflict
  276. #define MSGSTATUS_IN_CONFLICT ((ULONG) 0x800)
  277. /*------------------------------------------------------------------------
  278. *
  279. * ATTACHMENT object properties
  280. *
  281. *-----------------------------------------------------------------------*/
  282. // Appears on attachments to a message marked to be in conflict. Identifies
  283. // those attachments which are conflicting versions of the top level message
  284. #define PR_IN_CONFLICT PROP_TAG(PT_BOOLEAN, pidAttachReadOnlyMin)
  285. /*------------------------------------------------------------------------
  286. *
  287. * TABLE object properties
  288. *
  289. * Id Range: 0x662F-0x662F
  290. *
  291. *-----------------------------------------------------------------------*/
  292. //This property can be used in a contents table to get PR_ENTRYID returned
  293. //as a long term entryid instead of a short term entryid.
  294. #define PR_LONGTERM_ENTRYID_FROM_TABLE PROP_TAG(PT_BINARY, pidSpecialMin)
  295. /*------------------------------------------------------------------------
  296. *
  297. * Gateway "MTE" ENVELOPE properties
  298. *
  299. * Id Range: 0x66E0-0x66FF
  300. *
  301. *-----------------------------------------------------------------------*/
  302. #define PR_ORIGINATOR_NAME PROP_TAG( PT_TSTRING, pidMessageWriteableMin+0x3)
  303. #define PR_ORIGINATOR_ADDR PROP_TAG( PT_TSTRING, pidMessageWriteableMin+0x4)
  304. #define PR_ORIGINATOR_ADDRTYPE PROP_TAG( PT_TSTRING, pidMessageWriteableMin+0x5)
  305. #define PR_ORIGINATOR_ENTRYID PROP_TAG( PT_BINARY, pidMessageWriteableMin+0x6)
  306. #define PR_ARRIVAL_TIME PROP_TAG( PT_SYSTIME, pidMessageWriteableMin+0x7)
  307. #define PR_TRACE_INFO PROP_TAG( PT_BINARY, pidMessageWriteableMin+0x8)
  308. #define PR_INTERNAL_TRACE_INFO PROP_TAG( PT_BINARY, pidMessageWriteableMin+0x12)
  309. #define PR_SUBJECT_TRACE_INFO PROP_TAG( PT_BINARY, pidMessageWriteableMin+0x9)
  310. #define PR_RECIPIENT_NUMBER PROP_TAG( PT_LONG, pidMessageWriteableMin+0xA)
  311. #define PR_MTS_SUBJECT_ID PROP_TAG(PT_BINARY, pidMessageWriteableMin+0xB)
  312. #define PR_REPORT_DESTINATION_NAME PROP_TAG(PT_TSTRING, pidMessageWriteableMin+0xC)
  313. #define PR_REPORT_DESTINATION_ENTRYID PROP_TAG(PT_BINARY, pidMessageWriteableMin+0xD)
  314. #define PR_CONTENT_SEARCH_KEY PROP_TAG(PT_BINARY, pidMessageWriteableMin+0xE)
  315. #define PR_FOREIGN_ID PROP_TAG(PT_BINARY, pidMessageWriteableMin+0xF)
  316. #define PR_FOREIGN_REPORT_ID PROP_TAG(PT_BINARY, pidMessageWriteableMin+0x10)
  317. #define PR_FOREIGN_SUBJECT_ID PROP_TAG(PT_BINARY, pidMessageWriteableMin+0x11)
  318. #define PR_MTS_ID PR_MESSAGE_SUBMISSION_ID
  319. #define PR_MTS_REPORT_ID PR_MESSAGE_SUBMISSION_ID
  320. /*------------------------------------------------------------------------
  321. *
  322. * Trace properties format
  323. * PR_TRACE_INFO
  324. * PR_INTERNAL_TRACE_INFO
  325. *
  326. *-----------------------------------------------------------------------*/
  327. #define MAX_ADMD_NAME_SIZ 17
  328. #define MAX_PRMD_NAME_SIZ 17
  329. #define MAX_COUNTRY_NAME_SIZ 4
  330. #define MAX_MTA_NAME_SIZ 33
  331. #define ADMN_PAD 3
  332. #define PRMD_PAD 3
  333. #define COUNTRY_PAD 0
  334. #define MTA_PAD 3
  335. typedef struct {
  336. LONG lAction; // The routing action the tracing site
  337. // took.
  338. FILETIME ftArrivalTime; // The time at which the communique
  339. // entered the tracing site.
  340. FILETIME ftDeferredTime; // The time are which the tracing site
  341. // released the message.
  342. char rgchADMDName[MAX_ADMD_NAME_SIZ+ADMN_PAD]; // ADMD
  343. char rgchCountryName[MAX_COUNTRY_NAME_SIZ+COUNTRY_PAD]; // Country
  344. char rgchPRMDId[MAX_PRMD_NAME_SIZ+PRMD_PAD]; // PRMD
  345. char rgchAttADMDName[MAX_ADMD_NAME_SIZ+ADMN_PAD]; // Attempted ADMD
  346. char rgchAttCountryName[MAX_COUNTRY_NAME_SIZ+COUNTRY_PAD]; // Attempted Country
  347. char rgchAttPRMDId[MAX_PRMD_NAME_SIZ+PRMD_PAD]; // Attempted PRMD
  348. } TRACEENTRY, FAR * LPTRACEENTRY;
  349. typedef struct {
  350. ULONG cEntries; // Number of trace entries
  351. TRACEENTRY rgtraceentry[MAPI_DIM]; // array of trace entries
  352. } TRACEINFO, FAR * LPTRACEINFO;
  353. typedef struct
  354. {
  355. LONG lAction; // The routing action the tracing domain took.
  356. FILETIME ftArrivalTime; // The time at which the communique entered the tracing domain.
  357. FILETIME ftDeferredTime; // The time are which the tracing domain released the message.
  358. char rgchADMDName[MAX_ADMD_NAME_SIZ+ADMN_PAD]; // ADMD
  359. char rgchCountryName[MAX_COUNTRY_NAME_SIZ+COUNTRY_PAD]; // Country
  360. char rgchPRMDId[MAX_PRMD_NAME_SIZ+PRMD_PAD]; // PRMD
  361. char rgchAttADMDName[MAX_ADMD_NAME_SIZ+ADMN_PAD]; // Attempted ADMD
  362. char rgchAttCountryName[MAX_COUNTRY_NAME_SIZ+COUNTRY_PAD]; // Attempted Country
  363. char rgchAttPRMDId[MAX_PRMD_NAME_SIZ+PRMD_PAD]; // Attempted PRMD
  364. char rgchMTAName[MAX_MTA_NAME_SIZ+MTA_PAD]; // MTA Name
  365. char rgchAttMTAName[MAX_MTA_NAME_SIZ+MTA_PAD]; // Attempted MTA Name
  366. }INTTRACEENTRY, *PINTTRACEENTRY;
  367. typedef struct
  368. {
  369. ULONG cEntries; // Number of trace entries
  370. INTTRACEENTRY rgIntTraceEntry[MAPI_DIM]; // array of internal trace entries
  371. }INTTRACEINFO, *PINTTRACEINFO;
  372. /*------------------------------------------------------------------------
  373. *
  374. * "IExchangeModifyTable" Interface Declaration
  375. *
  376. * Used for get/set rules and access control on folders.
  377. *
  378. *-----------------------------------------------------------------------*/
  379. /* ulRowFlags */
  380. #define ROWLIST_REPLACE ((ULONG)1)
  381. #define ROW_ADD ((ULONG)1)
  382. #define ROW_MODIFY ((ULONG)2)
  383. #define ROW_REMOVE ((ULONG)4)
  384. #define ROW_EMPTY (ROW_ADD|ROW_REMOVE)
  385. typedef struct _ROWENTRY
  386. {
  387. ULONG ulRowFlags;
  388. ULONG cValues;
  389. LPSPropValue rgPropVals;
  390. } ROWENTRY, FAR * LPROWENTRY;
  391. typedef struct _ROWLIST
  392. {
  393. ULONG cEntries;
  394. ROWENTRY aEntries[MAPI_DIM];
  395. } ROWLIST, FAR * LPROWLIST;
  396. #define EXCHANGE_IEXCHANGEMODIFYTABLE_METHODS(IPURE) \
  397. MAPIMETHOD(GetLastError) \
  398. (THIS_ HRESULT hResult, \
  399. ULONG ulFlags, \
  400. LPMAPIERROR FAR * lppMAPIError) IPURE; \
  401. MAPIMETHOD(GetTable) \
  402. (THIS_ ULONG ulFlags, \
  403. LPMAPITABLE FAR * lppTable) IPURE; \
  404. MAPIMETHOD(ModifyTable) \
  405. (THIS_ ULONG ulFlags, \
  406. LPROWLIST lpMods) IPURE;
  407. #undef INTERFACE
  408. #define INTERFACE IExchangeModifyTable
  409. DECLARE_MAPI_INTERFACE_(IExchangeModifyTable, IUnknown)
  410. {
  411. MAPI_IUNKNOWN_METHODS(PURE)
  412. EXCHANGE_IEXCHANGEMODIFYTABLE_METHODS(PURE)
  413. };
  414. #undef IMPL
  415. #define IMPL
  416. DECLARE_MAPI_INTERFACE_PTR(IExchangeModifyTable, LPEXCHANGEMODIFYTABLE);
  417. /* Access Control Specifics */
  418. //Properties
  419. #define PR_MEMBER_ID PROP_TAG( PT_I8, pidSpecialMin+0x01)
  420. #define PR_MEMBER_NAME PROP_TAG( PT_TSTRING, pidSpecialMin+0x02)
  421. #define PR_MEMBER_ENTRYID PR_ENTRYID
  422. #define PR_MEMBER_RIGHTS PROP_TAG( PT_LONG, pidSpecialMin+0x03)
  423. //Security bits
  424. typedef DWORD RIGHTS;
  425. #define frightsReadAny 0x0000001L
  426. #define frightsCreate 0x0000002L
  427. #define frightsEditOwned 0x0000008L
  428. #define frightsDeleteOwned 0x0000010L
  429. #define frightsEditAny 0x0000020L
  430. #define frightsDeleteAny 0x0000040L
  431. #define frightsCreateSubfolder 0x0000080L
  432. #define frightsOwner 0x0000100L
  433. #define frightsContact 0x0000200L // NOTE: not part of rightsAll
  434. #define rightsNone 0x00000000
  435. #define rightsReadOnly frightsReadAny
  436. #define rightsReadWrite (frightsReadAny|frightsEditAny)
  437. #define rightsAll 0x00001FBL
  438. /* Rules specifics */
  439. //Property types
  440. #define PT_SRESTRICTION ((ULONG) 0x00FD)
  441. #define PT_ACTIONS ((ULONG) 0x00FE)
  442. //Properties in rule table
  443. #define PR_RULE_ID PROP_TAG( PT_I8, pidSpecialMin+0x04)
  444. #define PR_RULE_IDS PROP_TAG( PT_BINARY, pidSpecialMin+0x05)
  445. #define PR_RULE_SEQUENCE PROP_TAG( PT_LONG, pidSpecialMin+0x06)
  446. #define PR_RULE_STATE PROP_TAG( PT_LONG, pidSpecialMin+0x07)
  447. #define PR_RULE_USER_FLAGS PROP_TAG( PT_LONG, pidSpecialMin+0x08)
  448. #define PR_RULE_CONDITION PROP_TAG( PT_SRESTRICTION, pidSpecialMin+0x09)
  449. #define PR_RULE_ACTIONS PROP_TAG( PT_ACTIONS, pidSpecialMin+0x10)
  450. #define PR_RULE_PROVIDER PROP_TAG( PT_STRING8, pidSpecialMin+0x11)
  451. #define PR_RULE_NAME PROP_TAG( PT_TSTRING, pidSpecialMin+0x12)
  452. #define PR_RULE_LEVEL PROP_TAG( PT_LONG, pidSpecialMin+0x13)
  453. #define PR_RULE_PROVIDER_DATA PROP_TAG( PT_BINARY, pidSpecialMin+0x14)
  454. //PR_STATE property values
  455. #define ST_DISABLED 0x0000
  456. #define ST_ENABLED 0x0001
  457. #define ST_ERROR 0x0002
  458. #define ST_ONLY_WHEN_OOF 0x0004
  459. #define ST_KEEP_OOF_HIST 0x0008
  460. #define ST_EXIT_LEVEL 0x0010
  461. #define ST_CLEAR_OOF_HIST 0x80000000
  462. //Empty restriction
  463. #define NULL_RESTRICTION 0xff
  464. // special RELOP for Member of DL
  465. #define RELOP_MEMBER_OF_DL 100
  466. //Action types
  467. typedef enum
  468. {
  469. OP_MOVE = 1,
  470. OP_COPY,
  471. OP_REPLY,
  472. OP_OOF_REPLY,
  473. OP_DEFER_ACTION,
  474. OP_BOUNCE,
  475. OP_FORWARD,
  476. OP_DELEGATE,
  477. OP_TAG,
  478. OP_DELETE,
  479. OP_MARK_AS_READ
  480. } ACTTYPE;
  481. // action flavors
  482. // for OP_REPLY
  483. #define DO_NOT_SEND_TO_ORIGINATOR 1
  484. //scBounceCode values
  485. #define BOUNCE_MESSAGE_SIZE_TOO_LARGE (SCODE) MAPI_DIAG_LENGTH_CONSTRAINT_VIOLATD
  486. #define BOUNCE_FORMS_MISMATCH (SCODE) MAPI_DIAG_RENDITION_UNSUPPORTED
  487. #define BOUNCE_ACCESS_DENIED (SCODE) MAPI_DIAG_MAIL_REFUSED
  488. //Message class prefix for Reply and OOF Reply templates
  489. #define szReplyTemplateMsgClassPrefix "IPM.Note.Rules.ReplyTemplate."
  490. #define szOofTemplateMsgClassPrefix "IPM.Note.Rules.OofTemplate."
  491. //Action structure
  492. typedef struct _action
  493. {
  494. ACTTYPE acttype;
  495. // to indicate which flavour of the action.
  496. ULONG ulActionFlavor;
  497. // Action restriction
  498. // currently unsed and must be set to NULL
  499. LPSRestriction lpRes;
  500. // currently unused, must be set to 0.
  501. LPSPropTagArray lpPropTagArray;
  502. // User defined flags
  503. ULONG ulFlags;
  504. // padding to align the union on 8 byte boundary
  505. ULONG dwAlignPad;
  506. union
  507. {
  508. // used for OP_MOVE and OP_COPY actions
  509. struct
  510. {
  511. ULONG cbStoreEntryId;
  512. LPENTRYID lpStoreEntryId;
  513. ULONG cbFldEntryId;
  514. LPENTRYID lpFldEntryId;
  515. } actMoveCopy;
  516. // used for OP_REPLY and OP_OOF_REPLY actions
  517. struct
  518. {
  519. ULONG cbEntryId;
  520. LPENTRYID lpEntryId;
  521. GUID guidReplyTemplate;
  522. } actReply;
  523. // used for OP_DEFER_ACTION action
  524. struct
  525. {
  526. ULONG cbData;
  527. BYTE *pbData;
  528. } actDeferAction;
  529. // Error code to set for OP_BOUNCE action
  530. SCODE scBounceCode;
  531. // list of address for OP_FORWARD and OP_DELEGATE action
  532. LPADRLIST lpadrlist;
  533. // prop value for OP_TAG action
  534. SPropValue propTag;
  535. };
  536. } ACTION, FAR * LPACTION;
  537. // Rules version
  538. #define EDK_RULES_VERSION 1
  539. //Array of actions
  540. typedef struct _actions
  541. {
  542. ULONG ulVersion; // use the #define above
  543. UINT cActions;
  544. LPACTION lpAction;
  545. } ACTIONS;
  546. // message class definitions for Deferred Action and Deffered Error messages
  547. #define szDamMsgClass "IPC.Microsoft Exchange 4.0.Deferred Action"
  548. #define szDemMsgClass "IPC.Microsoft Exchange 4.0.Deferred Error"
  549. /*
  550. * Rule error codes
  551. * Values for PR_RULE_ERROR
  552. */
  553. #define RULE_ERR_UNKNOWN 1 //general catchall error
  554. #define RULE_ERR_LOAD 2 //unable to load folder rules
  555. #define RULE_ERR_DELIVERY 3 //unable to deliver message temporarily
  556. #define RULE_ERR_PARSING 4 //error while parsing
  557. #define RULE_ERR_CREATE_DAE 5 //error creating DAE message
  558. #define RULE_ERR_NO_FOLDER 6 //folder to move/copy doesn't exist
  559. #define RULE_ERR_NO_RIGHTS 7 //no rights to move/copy into folder
  560. #define RULE_ERR_CREATE_DAM 8 //error creating DAM
  561. #define RULE_ERR_NO_SENDAS 9 //can not send as another user
  562. #define RULE_ERR_NO_TEMPLATE 10 //reply template is missing
  563. #define RULE_ERR_EXECUTION 11 //error in rule execution
  564. #define RULE_ERR_QUOTA_EXCEEDED 12
  565. #define RULE_ERR_FIRST RULE_ERR_UNKNOWN
  566. #define RULE_ERR_LAST RULE_ERR_QUOTA_EXCEEDED
  567. /*------------------------------------------------------------------------
  568. *
  569. * "IExchangeRuleAction" Interface Declaration
  570. *
  571. * Used for get actions from a Deferred Action Message.
  572. *
  573. *-----------------------------------------------------------------------*/
  574. #define EXCHANGE_IEXCHANGERULEACTION_METHODS(IPURE) \
  575. MAPIMETHOD(ActionCount) \
  576. (THIS_ ULONG FAR * lpcActions) IPURE; \
  577. MAPIMETHOD(GetAction) \
  578. (THIS_ ULONG ulActionNumber, \
  579. LARGE_INTEGER * lpruleid, \
  580. LPACTION FAR * lppAction) IPURE;
  581. #undef INTERFACE
  582. #define INTERFACE IExchangeRuleAction
  583. DECLARE_MAPI_INTERFACE_(IExchangeRuleAction, IUnknown)
  584. {
  585. MAPI_IUNKNOWN_METHODS(PURE)
  586. EXCHANGE_IEXCHANGERULEACTION_METHODS(PURE)
  587. };
  588. #undef IMPL
  589. #define IMPL
  590. DECLARE_MAPI_INTERFACE_PTR(IExchangeRuleAction, LPEXCHANGERULEACTION);
  591. /*------------------------------------------------------------------------
  592. *
  593. * "IExchangeManageStore" Interface Declaration
  594. *
  595. * Used for store management functions.
  596. *
  597. *-----------------------------------------------------------------------*/
  598. #define EXCHANGE_IEXCHANGEMANAGESTORE_METHODS(IPURE) \
  599. MAPIMETHOD(CreateStoreEntryID) \
  600. (THIS_ LPSTR lpszMsgStoreDN, \
  601. LPSTR lpszMailboxDN, \
  602. ULONG ulFlags, \
  603. ULONG FAR * lpcbEntryID, \
  604. LPENTRYID FAR * lppEntryID) IPURE; \
  605. MAPIMETHOD(EntryIDFromSourceKey) \
  606. (THIS_ ULONG cFolderKeySize, \
  607. BYTE FAR * lpFolderSourceKey, \
  608. ULONG cMessageKeySize, \
  609. BYTE FAR * lpMessageSourceKey, \
  610. ULONG FAR * lpcbEntryID, \
  611. LPENTRYID FAR * lppEntryID) IPURE; \
  612. MAPIMETHOD(GetRights) \
  613. (THIS_ ULONG cbUserEntryID, \
  614. LPENTRYID lpUserEntryID, \
  615. ULONG cbEntryID, \
  616. LPENTRYID lpEntryID, \
  617. ULONG FAR * lpulRights) IPURE; \
  618. MAPIMETHOD(GetMailboxTable) \
  619. (THIS_ LPSTR lpszServerName, \
  620. LPMAPITABLE FAR * lppTable, \
  621. ULONG ulFlags) IPURE; \
  622. MAPIMETHOD(GetPublicFolderTable) \
  623. (THIS_ LPSTR lpszServerName, \
  624. LPMAPITABLE FAR * lppTable, \
  625. ULONG ulFlags) IPURE;
  626. #undef INTERFACE
  627. #define INTERFACE IExchangeManageStore
  628. DECLARE_MAPI_INTERFACE_(IExchangeManageStore, IUnknown)
  629. {
  630. MAPI_IUNKNOWN_METHODS(PURE)
  631. EXCHANGE_IEXCHANGEMANAGESTORE_METHODS(PURE)
  632. };
  633. #undef IMPL
  634. #define IMPL
  635. DECLARE_MAPI_INTERFACE_PTR(IExchangeManageStore, LPEXCHANGEMANAGESTORE);
  636. // Properties for GetMailboxTable
  637. #define PR_NT_USER_NAME PROP_TAG( PT_TSTRING, pidAdminMin+0x10)
  638. #define PR_LOCALE_ID PROP_TAG( PT_LONG, pidAdminMin+0x11 )
  639. #define PR_LAST_LOGON_TIME PROP_TAG( PT_SYSTIME, pidAdminMin+0x12 )
  640. #define PR_LAST_LOGOFF_TIME PROP_TAG( PT_SYSTIME, pidAdminMin+0x13 )
  641. #define PR_STORAGE_LIMIT_INFORMATION PROP_TAG( PT_LONG, pidAdminMin+0x14 )
  642. // Properties for GetPublicFolderTable
  643. #define PR_FOLDER_FLAGS PROP_TAG( PT_LONG, pidAdminMin+0x18 )
  644. #define PR_LAST_ACCESS_TIME PROP_TAG( PT_SYSTIME, pidAdminMin+0x19 )
  645. #define PR_RESTRICTION_COUNT PROP_TAG( PT_LONG, pidAdminMin+0x1A )
  646. #define PR_CATEG_COUNT PROP_TAG( PT_LONG, pidAdminMin+0x1B )
  647. #define PR_CACHED_COLUMN_COUNT PROP_TAG( PT_LONG, pidAdminMin+0x1C )
  648. #define PR_NORMAL_MSG_W_ATTACH_COUNT PROP_TAG( PT_LONG, pidAdminMin+0x1D )
  649. #define PR_ASSOC_MSG_W_ATTACH_COUNT PROP_TAG( PT_LONG, pidAdminMin+0x1E )
  650. #define PR_RECIPIENT_ON_NORMAL_MSG_COUNT PROP_TAG( PT_LONG, pidAdminMin+0x1F )
  651. #define PR_RECIPIENT_ON_ASSOC_MSG_COUNT PROP_TAG( PT_LONG, pidAdminMin+0x20 )
  652. #define PR_ATTACH_ON_NORMAL_MSG_COUNT PROP_TAG( PT_LONG, pidAdminMin+0x21 )
  653. #define PR_ATTACH_ON_ASSOC_MSG_COUNT PROP_TAG( PT_LONG, pidAdminMin+0x22 )
  654. #define PR_NORMAL_MESSAGE_SIZE PROP_TAG( PT_LONG, pidAdminMin+0x23 )
  655. #define PR_NORMAL_MESSAGE_SIZE_EXTENDED PROP_TAG( PT_I8, pidAdminMin+0x23 )
  656. #define PR_ASSOC_MESSAGE_SIZE PROP_TAG( PT_LONG, pidAdminMin+0x24 )
  657. #define PR_ASSOC_MESSAGE_SIZE_EXTENDED PROP_TAG( PT_I8, pidAdminMin+0x24 )
  658. #define PR_FOLDER_PATHNAME PROP_TAG(PT_TSTRING, pidAdminMin+0x25 )
  659. #define PR_OWNER_COUNT PROP_TAG( PT_LONG, pidAdminMin+0x26 )
  660. #define PR_CONTACT_COUNT PROP_TAG( PT_LONG, pidAdminMin+0x27 )
  661. // PT_I8 version of PR_MESSAGE_SIZE defined in mapitags.h
  662. #define PR_MESSAGE_SIZE_EXTENDED PROP_TAG(PT_I8, PROP_ID(PR_MESSAGE_SIZE))
  663. /* Bits in PR_FOLDER_FLAGS */
  664. #define MDB_FOLDER_IPM 0x1
  665. #define MDB_FOLDER_SEARCH 0x2
  666. #define MDB_FOLDER_NORMAL 0x4
  667. #define MDB_FOLDER_RULES 0x8
  668. /* Bits used in ulFlags in GetPublicFolderTable() */
  669. #define MDB_NON_IPM 0x10
  670. #define MDB_IPM 0x20
  671. /* Bits in PR_STORAGE_LIMIT_INFORMATION */
  672. #define MDB_LIMIT_BELOW 0x1
  673. #define MDB_LIMIT_ISSUE_WARNING 0x2
  674. #define MDB_LIMIT_PROHIBIT_SEND 0x4
  675. #define MDB_LIMIT_NO_CHECK 0x8
  676. /*------------------------------------------------------------------------
  677. *
  678. * "IExchangeFastTransfer" Interface Declaration
  679. *
  680. * Used for fast transfer interface used to
  681. * implement CopyTo, CopyProps, CopyFolder, and
  682. * CopyMessages.
  683. *
  684. *-----------------------------------------------------------------------*/
  685. // Transfer flags
  686. // Use MAPI_MOVE for move option
  687. // Transfer methods
  688. #define TRANSFER_COPYTO 1
  689. #define TRANSFER_COPYPROPS 2
  690. #define TRANSFER_COPYMESSAGES 3
  691. #define TRANSFER_COPYFOLDER 4
  692. #define EXCHANGE_IEXCHANGEFASTTRANSFER_METHODS(IPURE) \
  693. MAPIMETHOD(Config) \
  694. (THIS_ ULONG ulFlags, \
  695. ULONG ulTransferMethod) IPURE; \
  696. MAPIMETHOD(TransferBuffer) \
  697. (THIS_ ULONG cb, \
  698. LPBYTE lpb, \
  699. ULONG *lpcbProcessed) IPURE; \
  700. STDMETHOD_(BOOL, IsInterfaceOk) \
  701. (THIS_ ULONG ulTransferMethod, \
  702. REFIID refiid, \
  703. LPSPropTagArray lpptagList, \
  704. ULONG ulFlags) IPURE;
  705. #undef INTERFACE
  706. #define INTERFACE IExchangeFastTransfer
  707. DECLARE_MAPI_INTERFACE_(IExchangeFastTransfer, IUnknown)
  708. {
  709. MAPI_IUNKNOWN_METHODS(PURE)
  710. EXCHANGE_IEXCHANGEFASTTRANSFER_METHODS(PURE)
  711. };
  712. #undef IMPL
  713. #define IMPL
  714. DECLARE_MAPI_INTERFACE_PTR(IExchangeFastTransfer, LPEXCHANGEFASTTRANSFER);
  715. /*------------------------------------------------------------------------
  716. *
  717. * "IExchangeExportChanges" Interface Declaration
  718. *
  719. * Used for Incremental Synchronization
  720. *
  721. *-----------------------------------------------------------------------*/
  722. #define EXCHANGE_IEXCHANGEEXPORTCHANGES_METHODS(IPURE) \
  723. MAPIMETHOD(GetLastError) \
  724. (THIS_ HRESULT hResult, \
  725. ULONG ulFlags, \
  726. LPMAPIERROR FAR * lppMAPIError) IPURE; \
  727. MAPIMETHOD(Config) \
  728. (THIS_ LPSTREAM lpStream, \
  729. ULONG ulFlags, \
  730. LPUNKNOWN lpUnk, \
  731. LPSRestriction lpRestriction, \
  732. LPSPropTagArray lpIncludeProps, \
  733. LPSPropTagArray lpExcludeProps, \
  734. ULONG ulBufferSize) IPURE; \
  735. MAPIMETHOD(Synchronize) \
  736. (THIS_ ULONG FAR * lpulSteps, \
  737. ULONG FAR * lpulProgress) IPURE; \
  738. MAPIMETHOD(UpdateState) \
  739. (THIS_ LPSTREAM lpStream) IPURE;
  740. #undef INTERFACE
  741. #define INTERFACE IExchangeExportChanges
  742. DECLARE_MAPI_INTERFACE_(IExchangeExportChanges, IUnknown)
  743. {
  744. MAPI_IUNKNOWN_METHODS(PURE)
  745. EXCHANGE_IEXCHANGEEXPORTCHANGES_METHODS(PURE)
  746. };
  747. #undef IMPL
  748. #define IMPL
  749. DECLARE_MAPI_INTERFACE_PTR(IExchangeExportChanges, LPEXCHANGEEXPORTCHANGES);
  750. typedef struct _ReadState
  751. {
  752. ULONG cbSourceKey;
  753. BYTE * pbSourceKey;
  754. ULONG ulFlags;
  755. } READSTATE, *LPREADSTATE;
  756. /*------------------------------------------------------------------------
  757. *
  758. * "IExchangeImportContentsChanges" Interface Declaration
  759. *
  760. * Used for Incremental Synchronization of folder contents (i.e. messages)
  761. *
  762. *-----------------------------------------------------------------------*/
  763. #define EXCHANGE_IEXCHANGEIMPORTCONTENTSCHANGES_METHODS(IPURE) \
  764. MAPIMETHOD(GetLastError) \
  765. (THIS_ HRESULT hResult, \
  766. ULONG ulFlags, \
  767. LPMAPIERROR FAR * lppMAPIError) IPURE; \
  768. MAPIMETHOD(Config) \
  769. (THIS_ LPSTREAM lpStream, \
  770. ULONG ulFlags) IPURE; \
  771. MAPIMETHOD(UpdateState) \
  772. (THIS_ LPSTREAM lpStream) IPURE; \
  773. MAPIMETHOD(ImportMessageChange) \
  774. (THIS_ ULONG cpvalChanges, \
  775. LPSPropValue ppvalChanges, \
  776. ULONG ulFlags, \
  777. LPMESSAGE *lppmessage) IPURE; \
  778. MAPIMETHOD(ImportMessageDeletion) \
  779. (THIS_ ULONG ulFlags, \
  780. LPENTRYLIST lpSrcEntryList) IPURE; \
  781. MAPIMETHOD(ImportPerUserReadStateChange) \
  782. (THIS_ ULONG cElements, \
  783. LPREADSTATE lpReadState) IPURE; \
  784. MAPIMETHOD(ImportMessageMove) \
  785. (THIS_ ULONG cbSourceKeySrcFolder, \
  786. BYTE FAR * pbSourceKeySrcFolder, \
  787. ULONG cbSourceKeySrcMessage, \
  788. BYTE FAR * pbSourceKeySrcMessage, \
  789. ULONG cbPCLMessage, \
  790. BYTE FAR * pbPCLMessage, \
  791. ULONG cbSourceKeyDestMessage, \
  792. BYTE FAR * pbSourceKeyDestMessage, \
  793. ULONG cbChangeNumDestMessage, \
  794. BYTE FAR * pbChangeNumDestMessage) IPURE;
  795. #undef INTERFACE
  796. #define INTERFACE IExchangeImportContentsChanges
  797. DECLARE_MAPI_INTERFACE_(IExchangeImportContentsChanges, IUnknown)
  798. {
  799. MAPI_IUNKNOWN_METHODS(PURE)
  800. EXCHANGE_IEXCHANGEIMPORTCONTENTSCHANGES_METHODS(PURE)
  801. };
  802. #undef IMPL
  803. #define IMPL
  804. DECLARE_MAPI_INTERFACE_PTR(IExchangeImportContentsChanges,
  805. LPEXCHANGEIMPORTCONTENTSCHANGES);
  806. /*------------------------------------------------------------------------
  807. *
  808. * "IExchangeImportHierarchyChanges" Interface Declaration
  809. *
  810. * Used for Incremental Synchronization of folder hierarchy
  811. *
  812. *-----------------------------------------------------------------------*/
  813. #define EXCHANGE_IEXCHANGEIMPORTHIERARCHYCHANGES_METHODS(IPURE) \
  814. MAPIMETHOD(GetLastError) \
  815. (THIS_ HRESULT hResult, \
  816. ULONG ulFlags, \
  817. LPMAPIERROR FAR * lppMAPIError) IPURE; \
  818. MAPIMETHOD(Config) \
  819. (THIS_ LPSTREAM lpStream, \
  820. ULONG ulFlags) IPURE; \
  821. MAPIMETHOD(UpdateState) \
  822. (THIS_ LPSTREAM lpStream) IPURE; \
  823. MAPIMETHOD(ImportFolderChange) \
  824. (THIS_ ULONG cpvalChanges, \
  825. LPSPropValue ppvalChanges) IPURE; \
  826. MAPIMETHOD(ImportFolderDeletion) \
  827. (THIS_ ULONG ulFlags, \
  828. LPENTRYLIST lpSrcEntryList) IPURE;
  829. #undef INTERFACE
  830. #define INTERFACE IExchangeImportHierarchyChanges
  831. DECLARE_MAPI_INTERFACE_(IExchangeImportHierarchyChanges, IUnknown)
  832. {
  833. MAPI_IUNKNOWN_METHODS(PURE)
  834. EXCHANGE_IEXCHANGEIMPORTHIERARCHYCHANGES_METHODS(PURE)
  835. };
  836. #undef IMPL
  837. #define IMPL
  838. DECLARE_MAPI_INTERFACE_PTR(IExchangeImportHierarchyChanges,
  839. LPEXCHANGEIMPORTHIERARCHYCHANGES);
  840. /*------------------------------------------------------------------------
  841. *
  842. * Errors returned by Exchange Incremental Change Synchronization Interface
  843. *
  844. *-----------------------------------------------------------------------*/
  845. #define MAKE_SYNC_E(err) (MAKE_SCODE(SEVERITY_ERROR, FACILITY_ITF, err))
  846. #define MAKE_SYNC_W(warn) (MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_ITF, warn))
  847. #define SYNC_E_UNKNOWN_FLAGS MAPI_E_UNKNOWN_FLAGS
  848. #define SYNC_E_INVALID_PARAMETER E_INVALIDARG
  849. #define SYNC_E_ERROR E_FAIL
  850. #define SYNC_E_OBJECT_DELETED MAKE_SYNC_E(0x800)
  851. #define SYNC_E_IGNORE MAKE_SYNC_E(0x801)
  852. #define SYNC_E_CONFLICT MAKE_SYNC_E(0x802)
  853. #define SYNC_E_NO_PARENT MAKE_SYNC_E(0x803)
  854. #define SYNC_E_INCEST MAKE_SYNC_E(0x804)
  855. #define SYNC_E_UNSYNCHRONIZED MAKE_SYNC_E(0x805)
  856. #define SYNC_W_PROGRESS MAKE_SYNC_W(0x820)
  857. #define SYNC_W_CLIENT_CHANGE_NEWER MAKE_SYNC_W(0x821)
  858. /*------------------------------------------------------------------------
  859. *
  860. * Flags used by Exchange Incremental Change Synchronization Interface
  861. *
  862. *-----------------------------------------------------------------------*/
  863. #define SYNC_UNICODE 0x01
  864. #define SYNC_NO_DELETIONS 0x02
  865. #define SYNC_NO_SOFT_DELETIONS 0x04
  866. #define SYNC_READ_STATE 0x08
  867. #define SYNC_ASSOCIATED 0x10
  868. #define SYNC_NORMAL 0x20
  869. #define SYNC_NO_CONFLICTS 0x40
  870. #define SYNC_ONLY_SPECIFIED_PROPS 0x80
  871. #define SYNC_NO_FOREIGN_KEYS 0x100
  872. #define SYNC_LIMITED_IMESSAGE 0x200
  873. /*------------------------------------------------------------------------
  874. *
  875. * Flags used by ImportMessageDeletion and ImportFolderDeletion methods
  876. *
  877. *-----------------------------------------------------------------------*/
  878. #define SYNC_SOFT_DELETE 0x01
  879. #define SYNC_EXPIRY 0x02
  880. /*------------------------------------------------------------------------
  881. *
  882. * Flags used by ImportPerUserReadStateChange method
  883. *
  884. *-----------------------------------------------------------------------*/
  885. #define SYNC_READ 0x01
  886. /*------------------------------------------------------------------------
  887. *
  888. * "IExchangeFavorites" Interface Declaration
  889. *
  890. * Used for adding or removing favorite folders from the public store.
  891. * This interface is obtained by calling QueryInterface on the folder
  892. * whose EntryID is specified by PR_IPM_FAVORITES_ENTRYID on the public
  893. * store.
  894. *
  895. *-----------------------------------------------------------------------*/
  896. #define EXCHANGE_IEXCHANGEFAVORITES_METHODS(IPURE) \
  897. MAPIMETHOD(GetLastError) \
  898. (THIS_ HRESULT hResult, \
  899. ULONG ulFlags, \
  900. LPMAPIERROR FAR * lppMAPIError) IPURE; \
  901. MAPIMETHOD(AddFavorites) \
  902. (THIS_ LPENTRYLIST lpEntryList) IPURE; \
  903. MAPIMETHOD(DelFavorites) \
  904. (THIS_ LPENTRYLIST lpEntryList) IPURE; \
  905. #undef INTERFACE
  906. #define INTERFACE IExchangeFavorites
  907. DECLARE_MAPI_INTERFACE_(IExchangeFavorites, IUnknown)
  908. {
  909. MAPI_IUNKNOWN_METHODS(PURE)
  910. EXCHANGE_IEXCHANGEFAVORITES_METHODS(PURE)
  911. };
  912. DECLARE_MAPI_INTERFACE_PTR(IExchangeFavorites, LPEXCHANGEFAVORITES);
  913. /*------------------------------------------------------------------------
  914. *
  915. * Properties used by the Offline Folders API
  916. *
  917. *-----------------------------------------------------------------------*/
  918. #define PR_OFFLINE_FLAGS PROP_TAG( PT_LONG, pidFolderMin + 0x5)
  919. #define PR_SYNCHRONIZE_FLAGS PROP_TAG( PT_LONG, pidExchangeNonXmitReservedMin + 0x4)
  920. /*------------------------------------------------------------------------
  921. *
  922. * Flags used by the Offline Folders API
  923. *
  924. *-----------------------------------------------------------------------*/
  925. #define OF_AVAILABLE_OFFLINE ((ULONG) 0x00000001)
  926. #define OF_FORCE ((ULONG) 0x80000000)
  927. #define SF_DISABLE_STARTUP_SYNC ((ULONG) 0x00000001)
  928. #endif //EDKMDB_INCLUDED