edkmdb.h 47 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018
  1. /*
  2. * Copyright 2005 - 2016 Zarafa and its licensors
  3. *
  4. * This program is free software: you can redistribute it and/or modify
  5. * it under the terms of the GNU Affero General Public License, version 3,
  6. * as published by the Free Software Foundation.
  7. *
  8. * This program is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * GNU Affero General Public License for more details.
  12. *
  13. * You should have received a copy of the GNU Affero General Public License
  14. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  15. *
  16. */
  17. #ifndef __M4L_EDKMDB_H_
  18. #define __M4L_EDKMDB_H_
  19. /*
  20. * No, this is not the edkmdb.h file,
  21. * but it contains the exchange interfaces used in kopano
  22. */
  23. #define OPENSTORE_USE_ADMIN_PRIVILEGE ((ULONG)1)
  24. #define OPENSTORE_PUBLIC ((ULONG)2)
  25. #define OPENSTORE_HOME_LOGON ((ULONG)4)
  26. #define OPENSTORE_TAKE_OWNERSHIP ((ULONG)8)
  27. #define OPENSTORE_OVERRIDE_HOME_MDB ((ULONG)16)
  28. #define OPENSTORE_TRANSPORT ((ULONG)32)
  29. #define OPENSTORE_REMOTE_TRANSPORT ((ULONG)64)
  30. #include <kopano/platform.h>
  31. #include <initializer_list>
  32. class IExchangeManageStore : public IUnknown {
  33. public:
  34. virtual HRESULT __stdcall CreateStoreEntryID(LPTSTR lpszMsgStoreDN, LPTSTR lpszMailboxDN, ULONG ulFlags, ULONG *lpcbEntryID,
  35. LPENTRYID *lppEntryID) = 0;
  36. virtual HRESULT __stdcall EntryIDFromSourceKey(ULONG cFolderKeySize, BYTE *lpFolderSourceKey, ULONG cMessageKeySize,
  37. BYTE *lpMessageSourceKey, ULONG *lpcbEntryID, LPENTRYID *lppEntryID) = 0;
  38. virtual HRESULT __stdcall GetRights(ULONG cbUserEntryID, LPENTRYID lpUserEntryID, ULONG cbEntryID, LPENTRYID lpEntryID,
  39. ULONG *lpulRights) = 0;
  40. virtual HRESULT __stdcall GetMailboxTable(LPTSTR lpszServerName, LPMAPITABLE *lppTable, ULONG ulFlags) = 0;
  41. virtual HRESULT __stdcall GetPublicFolderTable(LPTSTR lpszServerName, LPMAPITABLE *lppTable, ULONG ulFlags) = 0;
  42. };
  43. class IExchangeManageStore6 : public IUnknown {
  44. public:
  45. virtual HRESULT __stdcall CreateStoreEntryID(LPTSTR lpszMsgStoreDN, LPTSTR lpszMailboxDN, ULONG ulFlags, ULONG *lpcbEntryID,
  46. LPENTRYID *lppEntryID) = 0;
  47. virtual HRESULT __stdcall EntryIDFromSourceKey(ULONG cFolderKeySize, BYTE *lpFolderSourceKey, ULONG cMessageKeySize,
  48. BYTE *lpMessageSourceKey, ULONG *lpcbEntryID, LPENTRYID *lppEntryID) = 0;
  49. virtual HRESULT __stdcall GetRights(ULONG cbUserEntryID, LPENTRYID lpUserEntryID, ULONG cbEntryID, LPENTRYID lpEntryID,
  50. ULONG *lpulRights) = 0;
  51. virtual HRESULT __stdcall GetMailboxTable(LPTSTR lpszServerName, LPMAPITABLE *lppTable, ULONG ulFlags) = 0;
  52. virtual HRESULT __stdcall GetPublicFolderTable(LPTSTR lpszServerName, LPMAPITABLE *lppTable, ULONG ulFlags) = 0;
  53. virtual HRESULT __stdcall CreateStoreEntryIDEx(LPTSTR lpszMsgStoreDN, LPTSTR lpszEmailAddress, LPTSTR lpszMailboxDN, ULONG ulFlags,
  54. ULONG *lpcbEntryID, LPENTRYID *lppEntryID) = 0;
  55. };
  56. class IExchangeManageStoreEx : public IUnknown {
  57. public:
  58. virtual HRESULT __stdcall CreateStoreEntryID(LPTSTR lpszMsgStoreDN, LPTSTR lpszMailboxDN, ULONG ulFlags, ULONG *lpcbEntryID,
  59. LPENTRYID *lppEntryID) = 0;
  60. virtual HRESULT __stdcall EntryIDFromSourceKey(ULONG cFolderKeySize, BYTE *lpFolderSourceKey, ULONG cMessageKeySize,
  61. BYTE *lpMessageSourceKey, ULONG *lpcbEntryID, LPENTRYID *lppEntryID) = 0;
  62. virtual HRESULT __stdcall GetRights(ULONG cbUserEntryID, LPENTRYID lpUserEntryID, ULONG cbEntryID, LPENTRYID lpEntryID,
  63. ULONG *lpulRights) = 0;
  64. virtual HRESULT __stdcall GetMailboxTable(LPTSTR lpszServerName, LPMAPITABLE *lppTable, ULONG ulFlags) = 0;
  65. virtual HRESULT __stdcall GetPublicFolderTable(LPTSTR lpszServerName, LPMAPITABLE *lppTable, ULONG ulFlags) = 0;
  66. virtual HRESULT __stdcall CreateStoreEntryID2(ULONG cValues, LPSPropValue lpProps, ULONG ulFlags, ULONG *lpcbEntryID, LPENTRYID *lppEntryID) = 0;
  67. };
  68. typedef IExchangeManageStore* LPEXCHANGEMANAGESTORE;
  69. #define pidStoreNonTransMin 0x0E40
  70. #define pidExchangeXmitReservedMin 0x3FE0
  71. #define pidExchangeNonXmitReservedMin 0x65E0
  72. #define pidProfileMin 0x6600
  73. #define pidStoreMin 0x6618
  74. #define pidFolderMin 0x6638
  75. #define pidMessageReadOnlyMin 0x6640
  76. #define pidMessageWriteableMin 0x6658
  77. #define pidAttachReadOnlyMin 0x666C
  78. #define pidSpecialMin 0x6670
  79. #define pidAdminMin 0x6690
  80. #define pidSecureProfileMin PROP_ID_SECURE_MIN
  81. #define pidRenMsgFldMin 0x1080
  82. #define pidLocalStoreInternalMin 0x6500
  83. #define pidLocalStoreInternalMax 0x65C0
  84. #define PR_NON_IPM_SUBTREE_ENTRYID PROP_TAG( PT_BINARY, pidStoreMin+0x08)
  85. #define PR_IPM_FAVORITES_ENTRYID PROP_TAG( PT_BINARY, pidStoreMin+0x18)
  86. #define PR_IPM_PUBLIC_FOLDERS_ENTRYID PROP_TAG( PT_BINARY, pidStoreMin+0x19)
  87. /* missing PR_* defines for common/ECDebug */
  88. #define PR_PROFILE_VERSION PROP_TAG(PT_LONG, pidProfileMin+0x00)
  89. #define PR_PROFILE_CONFIG_FLAGS PROP_TAG(PT_LONG, pidProfileMin+0x01)
  90. #define PR_PROFILE_HOME_SERVER PROP_TAG(PT_STRING8, pidProfileMin+0x02)
  91. #define PR_PROFILE_HOME_SERVER_DN PROP_TAG(PT_STRING8, pidProfileMin+0x12)
  92. #define PR_PROFILE_HOME_SERVER_ADDRS PROP_TAG(PT_MV_STRING8, pidProfileMin+0x13)
  93. #define PR_PROFILE_USER PROP_TAG(PT_STRING8, pidProfileMin+0x03)
  94. #define PR_PROFILE_CONNECT_FLAGS PROP_TAG(PT_LONG, pidProfileMin+0x04)
  95. #define PR_PROFILE_TRANSPORT_FLAGS PROP_TAG(PT_LONG, pidProfileMin+0x05)
  96. #define PR_PROFILE_UI_STATE PROP_TAG(PT_LONG, pidProfileMin+0x06)
  97. #define PR_PROFILE_UNRESOLVED_NAME PROP_TAG(PT_STRING8, pidProfileMin+0x07)
  98. #define PR_PROFILE_UNRESOLVED_SERVER PROP_TAG(PT_STRING8, pidProfileMin+0x08)
  99. #define PR_PROFILE_BINDING_ORDER PROP_TAG(PT_STRING8, pidProfileMin+0x09)
  100. #define PR_PROFILE_MAX_RESTRICT PROP_TAG(PT_LONG, pidProfileMin+0x0D)
  101. #define PR_PROFILE_AB_FILES_PATH PROP_TAG(PT_STRING8, pidProfileMin+0xE)
  102. #define PR_PROFILE_OFFLINE_STORE_PATH PROP_TAG(PT_STRING8, pidProfileMin+0x10)
  103. #define PR_PROFILE_OFFLINE_INFO PROP_TAG(PT_BINARY, pidProfileMin+0x11)
  104. #define PR_PROFILE_ADDR_INFO PROP_TAG(PT_BINARY, pidSpecialMin+0x17)
  105. #define PR_PROFILE_OPTIONS_DATA PROP_TAG(PT_BINARY, pidSpecialMin+0x19)
  106. #define PR_PROFILE_SECURE_MAILBOX PROP_TAG(PT_BINARY, pidSecureProfileMin+0x00)
  107. #define PR_DISABLE_WINSOCK PROP_TAG(PT_LONG, pidProfileMin+0x18)
  108. #define PR_PROFILE_AUTH_PACKAGE PROP_TAG(PT_LONG, pidProfileMin+0x19)
  109. #define PR_PROFILE_RECONNECT_INTERVAL PROP_TAG(PT_LONG, pidProfileMin+0x1A)
  110. #define PR_PROFILE_SERVER_VERSION PROP_TAG(PT_LONG, pidProfileMin+0x1B)
  111. #define PR_OST_ENCRYPTION PROP_TAG(PT_LONG, 0x6702)
  112. #define PR_PROFILE_OPEN_FLAGS PROP_TAG(PT_LONG, pidProfileMin+0x09)
  113. #define PR_PROFILE_TYPE PROP_TAG(PT_LONG, pidProfileMin+0x0A)
  114. #define PR_PROFILE_MAILBOX PROP_TAG(PT_STRING8, pidProfileMin+0x0B)
  115. #define PR_PROFILE_SERVER PROP_TAG(PT_STRING8, pidProfileMin+0x0C)
  116. #define PR_PROFILE_SERVER_DN PROP_TAG(PT_STRING8, pidProfileMin+0x14)
  117. #define PR_PROFILE_FAVFLD_DISPLAY_NAME PROP_TAG(PT_STRING8, pidProfileMin+0x0F)
  118. #define PR_PROFILE_FAVFLD_COMMENT PROP_TAG(PT_STRING8, pidProfileMin+0x15)
  119. #define PR_PROFILE_ALLPUB_DISPLAY_NAME PROP_TAG(PT_STRING8, pidProfileMin+0x16)
  120. #define PR_PROFILE_ALLPUB_COMMENT PROP_TAG(PT_STRING8, pidProfileMin+0x17)
  121. #define PR_PROFILE_MOAB PROP_TAG(PT_STRING8, pidSpecialMin+0x0B)
  122. #define PR_PROFILE_MOAB_GUID PROP_TAG(PT_STRING8, pidSpecialMin+0x0C)
  123. #define PR_PROFILE_MOAB_SEQ PROP_TAG(PT_LONG, pidSpecialMin+0x0D)
  124. #define PR_GET_PROPS_EXCLUDE_PROP_ID_LIST PROP_TAG(PT_BINARY, pidSpecialMin+0x0E)
  125. #define PR_USER_ENTRYID PROP_TAG(PT_BINARY, pidStoreMin+0x01)
  126. #define PR_USER_NAME PROP_TAG( PT_TSTRING, pidStoreMin+0x02)
  127. #define PR_USER_NAME_A PROP_TAG( PT_STRING8, pidStoreMin+0x02)
  128. #define PR_USER_NAME_W PROP_TAG( PT_UNICODE, pidStoreMin+0x02)
  129. #define PR_MAILBOX_OWNER_ENTRYID PROP_TAG(PT_BINARY, pidStoreMin+0x03)
  130. #define PR_MAILBOX_OWNER_NAME PROP_TAG( PT_TSTRING, pidStoreMin+0x04)
  131. #define PR_MAILBOX_OWNER_NAME_A PROP_TAG( PT_STRING8, pidStoreMin+0x04)
  132. #define PR_MAILBOX_OWNER_NAME_W PROP_TAG( PT_UNICODE, pidStoreMin+0x04)
  133. #define PR_OOF_STATE PROP_TAG(PT_BOOLEAN, pidStoreMin+0x05)
  134. #define PR_HIERARCHY_SERVER PROP_TAG(PT_TSTRING, pidStoreMin+0x1B)
  135. #define PR_SCHEDULE_FOLDER_ENTRYID PROP_TAG(PT_BINARY, pidStoreMin+0x06)
  136. #define PR_IPM_DAF_ENTRYID PROP_TAG(PT_BINARY, pidStoreMin+0x07)
  137. #define PR_EFORMS_REGISTRY_ENTRYID PROP_TAG(PT_BINARY, pidStoreMin+0x09)
  138. #define PR_SPLUS_FREE_BUSY_ENTRYID PROP_TAG(PT_BINARY, pidStoreMin+0x0A)
  139. #define PR_OFFLINE_ADDRBOOK_ENTRYID PROP_TAG(PT_BINARY, pidStoreMin+0x0B)
  140. #define PR_NNTP_CONTROL_FOLDER_ENTRYID PROP_TAG(PT_BINARY, pidSpecialMin+0x1B)
  141. #define PR_EFORMS_FOR_LOCALE_ENTRYID PROP_TAG(PT_BINARY, pidStoreMin+0x0C)
  142. #define PR_FREE_BUSY_FOR_LOCAL_SITE_ENTRYID PROP_TAG(PT_BINARY, pidStoreMin+0x0D)
  143. #define PR_ADDRBOOK_FOR_LOCAL_SITE_ENTRYID PROP_TAG(PT_BINARY, pidStoreMin+0x0E)
  144. #define PR_NEWSGROUP_ROOT_FOLDER_ENTRYID PROP_TAG(PT_BINARY, pidSpecialMin+0x1C)
  145. #define PR_OFFLINE_MESSAGE_ENTRYID PROP_TAG(PT_BINARY, pidStoreMin+0x0F)
  146. #define PR_FAVORITES_DEFAULT_NAME PROP_TAG(PT_STRING8, pidStoreMin+0x1D)
  147. #define PR_SYS_CONFIG_FOLDER_ENTRYID PROP_TAG(PT_BINARY, pidStoreMin+0x1E)
  148. #define PR_NNTP_ARTICLE_FOLDER_ENTRYID PROP_TAG(PT_BINARY, pidSpecialMin+0x1A)
  149. #define PR_EVENTS_ROOT_FOLDER_ENTRYID PROP_TAG(PT_BINARY, pidSpecialMin+0xA)
  150. #define PR_GW_MTSIN_ENTRYID PROP_TAG(PT_BINARY, pidStoreMin+0x10)
  151. #define PR_GW_MTSOUT_ENTRYID PROP_TAG(PT_BINARY, pidStoreMin+0x11)
  152. #define PR_TRANSFER_ENABLED PROP_TAG(PT_BOOLEAN, pidStoreMin+0x12)
  153. #define PR_TEST_LINE_SPEED PROP_TAG(PT_BINARY, pidStoreMin+0x13)
  154. #define PR_HIERARCHY_SYNCHRONIZER PROP_TAG(PT_OBJECT, pidStoreMin+0x14)
  155. #define PR_CONTENTS_SYNCHRONIZER PROP_TAG(PT_OBJECT, pidStoreMin+0x15)
  156. #define PR_COLLECTOR PROP_TAG(PT_OBJECT, pidStoreMin+0x16)
  157. #define PR_FAST_TRANSFER PROP_TAG(PT_OBJECT, pidStoreMin+0x17)
  158. #define PR_CHANGE_ADVISOR PROP_TAG(PT_OBJECT, pidStoreMin+0x1C)
  159. #define PR_CHANGE_NOTIFICATION_GUID PROP_TAG(PT_CLSID, pidStoreMin+0x1F)
  160. #define PR_STORE_OFFLINE PROP_TAG(PT_BOOLEAN, pidStoreMin+0x1A)
  161. #define PR_IN_TRANSIT PROP_TAG(PT_BOOLEAN, pidStoreMin+0x00)
  162. #define PR_REPLICATION_STYLE PROP_TAG(PT_LONG, pidAdminMin+0x00)
  163. #define PR_REPLICATION_SCHEDULE PROP_TAG(PT_BINARY, pidAdminMin+0x01)
  164. #define PR_REPLICATION_MESSAGE_PRIORITY PROP_TAG(PT_LONG, pidAdminMin+0x02)
  165. #define PR_OVERALL_MSG_AGE_LIMIT PROP_TAG(PT_LONG, pidAdminMin+0x03)
  166. #define PR_REPLICATION_ALWAYS_INTERVAL PROP_TAG(PT_LONG, pidAdminMin+0x04)
  167. #define PR_REPLICATION_MSG_SIZE PROP_TAG(PT_LONG, pidAdminMin+0x05)
  168. #define PR_SOURCE_KEY PROP_TAG(PT_BINARY, pidExchangeNonXmitReservedMin+0x00)
  169. #define PR_PARENT_SOURCE_KEY PROP_TAG(PT_BINARY, pidExchangeNonXmitReservedMin+0x01)
  170. #define PR_CHANGE_KEY PROP_TAG(PT_BINARY, pidExchangeNonXmitReservedMin+0x02)
  171. #define PR_PREDECESSOR_CHANGE_LIST PROP_TAG(PT_BINARY, pidExchangeNonXmitReservedMin+0x03)
  172. #define PR_SOURCE_FID PROP_TAG(PT_I8, pidStoreNonTransMin+0x1F)
  173. #define PR_CATALOG PROP_TAG(PT_BINARY, pidStoreNonTransMin+0x1B)
  174. #define PR_CI_SEARCH_ENABLED PROP_TAG(PT_BOOLEAN, pidStoreNonTransMin+0x1C)
  175. #define PR_CI_NOTIFICATION_ENABLED PROP_TAG(PT_BOOLEAN, pidStoreNonTransMin+0x1D)
  176. #define PR_MAX_CACHED_VIEWS PROP_TAG(PT_LONG, pidStoreNonTransMin+0x28)
  177. #define PR_MAX_INDICES PROP_TAG(PT_LONG, pidStoreNonTransMin+0x1E)
  178. #define PR_IMPLIED_RESTRICTIONS PROP_TAG(PT_MV_BINARY, pidSpecialMin+0x0F)
  179. #define PR_FOLDER_CHILD_COUNT PROP_TAG(PT_LONG, pidFolderMin)
  180. #define PR_RIGHTS PROP_TAG(PT_LONG, pidFolderMin+0x01)
  181. #define PR_ACL_TABLE PROP_TAG(PT_OBJECT, pidExchangeXmitReservedMin)
  182. #define PR_RULES_TABLE PROP_TAG(PT_OBJECT, pidExchangeXmitReservedMin+0x1)
  183. #define PR_HAS_RULES PROP_TAG(PT_BOOLEAN, pidFolderMin+0x02)
  184. #define PR_HAS_MODERATOR_RULES PROP_TAG(PT_BOOLEAN, pidFolderMin+0x07 )
  185. #define PR_ADDRESS_BOOK_ENTRYID PROP_TAG(PT_BINARY, pidFolderMin+0x03)
  186. #define PR_ACL_DATA PROP_TAG(PT_BINARY, pidExchangeXmitReservedMin)
  187. #define PR_RULES_DATA PROP_TAG(PT_BINARY, pidExchangeXmitReservedMin+0x1)
  188. #define PR_EXTENDED_ACL_DATA PROP_TAG(PT_BINARY, pidExchangeXmitReservedMin+0x1E)
  189. #define PR_FOLDER_DESIGN_FLAGS PROP_TAG(PT_LONG, pidExchangeXmitReservedMin+0x2)
  190. #define PR_DESIGN_IN_PROGRESS PROP_TAG(PT_BOOLEAN, pidExchangeXmitReservedMin+0x4)
  191. #define PR_SECURE_ORIGINATION PROP_TAG(PT_BOOLEAN, pidExchangeXmitReservedMin+0x5)
  192. #define PR_PUBLISH_IN_ADDRESS_BOOK PROP_TAG(PT_BOOLEAN, pidExchangeXmitReservedMin+0x6)
  193. #define PR_RESOLVE_METHOD PROP_TAG(PT_LONG, pidExchangeXmitReservedMin+0x7)
  194. #define PR_ADDRESS_BOOK_DISPLAY_NAME PROP_TAG(PT_TSTRING, pidExchangeXmitReservedMin+0x8)
  195. #define PR_EFORMS_LOCALE_ID PROP_TAG(PT_LONG, pidExchangeXmitReservedMin+0x9)
  196. #define PR_REPLICA_LIST PROP_TAG(PT_BINARY, pidAdminMin+0x8)
  197. #define PR_OVERALL_AGE_LIMIT PROP_TAG(PT_LONG, pidAdminMin+0x9)
  198. #define PR_IS_NEWSGROUP_ANCHOR PROP_TAG(PT_BOOLEAN, pidAdminMin+0x06)
  199. #define PR_IS_NEWSGROUP PROP_TAG(PT_BOOLEAN, pidAdminMin+0x07)
  200. #define PR_NEWSGROUP_COMPONENT PROP_TAG(PT_STRING8, pidAdminMin+0x15)
  201. #define PR_INTERNET_NEWSGROUP_NAME PROP_TAG(PT_STRING8, pidAdminMin+0x17)
  202. #define PR_NEWSFEED_INFO PROP_TAG(PT_BINARY, pidAdminMin+0x16)
  203. #define PR_PREVENT_MSG_CREATE PROP_TAG(PT_BOOLEAN, pidExchangeNonXmitReservedMin+0x14)
  204. #define PR_IMAP_INTERNAL_DATE PROP_TAG(PT_SYSTIME, pidExchangeNonXmitReservedMin+0x15)
  205. #define PR_INBOUND_NEWSFEED_DN PROP_TAG(PT_STRING8, pidSpecialMin+0x1D)
  206. #define PR_OUTBOUND_NEWSFEED_DN PROP_TAG(PT_STRING8, pidSpecialMin+0x1E)
  207. #define PR_INTERNET_CHARSET PROP_TAG(PT_TSTRING, pidAdminMin+0xA)
  208. #define PR_PUBLIC_FOLDER_ENTRYID PROP_TAG(PT_BINARY, pidFolderMin+0x04)
  209. #define PR_HIERARCHY_CHANGE_NUM PROP_TAG(PT_LONG, pidFolderMin+0x06)
  210. #define PR_USER_SID PROP_TAG(PT_BINARY, PROP_ID(ptagSearchState))
  211. #define PR_CREATOR_TOKEN PR_USER_SID
  212. #define PR_HAS_NAMED_PROPERTIES PROP_TAG(PT_BOOLEAN, pidMessageReadOnlyMin+0x0A)
  213. #define PR_CREATOR_NAME PROP_TAG(PT_TSTRING, pidExchangeXmitReservedMin+0x18)
  214. #define PR_CREATOR_NAME_A PROP_TAG(PT_STRING8, pidExchangeXmitReservedMin+0x18)
  215. #define PR_CREATOR_NAME_W PROP_TAG(PT_UNICODE, pidExchangeXmitReservedMin+0x18)
  216. #define PR_CREATOR_ENTRYID PROP_TAG(PT_BINARY, pidExchangeXmitReservedMin+0x19)
  217. #define PR_LAST_MODIFIER_NAME PROP_TAG(PT_TSTRING, pidExchangeXmitReservedMin+0x1A)
  218. #define PR_LAST_MODIFIER_NAME_A PROP_TAG(PT_STRING8, pidExchangeXmitReservedMin+0x1A)
  219. #define PR_LAST_MODIFIER_NAME_W PROP_TAG(PT_UNICODE, pidExchangeXmitReservedMin+0x1A)
  220. #define PR_LAST_MODIFIER_ENTRYID PROP_TAG(PT_BINARY, pidExchangeXmitReservedMin+0x1B)
  221. #define PR_REPLY_RECIPIENT_SMTP_PROXIES PROP_TAG(PT_TSTRING, pidExchangeXmitReservedMin+0x1C)
  222. #define PR_REPLY_RECIPIENT_SMTP_PROXIES_A PROP_TAG(PT_STRING8, pidExchangeXmitReservedMin+0x1C)
  223. #define PR_REPLY_RECIPIENT_SMTP_PROXIES_W PROP_TAG(PT_UNICODE, pidExchangeXmitReservedMin+0x1C)
  224. #define PR_HAS_DAMS PROP_TAG(PT_BOOLEAN, pidExchangeXmitReservedMin+0x0A)
  225. #define PR_RULE_TRIGGER_HISTORY PROP_TAG(PT_BINARY, pidExchangeXmitReservedMin+0x12)
  226. #define PR_MOVE_TO_STORE_ENTRYID PROP_TAG(PT_BINARY, pidExchangeXmitReservedMin+0x13)
  227. #define PR_MOVE_TO_FOLDER_ENTRYID PROP_TAG(PT_BINARY, pidExchangeXmitReservedMin+0x14)
  228. #define PR_REPLICA_SERVER PROP_TAG(PT_TSTRING, pidMessageReadOnlyMin+0x04)
  229. #define PR_REPLICA_VERSION PROP_TAG(PT_I8, pidMessageReadOnlyMin+0x0B)
  230. #define PR_CREATOR_SID PROP_TAG(PT_BINARY, pidStoreNonTransMin+0x18)
  231. #define PR_LAST_MODIFIER_SID PROP_TAG(PT_BINARY, pidStoreNonTransMin+0x19)
  232. #define PR_SENDER_SID PROP_TAG(PT_BINARY, pidStoreNonTransMin+0x0d)
  233. #define PR_SENT_REPRESENTING_SID PROP_TAG(PT_BINARY, pidStoreNonTransMin+0x0e)
  234. #define PR_ORIGINAL_SENDER_SID PROP_TAG(PT_BINARY, pidStoreNonTransMin+0x0f)
  235. #define PR_ORIGINAL_SENT_REPRESENTING_SID PROP_TAG(PT_BINARY, pidStoreNonTransMin+0x10)
  236. #define PR_READ_RECEIPT_SID PROP_TAG(PT_BINARY, pidStoreNonTransMin+0x11)
  237. #define PR_REPORT_SID PROP_TAG(PT_BINARY, pidStoreNonTransMin+0x12)
  238. #define PR_ORIGINATOR_SID PROP_TAG(PT_BINARY, pidStoreNonTransMin+0x13)
  239. #define PR_REPORT_DESTINATION_SID PROP_TAG(PT_BINARY, pidStoreNonTransMin+0x14)
  240. #define PR_ORIGINAL_AUTHOR_SID PROP_TAG(PT_BINARY, pidStoreNonTransMin+0x15)
  241. #define PR_RECEIVED_BY_SID PROP_TAG(PT_BINARY, pidStoreNonTransMin+0x16)
  242. #define PR_RCVD_REPRESENTING_SID PROP_TAG(PT_BINARY, pidStoreNonTransMin+0x17)
  243. #define PR_TRUST_SENDER_NO 0x00000000L
  244. #define PR_TRUST_SENDER_YES 0x00000001L
  245. #define PR_TRUST_SENDER PROP_TAG(PT_LONG, pidStoreNonTransMin+0x39)
  246. #define PR_CREATOR_SID_AS_XML PROP_TAG(PT_TSTRING, pidStoreNonTransMin+0x2C)
  247. #define PR_LAST_MODIFIER_SID_AS_XML PROP_TAG(PT_TSTRING, pidStoreNonTransMin+0x2D)
  248. #define PR_SENDER_SID_AS_XML PROP_TAG(PT_TSTRING, pidStoreNonTransMin+0x2E)
  249. #define PR_SENT_REPRESENTING_SID_AS_XML PROP_TAG(PT_TSTRING, pidStoreNonTransMin+0x2F)
  250. #define PR_ORIGINAL_SENDER_SID_AS_XML PROP_TAG(PT_TSTRING, pidStoreNonTransMin+0x30)
  251. #define PR_ORIGINAL_SENT_REPRESENTING_SID_AS_XML PROP_TAG(PT_TSTRING, pidStoreNonTransMin+0x31)
  252. #define PR_READ_RECEIPT_SID_AS_XML PROP_TAG(PT_TSTRING, pidStoreNonTransMin+0x32)
  253. #define PR_REPORT_SID_AS_XML PROP_TAG(PT_TSTRING, pidStoreNonTransMin+0x33)
  254. #define PR_ORIGINATOR_SID_AS_XML PROP_TAG(PT_TSTRING, pidStoreNonTransMin+0x34)
  255. #define PR_REPORT_DESTINATION_SID_AS_XML PROP_TAG(PT_TSTRING, pidStoreNonTransMin+0x35)
  256. #define PR_ORIGINAL_AUTHOR_SID_AS_XML PROP_TAG(PT_TSTRING, pidStoreNonTransMin+0x36)
  257. #define PR_RECEIVED_BY_SID_AS_XML PROP_TAG(PT_TSTRING, pidStoreNonTransMin+0x37)
  258. #define PR_RCVD_REPRESENTING_SID_AS_XML PROP_TAG(PT_TSTRING, pidStoreNonTransMin+0x38)
  259. #define PR_MERGE_MIDSET_DELETED PROP_TAG(PT_BINARY, pidStoreNonTransMin+0x3a)
  260. #define PR_RESERVE_RANGE_OF_IDS PROP_TAG(PT_BINARY, pidStoreNonTransMin+0x3b)
  261. #define PR_FID_VID PROP_TAG(PT_BINARY, pidMessageReadOnlyMin+0x0C)
  262. //#define PR_FID_MID PR_FID_VID //NSK : temporary to allow transition
  263. #define PR_ORIGIN_ID PROP_TAG(PT_BINARY, pidMessageReadOnlyMin+0x0D)
  264. #define PR_RANK PROP_TAG(PT_LONG, pidAdminMin+0x82 )
  265. #define PR_MSG_FOLD_TIME PROP_TAG(PT_SYSTIME, pidMessageReadOnlyMin+0x14)
  266. #define PR_ICS_CHANGE_KEY PROP_TAG(PT_BINARY, pidMessageReadOnlyMin+0x15)
  267. #define PR_DEFERRED_SEND_NUMBER PROP_TAG(PT_LONG, pidExchangeXmitReservedMin+0xB)
  268. #define PR_DEFERRED_SEND_UNITS PROP_TAG(PT_LONG, pidExchangeXmitReservedMin+0xC)
  269. #define PR_EXPIRY_NUMBER PROP_TAG(PT_LONG, pidExchangeXmitReservedMin+0xD)
  270. #define PR_EXPIRY_UNITS PROP_TAG(PT_LONG, pidExchangeXmitReservedMin+0xE)
  271. #define PR_DEFERRED_SEND_TIME PROP_TAG(PT_SYSTIME, pidExchangeXmitReservedMin+0xF)
  272. #define PR_GW_ADMIN_OPERATIONS PROP_TAG(PT_LONG, pidMessageWriteableMin)
  273. #define PR_P1_CONTENT PROP_TAG(PT_BINARY, 0x1100)
  274. #define PR_P1_CONTENT_TYPE PROP_TAG(PT_BINARY, 0x1101)
  275. #define PR_CLIENT_ACTIONS PROP_TAG(PT_BINARY, pidMessageReadOnlyMin+0x5)
  276. #define PR_DAM_ORIGINAL_ENTRYID PROP_TAG(PT_BINARY, pidMessageReadOnlyMin+0x6)
  277. #define PR_DAM_BACK_PATCHED PROP_TAG(PT_BOOLEAN, pidMessageReadOnlyMin+0x7)
  278. #define PR_RULE_ERROR PROP_TAG(PT_LONG, pidMessageReadOnlyMin+0x8)
  279. #define PR_RULE_ACTION_TYPE PROP_TAG(PT_LONG, pidMessageReadOnlyMin+0x9)
  280. #define PR_RULE_ACTION_NUMBER PROP_TAG(PT_LONG, pidMessageReadOnlyMin+0x10)
  281. #define PR_RULE_FOLDER_ENTRYID PROP_TAG(PT_BINARY, pidMessageReadOnlyMin+0x11)
  282. #define PR_INTERNET_CONTENT PROP_TAG(PT_BINARY, pidMessageWriteableMin+0x1)
  283. #define PR_INTERNET_CONTENT_HANDLE PROP_TAG(PT_FILE_HANDLE, pidMessageWriteableMin+0x1)
  284. #define PR_INTERNET_CONTENT_EA PROP_TAG(PT_FILE_EA, pidMessageWriteableMin+0x1)
  285. #define PR_DOTSTUFF_STATE PROP_TAG(PT_LONG, pidUserNonTransmitMin+0x1)
  286. #define PR_MIME_SIZE PROP_TAG(PT_LONG, 0x6746)
  287. #define PR_MIME_SIZE_EXTENDED PROP_TAG(PT_I8, 0x6746)
  288. #define PR_FILE_SIZE PROP_TAG(PT_LONG, 0x6747)
  289. #define PR_FILE_SIZE_EXTENDED PROP_TAG(PT_I8, 0x6747)
  290. #define PR_MSG_EDITOR_FORMAT PROP_TAG(PT_LONG, 0x5909)
  291. #define PR_CONVERSION_STATE PROP_TAG(PT_LONG, PROP_ID(ptagAdminNickName))
  292. #define PR_HTML PROP_TAG(PT_BINARY, PROP_ID(PR_BODY_HTML))
  293. #define PR_ACTIVE_USER_ENTRYID PROP_TAG(PT_BINARY, pidMessageReadOnlyMin+0x12)
  294. #define PR_CONFLICT_ENTRYID PROP_TAG(PT_BINARY, pidExchangeXmitReservedMin+0x10)
  295. #define PR_MESSAGE_LOCALE_ID PROP_TAG(PT_LONG, pidExchangeXmitReservedMin+0x11)
  296. #define PR_MESSAGE_CODEPAGE PROP_TAG(PT_LONG, pidExchangeXmitReservedMin+0x1D)
  297. #define PR_STORAGE_QUOTA_LIMIT PROP_TAG(PT_LONG, pidExchangeXmitReservedMin+0x15)
  298. #define PR_EXCESS_STORAGE_USED PROP_TAG(PT_LONG, pidExchangeXmitReservedMin+0x16)
  299. #define PR_SVR_GENERATING_QUOTA_MSG PROP_TAG(PT_TSTRING, pidExchangeXmitReservedMin+0x17)
  300. #define PR_DELEGATED_BY_RULE PROP_TAG(PT_BOOLEAN, pidExchangeXmitReservedMin+0x3)
  301. #define PR_X400_ENVELOPE_TYPE PROP_TAG(PT_LONG, pidMessageReadOnlyMin+0x13)
  302. #define PR_AUTO_RESPONSE_SUPPRESS PROP_TAG(PT_LONG, pidExchangeXmitReservedMin-0x01)
  303. #define PR_INTERNET_CPID PROP_TAG(PT_LONG, pidExchangeXmitReservedMin-0x02)
  304. #define PR_SYNCEVENT_FIRED PROP_TAG(PT_BOOLEAN, pidMessageReadOnlyMin+0x0F)
  305. #define PR_IN_CONFLICT PROP_TAG(PT_BOOLEAN, pidAttachReadOnlyMin)
  306. #define PR_DELETED_ON PROP_TAG(PT_SYSTIME, pidSpecialMin+0x1F)
  307. #define PR_DELETED_MSG_COUNT PROP_TAG(PT_LONG, pidFolderMin+0x08)
  308. #define PR_DELETED_ASSOC_MSG_COUNT PROP_TAG(PT_LONG, pidFolderMin+0x0B)
  309. #define PR_DELETED_FOLDER_COUNT PROP_TAG(PT_LONG, pidFolderMin + 0x09)
  310. #define PR_OLDEST_DELETED_ON PROP_TAG(PT_SYSTIME, pidFolderMin + 0x0A)
  311. #define PR_DELETED_MESSAGE_SIZE_EXTENDED PROP_TAG(PT_I8, pidAdminMin+0xB)
  312. #define PR_DELETED_NORMAL_MESSAGE_SIZE_EXTENDED PROP_TAG(PT_I8, pidAdminMin+0xC)
  313. #define PR_DELETED_ASSOC_MESSAGE_SIZE_EXTENDED PROP_TAG(PT_I8, pidAdminMin+0xD)
  314. #define PR_RETENTION_AGE_LIMIT PROP_TAG(PT_LONG, pidAdminMin+0x34)
  315. #define PR_DISABLE_PERUSER_READ PROP_TAG(PT_BOOLEAN, pidAdminMin+0x35)
  316. #define PR_LAST_FULL_BACKUP PROP_TAG(PT_SYSTIME, pidSpecialMin+0x15)
  317. #define PR_URL_NAME PROP_TAG(PT_TSTRING, pidAdminMin+0x77)
  318. #define PR_URL_NAME_A PROP_TAG(PT_STRING8, pidAdminMin+0x77)
  319. #define PR_URL_NAME_W PROP_TAG(PT_UNICODE, pidAdminMin+0x77)
  320. #define PR_URL_COMP_NAME PROP_TAG(PT_TSTRING, pidRenMsgFldMin+0x73)
  321. #define PR_URL_COMP_NAME_A PROP_TAG(PT_STRING8, pidRenMsgFldMin+0x73)
  322. #define PR_URL_COMP_NAME_W PROP_TAG(PT_UNICODE, pidRenMsgFldMin+0x73)
  323. #define PR_PARENT_URL_NAME PROP_TAG(PT_TSTRING, pidAdminMin+0x7D)
  324. #define PR_PARENT_URL_NAME_A PROP_TAG(PT_STRING8, pidAdminMin+0x7D)
  325. #define PR_PARENT_URL_NAME_W PROP_TAG(PT_UNICODE, pidAdminMin+0x7D)
  326. #define PR_FLAT_URL_NAME PROP_TAG(PT_TSTRING, pidAdminMin+0x7E)
  327. #define PR_FLAT_URL_NAME_A PROP_TAG(PT_STRING8, pidAdminMin+0x7E)
  328. #define PR_FLAT_URL_NAME_W PROP_TAG(PT_UNICODE, pidAdminMin+0x7E)
  329. #define PR_SRC_URL_NAME PROP_TAG(PT_TSTRING, pidAdminMin+0x7F)
  330. #define PR_SRC_URL_NAME_A PROP_TAG(PT_STRING8, pidAdminMin+0x7F)
  331. #define PR_SRC_URL_NAME_W PROP_TAG(PT_UNICODE, pidAdminMin+0x7F)
  332. #define PR_SECURE_IN_SITE PROP_TAG(PT_BOOLEAN, pidAdminMin+0xE)
  333. #define PR_LOCAL_COMMIT_TIME PROP_TAG(PT_SYSTIME, pidAdminMin+0x79)
  334. #define PR_LOCAL_COMMIT_TIME_MAX PROP_TAG(PT_SYSTIME, pidAdminMin+0x7a)
  335. #define PR_DELETED_COUNT_TOTAL PROP_TAG(PT_LONG, pidAdminMin+0x7b)
  336. #define PR_AUTO_RESET PROP_TAG(PT_MV_CLSID, pidAdminMin+0x7c)
  337. #define PR_LONGTERM_ENTRYID_FROM_TABLE PROP_TAG(PT_BINARY, pidSpecialMin)
  338. #define PR_SUBFOLDER PROP_TAG(PT_BOOLEAN, pidAdminMin+0x78)
  339. /* ATTN: new property types */
  340. #define PT_SRESTRICTION ((ULONG) 0x00FD)
  341. #define PT_ACTIONS ((ULONG) 0x00FE)
  342. #define PR_ORIGINATOR_NAME PROP_TAG( PT_TSTRING, pidMessageWriteableMin+0x3)
  343. #define PR_ORIGINATOR_ADDR PROP_TAG( PT_TSTRING, pidMessageWriteableMin+0x4)
  344. #define PR_ORIGINATOR_ADDRTYPE PROP_TAG( PT_TSTRING, pidMessageWriteableMin+0x5)
  345. #define PR_ORIGINATOR_ENTRYID PROP_TAG( PT_BINARY, pidMessageWriteableMin+0x6)
  346. #define PR_ARRIVAL_TIME PROP_TAG( PT_SYSTIME, pidMessageWriteableMin+0x7)
  347. #define PR_TRACE_INFO PROP_TAG( PT_BINARY, pidMessageWriteableMin+0x8)
  348. #define PR_INTERNAL_TRACE_INFO PROP_TAG( PT_BINARY, pidMessageWriteableMin+0x12)
  349. #define PR_SUBJECT_TRACE_INFO PROP_TAG( PT_BINARY, pidMessageWriteableMin+0x9)
  350. #define PR_RECIPIENT_NUMBER PROP_TAG( PT_LONG, pidMessageWriteableMin+0xA)
  351. #define PR_MTS_SUBJECT_ID PROP_TAG(PT_BINARY, pidMessageWriteableMin+0xB)
  352. #define PR_REPORT_DESTINATION_NAME PROP_TAG(PT_TSTRING, pidMessageWriteableMin+0xC)
  353. #define PR_REPORT_DESTINATION_ENTRYID PROP_TAG(PT_BINARY, pidMessageWriteableMin+0xD)
  354. #define PR_CONTENT_SEARCH_KEY PROP_TAG(PT_BINARY, pidMessageWriteableMin+0xE)
  355. #define PR_FOREIGN_ID PROP_TAG(PT_BINARY, pidMessageWriteableMin+0xF)
  356. #define PR_FOREIGN_REPORT_ID PROP_TAG(PT_BINARY, pidMessageWriteableMin+0x10)
  357. #define PR_FOREIGN_SUBJECT_ID PROP_TAG(PT_BINARY, pidMessageWriteableMin+0x11)
  358. #define PR_PROMOTE_PROP_ID_LIST PROP_TAG(PT_BINARY, pidMessageWriteableMin+0x13)
  359. #define PR_MTS_ID PR_MESSAGE_SUBMISSION_ID
  360. #define PR_MTS_REPORT_ID PR_MESSAGE_SUBMISSION_ID
  361. #define PR_MEMBER_ID PROP_TAG(PT_I8, pidSpecialMin+0x01)
  362. #define PR_MEMBER_NAME PROP_TAG(PT_TSTRING, pidSpecialMin+0x02)
  363. #define PR_MEMBER_ENTRYID PR_ENTRYID
  364. #define PR_MEMBER_RIGHTS PROP_TAG(PT_LONG, pidSpecialMin+0x03)
  365. #define PR_RULE_ID PROP_TAG(PT_I8, pidSpecialMin+0x04)
  366. #define PR_RULE_IDS PROP_TAG(PT_BINARY, pidSpecialMin+0x05)
  367. #define PR_RULE_SEQUENCE PROP_TAG(PT_LONG, pidSpecialMin+0x06)
  368. #define PR_RULE_STATE PROP_TAG(PT_LONG, pidSpecialMin+0x07)
  369. #define PR_RULE_USER_FLAGS PROP_TAG(PT_LONG, pidSpecialMin+0x08)
  370. #define PR_RULE_CONDITION PROP_TAG(PT_SRESTRICTION, pidSpecialMin+0x09)
  371. #define PR_RULE_ACTIONS PROP_TAG(PT_ACTIONS, pidSpecialMin+0x10)
  372. #define PR_RULE_PROVIDER PROP_TAG(PT_STRING8, pidSpecialMin+0x11)
  373. #define PR_RULE_NAME PROP_TAG(PT_TSTRING, pidSpecialMin+0x12)
  374. #define PR_RULE_LEVEL PROP_TAG(PT_LONG, pidSpecialMin+0x13)
  375. #define PR_RULE_PROVIDER_DATA PROP_TAG(PT_BINARY, pidSpecialMin+0x14)
  376. #define PR_EXTENDED_RULE_ACTIONS PROP_TAG(PT_BINARY, pidStoreNonTransMin+0x59)
  377. #define PR_EXTENDED_RULE_CONDITION PROP_TAG(PT_BINARY, pidStoreNonTransMin+0x5a)
  378. #define PR_EXTENDED_RULE_SIZE_LIMIT PROP_TAG(PT_LONG, pidStoreNonTransMin+0x5b)
  379. #define PR_NT_USER_NAME PROP_TAG(PT_TSTRING, pidAdminMin+0x10)
  380. #define PR_LAST_LOGON_TIME PROP_TAG(PT_SYSTIME, pidAdminMin+0x12 )
  381. #define PR_LAST_LOGOFF_TIME PROP_TAG(PT_SYSTIME, pidAdminMin+0x13 )
  382. #define PR_STORAGE_LIMIT_INFORMATION PROP_TAG(PT_LONG, pidAdminMin+0x14 )
  383. #define PR_INTERNET_MDNS PROP_TAG(PT_BOOLEAN, PROP_ID(PR_NEWSGROUP_COMPONENT))
  384. #define PR_QUOTA_WARNING_THRESHOLD PROP_TAG(PT_LONG, pidAdminMin+0x91)
  385. #define PR_QUOTA_SEND_THRESHOLD PROP_TAG(PT_LONG, pidAdminMin+0x92)
  386. #define PR_QUOTA_RECEIVE_THRESHOLD PROP_TAG(PT_LONG, pidAdminMin+0x93)
  387. #define PR_FOLDER_FLAGS PROP_TAG(PT_LONG, pidAdminMin+0x18)
  388. #define PR_LAST_ACCESS_TIME PROP_TAG(PT_SYSTIME, pidAdminMin+0x19)
  389. #define PR_RESTRICTION_COUNT PROP_TAG(PT_LONG, pidAdminMin+0x1A)
  390. #define PR_CATEG_COUNT PROP_TAG(PT_LONG, pidAdminMin+0x1B)
  391. #define PR_CACHED_COLUMN_COUNT PROP_TAG(PT_LONG, pidAdminMin+0x1C)
  392. #define PR_NORMAL_MSG_W_ATTACH_COUNT PROP_TAG(PT_LONG, pidAdminMin+0x1D)
  393. #define PR_ASSOC_MSG_W_ATTACH_COUNT PROP_TAG(PT_LONG, pidAdminMin+0x1E)
  394. #define PR_RECIPIENT_ON_NORMAL_MSG_COUNT PROP_TAG(PT_LONG, pidAdminMin+0x1F)
  395. #define PR_RECIPIENT_ON_ASSOC_MSG_COUNT PROP_TAG(PT_LONG, pidAdminMin+0x20)
  396. #define PR_ATTACH_ON_NORMAL_MSG_COUNT PROP_TAG(PT_LONG, pidAdminMin+0x21)
  397. #define PR_ATTACH_ON_ASSOC_MSG_COUNT PROP_TAG(PT_LONG, pidAdminMin+0x22)
  398. #define PR_NORMAL_MESSAGE_SIZE PROP_TAG(PT_LONG, pidAdminMin+0x23)
  399. #define PR_NORMAL_MESSAGE_SIZE_EXTENDED PROP_TAG(PT_I8, pidAdminMin+0x23)
  400. #define PR_ASSOC_MESSAGE_SIZE PROP_TAG(PT_LONG, pidAdminMin+0x24)
  401. #define PR_ASSOC_MESSAGE_SIZE_EXTENDED PROP_TAG(PT_I8, pidAdminMin+0x24)
  402. #define PR_FOLDER_PATHNAME PROP_TAG(PT_TSTRING, pidAdminMin+0x25)
  403. #define PR_OWNER_COUNT PROP_TAG(PT_LONG, pidAdminMin+0x26)
  404. #define PR_CONTACT_COUNT PROP_TAG(PT_LONG, pidAdminMin+0x27)
  405. #define PR_PF_OVER_HARD_QUOTA_LIMIT PROP_TAG(PT_LONG, pidAdminMin+0x91)
  406. #define PR_PF_MSG_SIZE_LIMIT PROP_TAG(PT_LONG, pidAdminMin+0x92)
  407. #define PR_PF_DISALLOW_MDB_WIDE_EXPIRY PROP_TAG(PT_BOOLEAN, pidAdminMin+0x93)
  408. #define PR_LOCALE_ID PROP_TAG(PT_LONG, pidAdminMin+0x11)
  409. #define PR_CODE_PAGE_ID PROP_TAG(PT_LONG, pidAdminMin+0x33)
  410. #define PR_SORT_LOCALE_ID PROP_TAG(PT_LONG, pidAdminMin+0x75)
  411. #define PR_MESSAGE_SIZE_EXTENDED PROP_TAG(PT_I8, PROP_ID(PR_MESSAGE_SIZE))
  412. #define PR_AUTO_ADD_NEW_SUBS PROP_TAG(PT_BOOLEAN, pidExchangeNonXmitReservedMin+0x5)
  413. #define PR_NEW_SUBS_GET_AUTO_ADD PROP_TAG(PT_BOOLEAN, pidExchangeNonXmitReservedMin+0x6)
  414. #define PR_OFFLINE_FLAGS PROP_TAG(PT_LONG, pidFolderMin+0x5)
  415. #define PR_SYNCHRONIZE_FLAGS PROP_TAG(PT_LONG, pidExchangeNonXmitReservedMin+0x4)
  416. #define PR_MESSAGE_SITE_NAME PROP_TAG(PT_TSTRING, pidExchangeNonXmitReservedMin+0x7)
  417. #define PR_MESSAGE_SITE_NAME_A PROP_TAG(PT_STRING8, pidExchangeNonXmitReservedMin+0x7)
  418. #define PR_MESSAGE_SITE_NAME_W PROP_TAG(PT_UNICODE, pidExchangeNonXmitReservedMin+0x7)
  419. #define PR_MESSAGE_PROCESSED PROP_TAG(PT_BOOLEAN, pidExchangeNonXmitReservedMin+0x8)
  420. #define PR_MSG_BODY_ID PROP_TAG(PT_LONG, pidExchangeXmitReservedMin-0x03)
  421. #define PR_BILATERAL_INFO PROP_TAG(PT_BINARY, pidExchangeXmitReservedMin-0x04)
  422. #define PR_DL_REPORT_FLAGS PROP_TAG(PT_LONG, pidExchangeXmitReservedMin-0x05)
  423. #define PR_ABSTRACT PROP_TAG(PT_TSTRING, pidExchangeXmitReservedMin-0x06)
  424. #define PR_ABSTRACT_A PROP_TAG(PT_STRING8, pidExchangeXmitReservedMin-0x06)
  425. #define PR_ABSTRACT_W PROP_TAG(PT_UNICODE, pidExchangeXmitReservedMin-0x06)
  426. #define PR_PREVIEW PROP_TAG(PT_TSTRING, pidExchangeXmitReservedMin-0x07)
  427. #define PR_PREVIEW_A PROP_TAG(PT_STRING8, pidExchangeXmitReservedMin-0x07)
  428. #define PR_PREVIEW_W PROP_TAG(PT_UNICODE, pidExchangeXmitReservedMin-0x07)
  429. #define PR_PREVIEW_UNREAD PROP_TAG(PT_TSTRING, pidExchangeXmitReservedMin-0x08)
  430. #define PR_PREVIEW_UNREAD_A PROP_TAG(PT_STRING8, pidExchangeXmitReservedMin-0x08)
  431. #define PR_PREVIEW_UNREAD_W PROP_TAG(PT_UNICODE, pidExchangeXmitReservedMin-0x08)
  432. #define PR_DISABLE_FULL_FIDELITY PROP_TAG(PT_BOOLEAN, pidRenMsgFldMin+0x72)
  433. #define PR_ATTR_HIDDEN PROP_TAG(PT_BOOLEAN, pidRenMsgFldMin+0x74)
  434. #define PR_ATTR_SYSTEM PROP_TAG(PT_BOOLEAN, pidRenMsgFldMin+0x75)
  435. #define PR_ATTR_READONLY PROP_TAG(PT_BOOLEAN, pidRenMsgFldMin+0x76)
  436. #define PR_READ PROP_TAG(PT_BOOLEAN, pidStoreNonTransMin+0x29)
  437. #define PR_ADMIN_SECURITY_DESCRIPTOR PROP_TAG(PT_BINARY, 0x3d21)
  438. #define PR_WIN32_SECURITY_DESCRIPTOR PROP_TAG(PT_BINARY, 0x3d22)
  439. #define PR_NON_WIN32_ACL PROP_TAG(PT_BOOLEAN, 0x3d23)
  440. #define PR_ITEM_LEVEL_ACL PROP_TAG(PT_BOOLEAN, 0x3d24)
  441. #define PR_DAV_TRANSFER_SECURITY_DESCRIPTOR PROP_TAG(PT_BINARY, 0x0E84)
  442. #define PR_NT_SECURITY_DESCRIPTOR_AS_XML PROP_TAG(PT_TSTRING, pidStoreNonTransMin+0x2A)
  443. #define PR_NT_SECURITY_DESCRIPTOR_AS_XML_A PROP_TAG(PT_STRING8, pidStoreNonTransMin+0x2A)
  444. #define PR_NT_SECURITY_DESCRIPTOR_AS_XML_W PROP_TAG(PT_UNICODE, pidStoreNonTransMin+0x2A)
  445. #define PR_ADMIN_SECURITY_DESCRIPTOR_AS_XML PROP_TAG(PT_TSTRING, pidStoreNonTransMin+0x2B)
  446. #define PR_ADMIN_SECURITY_DESCRIPTOR_AS_XML_A PROP_TAG(PT_STRING8, pidStoreNonTransMin+0x2B)
  447. #define PR_ADMIN_SECURITY_DESCRIPTOR_AS_XML_W PROP_TAG(PT_UNICODE, pidStoreNonTransMin+0x2B)
  448. #define PR_OWA_URL PROP_TAG (PT_STRING8, pidRenMsgFldMin+0x71)
  449. #define PR_SYNCEVENT_SUPPRESS_GUID PROP_TAG( PT_BINARY, 0x3880 )
  450. #define PR_LOCK_BRANCH_ID PROP_TAG( PT_I8, 0x3800 )
  451. #define PR_LOCK_RESOURCE_FID PROP_TAG( PT_I8, 0x3801 )
  452. #define PR_LOCK_RESOURCE_DID PROP_TAG( PT_I8, 0x3802 )
  453. #define PR_LOCK_RESOURCE_VID PROP_TAG( PT_I8, 0x3803 )
  454. #define PR_LOCK_ENLISTMENT_CONTEXT PROP_TAG( PT_BINARY, 0x3804 )
  455. #define PR_LOCK_TYPE PROP_TAG( PT_SHORT, 0x3805 )
  456. #define PR_LOCK_SCOPE PROP_TAG( PT_SHORT, 0x3806 )
  457. #define PR_LOCK_TRANSIENT_ID PROP_TAG( PT_BINARY, 0x3807 )
  458. #define PR_LOCK_DEPTH PROP_TAG( PT_LONG, 0x3808 )
  459. #define PR_LOCK_TIMEOUT PROP_TAG( PT_LONG, 0x3809 )
  460. #define PR_LOCK_EXPIRY_TIME PROP_TAG( PT_SYSTIME, 0x380a )
  461. #define PR_LOCK_GLID PROP_TAG( PT_BINARY, 0x380b )
  462. #define PR_LOCK_NULL_URL_W PROP_TAG( PT_UNICODE, 0x380c )
  463. #define PR_ANTIVIRUS_VENDOR PROP_TAG(PT_STRING8, pidStoreNonTransMin+0x45)
  464. #define PR_ANTIVIRUS_VERSION PROP_TAG(PT_LONG, pidStoreNonTransMin+0x46)
  465. #define PR_ANTIVIRUS_SCAN_STATUS PROP_TAG(PT_LONG, pidStoreNonTransMin+0x47)
  466. #define PR_ANTIVIRUS_SCAN_INFO PROP_TAG(PT_STRING8, pidStoreNonTransMin+0x48)
  467. #define PR_ADDR_TO PROP_TAG(PT_TSTRING, pidStoreNonTransMin+0x57)
  468. #define PR_ADDR_TO_A PROP_TAG(PT_STRING8, pidStoreNonTransMin+0x57)
  469. #define PR_ADDR_TO_W PROP_TAG(PT_UNICODE, pidStoreNonTransMin+0x57)
  470. #define PR_ADDR_CC PROP_TAG(PT_TSTRING, pidStoreNonTransMin+0x58)
  471. #define PR_ADDR_CC_A PROP_TAG(PT_STRING8, pidStoreNonTransMin+0x58)
  472. #define PR_ADDR_CC_W PROP_TAG(PT_UNICODE, pidStoreNonTransMin+0x58)
  473. #define pbGlobalProfileSectionGuid "\x13\xDB\xB0\xC8\xAA\x05\x10\x1A\x9B\xB0\x00\xAA\x00\x2F\xC4\x5A"
  474. /*
  475. * IExchangeModifyTable
  476. *
  477. * Used for get/set rules (and access control) on folders.
  478. *
  479. */
  480. /* ulRowFlags */
  481. #define ROWLIST_REPLACE ((ULONG)1)
  482. #define ROW_ADD ((ULONG)1)
  483. #define ROW_MODIFY ((ULONG)2)
  484. #define ROW_REMOVE ((ULONG)4)
  485. #define ROW_EMPTY (ROW_ADD|ROW_REMOVE)
  486. struct ROWENTRY {
  487. ULONG ulRowFlags;
  488. ULONG cValues;
  489. LPSPropValue rgPropVals;
  490. };
  491. typedef struct ROWENTRY *LPROWENTRY;
  492. struct ROWLIST {
  493. ROWLIST(void) = delete;
  494. template<typename _T> ROWLIST(std::initializer_list<_T>) = delete;
  495. ULONG cEntries;
  496. ROWENTRY aEntries[MAPI_DIM];
  497. };
  498. typedef struct ROWLIST *LPROWLIST;
  499. #define CbNewROWLIST(_centries) \
  500. (offsetof(ROWLIST,aEntries) + (_centries)*sizeof(ROWENTRY))
  501. class IExchangeModifyTable : public IUnknown {
  502. public:
  503. virtual HRESULT __stdcall GetLastError(HRESULT hResult, ULONG ulFlags, LPMAPIERROR *lppMAPIError) = 0;
  504. virtual HRESULT __stdcall GetTable(ULONG ulFlags, LPMAPITABLE *lppTable) = 0;
  505. virtual HRESULT __stdcall ModifyTable(ULONG ulFlags, LPROWLIST lpMods) = 0;
  506. };
  507. typedef IExchangeModifyTable* LPEXCHANGEMODIFYTABLE;
  508. /* --- snip acl stuff --- */
  509. /*
  510. * Rules specifics
  511. */
  512. // Property types
  513. #define PT_SRESTRICTION ((ULONG) 0x00FD)
  514. #define PT_ACTIONS ((ULONG) 0x00FE)
  515. /*
  516. * PT_FILE_HANDLE: real data is in file specified by handle.
  517. * prop.Value.l has file handle
  518. * PT_FILE_EA: real data is in file specified by extended attribute
  519. * prop.Value.bin has binary EA data
  520. * PT_VIRTUAL: real data is computed on the fly.
  521. * prop.Value.bin has raw binary virtual property blob that has
  522. * information to do conversion. This is internal to the store and
  523. * is not supported for outside calls.
  524. */
  525. #define PT_FILE_HANDLE ((ULONG) 0x0103)
  526. #define PT_FILE_EA ((ULONG) 0x0104)
  527. #define PT_VIRTUAL ((ULONG) 0x0105)
  528. #define FVirtualProp(ptag) (PROP_TYPE(ptag) == PT_VIRTUAL)
  529. #define FFileHandleProp(ptag) (PROP_TYPE(ptag) == PT_FILE_HANDLE || PROP_TYPE(ptag) == PT_FILE_EA)
  530. //Properties in rule table
  531. #define PR_RULE_ID PROP_TAG(PT_I8, pidSpecialMin+0x04)
  532. #define PR_RULE_IDS PROP_TAG(PT_BINARY, pidSpecialMin+0x05)
  533. #define PR_RULE_SEQUENCE PROP_TAG(PT_LONG, pidSpecialMin+0x06)
  534. #define PR_RULE_STATE PROP_TAG(PT_LONG, pidSpecialMin+0x07)
  535. #define PR_RULE_USER_FLAGS PROP_TAG(PT_LONG, pidSpecialMin+0x08)
  536. #define PR_RULE_CONDITION PROP_TAG(PT_SRESTRICTION, pidSpecialMin+0x09)
  537. #define PR_RULE_ACTIONS PROP_TAG(PT_ACTIONS, pidSpecialMin+0x10)
  538. #define PR_RULE_PROVIDER PROP_TAG(PT_STRING8, pidSpecialMin+0x11)
  539. #define PR_RULE_NAME PROP_TAG(PT_TSTRING, pidSpecialMin+0x12)
  540. #define PR_RULE_LEVEL PROP_TAG(PT_LONG, pidSpecialMin+0x13)
  541. #define PR_RULE_PROVIDER_DATA PROP_TAG(PT_BINARY, pidSpecialMin+0x14)
  542. #define PR_EXTENDED_RULE_ACTIONS PROP_TAG(PT_BINARY, pidStoreNonTransMin+0x59)
  543. #define PR_EXTENDED_RULE_CONDITION PROP_TAG(PT_BINARY, pidStoreNonTransMin+0x5a)
  544. #define PR_EXTENDED_RULE_SIZE_LIMIT PROP_TAG(PT_LONG, pidStoreNonTransMin+0x5b)
  545. // what?
  546. // moved to ptag.h (scottno) - still needed for 2.27 upgrader
  547. // #define PR_RULE_VERSION PROP_TAG( PT_I2, pidSpecialMin+0x1D)
  548. //PR_STATE property values
  549. #define ST_DISABLED 0x0000
  550. #define ST_ENABLED 0x0001
  551. #define ST_ERROR 0x0002
  552. #define ST_ONLY_WHEN_OOF 0x0004
  553. #define ST_KEEP_OOF_HIST 0x0008
  554. #define ST_EXIT_LEVEL 0x0010
  555. #define ST_SKIP_IF_SCL_IS_SAFE 0x0020
  556. #define ST_RULE_PARSE_ERROR 0x0040
  557. #define ST_CLEAR_OOF_HIST 0x80000000
  558. //Empty restriction
  559. #define NULL_RESTRICTION 0xff
  560. // special RELOP for Member of DL
  561. #define RELOP_MEMBER_OF_DL 100
  562. //Action types
  563. enum ACTTYPE {
  564. OP_MOVE = 1,
  565. OP_COPY,
  566. OP_REPLY,
  567. OP_OOF_REPLY,
  568. OP_DEFER_ACTION,
  569. OP_BOUNCE,
  570. OP_FORWARD,
  571. OP_DELEGATE,
  572. OP_TAG,
  573. OP_DELETE,
  574. OP_MARK_AS_READ
  575. };
  576. // provider name for moderator rules
  577. #define szProviderModeratorRule "MSFT:MR"
  578. // #define wszProviderModeratorRule L"MSFT:MR"
  579. // action flavors
  580. // for OP_REPLY
  581. #define DO_NOT_SEND_TO_ORIGINATOR 1
  582. #define STOCK_REPLY_TEMPLATE 2
  583. // for OP_FORWARD
  584. #define FWD_PRESERVE_SENDER 1
  585. #define FWD_DO_NOT_MUNGE_MSG 2
  586. #define FWD_AS_ATTACHMENT 4
  587. //scBounceCode values
  588. #define BOUNCE_MESSAGE_SIZE_TOO_LARGE (SCODE) MAPI_DIAG_LENGTH_CONSTRAINT_VIOLATD
  589. #define BOUNCE_FORMS_MISMATCH (SCODE) MAPI_DIAG_RENDITION_UNSUPPORTED
  590. #define BOUNCE_ACCESS_DENIED (SCODE) MAPI_DIAG_MAIL_REFUSED
  591. //Message class prefix for Reply and OOF Reply templates
  592. #define szReplyTemplateMsgClassPrefix "IPM.Note.Rules.ReplyTemplate."
  593. #define szOofTemplateMsgClassPrefix "IPM.Note.Rules.OofTemplate."
  594. //Action structure
  595. struct ACTION {
  596. ACTTYPE acttype;
  597. // to indicate which flavor of the action.
  598. ULONG ulActionFlavor;
  599. // Action restriction
  600. // currently unused and must be set to NULL
  601. LPSRestriction lpRes;
  602. // currently unused and must be set to NULL.
  603. LPSPropTagArray lpPropTagArray;
  604. // User defined flags
  605. ULONG ulFlags;
  606. // padding to align the union on 8 byte boundary
  607. ULONG dwAlignPad;
  608. union {
  609. // used for OP_MOVE and OP_COPY actions
  610. struct {
  611. ULONG cbStoreEntryId;
  612. LPENTRYID lpStoreEntryId;
  613. ULONG cbFldEntryId;
  614. LPENTRYID lpFldEntryId;
  615. } actMoveCopy;
  616. // used for OP_REPLY and OP_OOF_REPLY actions
  617. struct {
  618. ULONG cbEntryId;
  619. LPENTRYID lpEntryId;
  620. GUID guidReplyTemplate;
  621. } actReply;
  622. // used for OP_DEFER_ACTION action
  623. struct {
  624. ULONG cbData;
  625. BYTE *pbData;
  626. } actDeferAction;
  627. // Error code to set for OP_BOUNCE action
  628. SCODE scBounceCode;
  629. // list of address for OP_FORWARD and OP_DELEGATE action
  630. LPADRLIST lpadrlist;
  631. // prop value for OP_TAG action
  632. SPropValue propTag;
  633. };
  634. };
  635. typedef struct ACTION *LPACTION;
  636. // Rules version
  637. #define EDK_RULES_VERSION 1
  638. //Array of actions
  639. struct ACTIONS {
  640. ULONG ulVersion; // use the #define above
  641. UINT cActions;
  642. LPACTION lpAction;
  643. };
  644. #ifdef __cplusplus
  645. extern "C" {
  646. #endif
  647. HRESULT HrSerializeSRestriction(IMAPIProp * pprop, LPSRestriction prest, BYTE ** ppbRest, ULONG * pcbRest);
  648. HRESULT HrDeserializeSRestriction(IMAPIProp * pprop, BYTE * pbRest, ULONG cbRest, LPSRestriction * pprest);
  649. HRESULT HrSerializeActions(IMAPIProp * pprop, ACTIONS * pActions, BYTE ** ppbActions, ULONG * pcbActions);
  650. HRESULT HrDeserializeActions(IMAPIProp * pprop, BYTE * pbActions, ULONG cbActions, ACTIONS ** ppActions);
  651. #ifdef __cplusplus
  652. } // extern "C"
  653. #endif
  654. // message class definitions for Deferred Action and Deffered Error messages
  655. #define szDamMsgClass "IPC.Microsoft Exchange 4.0.Deferred Action"
  656. #define szDemMsgClass "IPC.Microsoft Exchange 4.0.Deferred Error"
  657. #define szExRuleMsgClass "IPM.ExtendedRule.Message"
  658. //#define wszExRuleMsgClass L"IPM.ExtendedRule.Message"
  659. /*
  660. * Rule error codes
  661. * Values for PR_RULE_ERROR
  662. */
  663. #define RULE_ERR_UNKNOWN 1 //general catchall error
  664. #define RULE_ERR_LOAD 2 //unable to load folder rules
  665. #define RULE_ERR_DELIVERY 3 //unable to deliver message temporarily
  666. #define RULE_ERR_PARSING 4 //error while parsing
  667. #define RULE_ERR_CREATE_DAE 5 //error creating DAE message
  668. #define RULE_ERR_NO_FOLDER 6 //folder to move/copy doesn't exist
  669. #define RULE_ERR_NO_RIGHTS 7 //no rights to move/copy into folder
  670. #define RULE_ERR_CREATE_DAM 8 //error creating DAM
  671. #define RULE_ERR_NO_SENDAS 9 //can not send as another user
  672. #define RULE_ERR_NO_TEMPLATE 10 //reply template is missing
  673. #define RULE_ERR_EXECUTION 11 //error in rule execution
  674. #define RULE_ERR_QUOTA_EXCEEDED 12 //mailbox quota size exceeded
  675. #define RULE_ERR_TOO_MANY_RECIPS 13 //number of recips exceded upper limit
  676. #define RULE_ERR_FIRST RULE_ERR_UNKNOWN
  677. #define RULE_ERR_LAST RULE_ERR_TOO_MANY_RECIPS
  678. /*
  679. * "IExchangeRuleAction" Interface Declaration
  680. *
  681. * Used for get actions from a Deferred Action Message.
  682. */
  683. class IExchangeRuleAction : public IUnknown {
  684. public:
  685. virtual HRESULT __stdcall ActionCount(ULONG *lpcActions) = 0;
  686. virtual HRESULT __stdcall GetAction(ULONG ulActionNumber, LARGE_INTEGER *lpruleid, LPACTION *lppAction) = 0;
  687. };
  688. typedef IExchangeRuleAction* LPEXCHANGERULEACTION;
  689. //Outlook 2007, Blocked Attachments
  690. class IAttachmentSecurity : public IUnknown {
  691. public:
  692. virtual HRESULT __stdcall IsAttachmentBlocked(LPCWSTR pwszFileName, BOOL *pfBlocked) = 0;
  693. };
  694. struct READSTATE {
  695. ULONG cbSourceKey;
  696. BYTE * pbSourceKey;
  697. ULONG ulFlags;
  698. };
  699. typedef struct READSTATE *LPREADSTATE;
  700. /* Special flag bit for DeleteFolder */
  701. #define DELETE_HARD_DELETE ((ULONG) 0x00000010)
  702. /*------------------------------------------------------------------------
  703. *
  704. * Errors returned by Exchange Incremental Change Synchronization Interface
  705. *
  706. *-----------------------------------------------------------------------*/
  707. #define MAKE_SYNC_E(err) (MAKE_SCODE(SEVERITY_ERROR, FACILITY_ITF, err ))
  708. #define MAKE_SYNC_W(warn) (MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_ITF, warn))
  709. #define SYNC_E_UNKNOWN_FLAGS MAPI_E_UNKNOWN_FLAGS
  710. #define SYNC_E_INVALID_PARAMETER E_INVALIDARG
  711. #define SYNC_E_ERROR E_FAIL
  712. #define SYNC_E_OBJECT_DELETED MAKE_SYNC_E(0x800)
  713. #define SYNC_E_IGNORE MAKE_SYNC_E(0x801)
  714. #define SYNC_E_CONFLICT MAKE_SYNC_E(0x802)
  715. #define SYNC_E_NO_PARENT MAKE_SYNC_E(0x803)
  716. #define SYNC_E_INCEST MAKE_SYNC_E(0x804)
  717. #define SYNC_E_UNSYNCHRONIZED MAKE_SYNC_E(0x805)
  718. #define SYNC_W_PROGRESS MAKE_SYNC_W(0x820)
  719. #define SYNC_W_CLIENT_CHANGE_NEWER MAKE_SYNC_W(0x821)
  720. /*------------------------------------------------------------------------
  721. *
  722. * Flags used by Exchange Incremental Change Synchronization Interface
  723. *
  724. *-----------------------------------------------------------------------*/
  725. #define SYNC_UNICODE 0x01
  726. #define SYNC_NO_DELETIONS 0x02
  727. #define SYNC_NO_SOFT_DELETIONS 0x04
  728. #define SYNC_READ_STATE 0x08
  729. #define SYNC_ASSOCIATED 0x10
  730. #define SYNC_NORMAL 0x20
  731. #define SYNC_NO_CONFLICTS 0x40
  732. #define SYNC_ONLY_SPECIFIED_PROPS 0x80
  733. #define SYNC_NO_FOREIGN_KEYS 0x100
  734. #define SYNC_LIMITED_IMESSAGE 0x200
  735. #define SYNC_CATCHUP 0x400
  736. #define SYNC_NEW_MESSAGE 0x800 // only applicable to ImportMessageChange()
  737. #define SYNC_MSG_SELECTIVE 0x1000 // Used internally. Will reject if used by clients.
  738. #define SYNC_BEST_BODY 0x2000
  739. #define SYNC_IGNORE_SPECIFIED_ON_ASSOCIATED 0x4000
  740. #define SYNC_PROGRESS_MODE 0x8000 // AirMapi progress mode
  741. #define SYNC_FXRECOVERMODE 0x10000
  742. #define SYNC_DEFER_CONFIG 0x20000
  743. #define SYNC_FORCE_UNICODE 0x40000 // Forces server to return Unicode properties
  744. #define SYNC_NO_DB_CHANGES 0x80000
  745. /*------------------------------------------------------------------------
  746. *
  747. * Flags used by ImportMessageDeletion and ImportFolderDeletion methods
  748. *
  749. *-----------------------------------------------------------------------*/
  750. #define SYNC_SOFT_DELETE 0x01
  751. #define SYNC_EXPIRY 0x02
  752. /*------------------------------------------------------------------------
  753. *
  754. * Flags used by ImportPerUserReadStateChange method
  755. *
  756. *-----------------------------------------------------------------------*/
  757. #define SYNC_READ 0x01
  758. class IExchangeExportChanges : public IUnknown {
  759. public:
  760. virtual HRESULT __stdcall GetLastError(HRESULT hResult, ULONG ulFlags, LPMAPIERROR *lppMAPIError) = 0;
  761. virtual HRESULT __stdcall Config(LPSTREAM lpStream, ULONG ulFlags, LPUNKNOWN lpCollector, LPSRestriction lpRestriction, LPSPropTagArray lpIncludeProps, LPSPropTagArray lpExcludeProps, ULONG ulBufferSize) = 0;
  762. virtual HRESULT __stdcall Synchronize(ULONG *pulSteps, ULONG *pulProgress) = 0;
  763. virtual HRESULT __stdcall UpdateState(LPSTREAM lpStream) = 0;
  764. };
  765. typedef IExchangeExportChanges* LPEXCHANGEEXPORTCHANGES;
  766. class IExchangeImportContentsChanges : public IUnknown {
  767. public:
  768. virtual HRESULT __stdcall GetLastError(HRESULT hResult, ULONG ulFlags, LPMAPIERROR *lppMAPIError) = 0;
  769. virtual HRESULT __stdcall Config(LPSTREAM lpStream, ULONG ulFlags) = 0;
  770. virtual HRESULT __stdcall UpdateState(LPSTREAM lpStream) = 0;
  771. virtual HRESULT __stdcall ImportMessageChange(ULONG cValue, LPSPropValue lpPropArray, ULONG ulFlags, LPMESSAGE * lppMessage) = 0;
  772. virtual HRESULT __stdcall ImportMessageDeletion(ULONG ulFlags, LPENTRYLIST lpSourceEntryList) = 0;
  773. virtual HRESULT __stdcall ImportPerUserReadStateChange(ULONG cElements, LPREADSTATE lpReadState) = 0;
  774. virtual HRESULT __stdcall ImportMessageMove(ULONG cbSourceKeySrcFolder, BYTE *pbSourceKeySrcFolder, ULONG cbSourceKeySrcMessage, BYTE *pbSourceKeySrcMessage, ULONG cbPCLMessage, BYTE *pbPCLMessage, ULONG cbSourceKeyDestMessage, BYTE *pbSourceKeyDestMessage, ULONG cbChangeNumDestMessage, BYTE *pbChangeNumDestMessage) = 0;
  775. };
  776. typedef IExchangeImportContentsChanges* LPEXCHANGEIMPORTCONTENTSCHANGES;
  777. class IExchangeImportHierarchyChanges : public IUnknown {
  778. public:
  779. virtual HRESULT __stdcall GetLastError(HRESULT hResult, ULONG ulFlags, LPMAPIERROR *lppMAPIError) = 0;
  780. virtual HRESULT __stdcall Config(LPSTREAM lpStream, ULONG ulFlags) = 0;
  781. virtual HRESULT __stdcall UpdateState(LPSTREAM lpStream) = 0;
  782. virtual HRESULT __stdcall ImportFolderChange(ULONG cValue, LPSPropValue lpPropArray) = 0;
  783. virtual HRESULT __stdcall ImportFolderDeletion(ULONG ulFlags, LPENTRYLIST lpSourceEntryList) = 0;
  784. };
  785. typedef IExchangeImportHierarchyChanges* LPEXCHANGEIMPORTHIERARCHYCHANGES;
  786. class IProxyStoreObject : public IUnknown {
  787. public:
  788. virtual HRESULT __stdcall PlaceHolder1() = 0;
  789. virtual HRESULT __stdcall UnwrapNoRef(LPVOID *ppvObject) = 0;
  790. virtual HRESULT __stdcall PlaceHolder2() = 0;
  791. };
  792. typedef IProxyStoreObject* LPPROXYSTOREOBJECT;
  793. #define FS_NONE 0x00 //indicates that the folder does not support sharing.
  794. #define FS_SUPPORTS_SHARING 0x01 //indicates that the folder supports sharing.
  795. // Outlook 2007
  796. // Provides information about a folder's support for sharing.
  797. class IFolderSupport : public IUnknown {
  798. public:
  799. virtual HRESULT __stdcall GetSupportMask(DWORD *pdwSupportMask) = 0;
  800. };
  801. typedef IFolderSupport* LPIFOLDERSUPPORT;
  802. class IExchangeFavorites : public IUnknown {
  803. public:
  804. virtual HRESULT __stdcall GetLastError(HRESULT hr, ULONG ulFlags, LPMAPIERROR *lppMAPIError) = 0;
  805. virtual HRESULT __stdcall AddFavorites(LPENTRYLIST lpEntryList) = 0;
  806. virtual HRESULT __stdcall DelFavorites(LPENTRYLIST lpEntryList) = 0;
  807. };
  808. /* New from Outlook 2010 MAPI Extension */
  809. class IMAPIGetSession : public virtual IUnknown {
  810. public:
  811. // virtual ~IMAPIGetSession() = 0;
  812. virtual HRESULT __stdcall GetMAPISession(LPUNKNOWN *lppSession) = 0;
  813. };
  814. typedef IMAPIGetSession* LPMAPIGETSESSION;
  815. #endif