home *** CD-ROM | disk | FTP | other *** search
/ PC Format (South-Africa) 2001 May / PCFMay2001.iso / Xenon / C++ / FreeCommandLineTools.exe / Include / edkmdb.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-01-31  |  43.3 KB  |  1,130 lines

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