mapidefs.php 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643
  1. <?php
  2. /*
  3. * Copyright 2005 - 2016 Zarafa and its licensors
  4. *
  5. * This program is free software: you can redistribute it and/or modify
  6. * it under the terms of the GNU Affero General Public License, version 3,
  7. * as published by the Free Software Foundation.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU Affero General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU Affero General Public License
  15. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. *
  17. */
  18. ?>
  19. <?php
  20. /* Resource types as defined in main.h of the mapi extension */
  21. define('RESOURCE_SESSION' ,'MAPI Session');
  22. define('RESOURCE_TABLE' ,'MAPI Table');
  23. define('RESOURCE_ROWSET' ,'MAPI Rowset');
  24. define('RESOURCE_MSGSTORE' ,'MAPI Message Store');
  25. define('RESOURCE_FOLDER' ,'MAPI Folder');
  26. define('RESOURCE_MESSAGE' ,'MAPI Message');
  27. define('RESOURCE_ATTACHMENT' ,'MAPI Attachment');
  28. /* Object type */
  29. define('MAPI_STORE' ,0x00000001); /* Message Store */
  30. define('MAPI_ADDRBOOK' ,0x00000002); /* Address Book */
  31. define('MAPI_FOLDER' ,0x00000003); /* Folder */
  32. define('MAPI_ABCONT' ,0x00000004); /* Address Book Container */
  33. define('MAPI_MESSAGE' ,0x00000005); /* Message */
  34. define('MAPI_MAILUSER' ,0x00000006); /* Individual Recipient */
  35. define('MAPI_ATTACH' ,0x00000007); /* Attachment */
  36. define('MAPI_DISTLIST' ,0x00000008); /* Distribution List Recipient */
  37. define('MAPI_PROFSECT' ,0x00000009); /* Profile Section */
  38. define('MAPI_STATUS' ,0x0000000A); /* Status Object */
  39. define('MAPI_SESSION' ,0x0000000B); /* Session */
  40. define('MAPI_FORMINFO' ,0x0000000C); /* Form Information */
  41. define('MV_FLAG' ,0x1000);
  42. define('MV_INSTANCE' ,0x2000);
  43. define('MVI_FLAG' ,MV_FLAG | MV_INSTANCE);
  44. define('PT_UNSPECIFIED' , 0); /* (Reserved for interface use) type doesn't matter to caller */
  45. define('PT_NULL' , 1); /* NULL property value */
  46. define('PT_I2' , 2); /* Signed 16-bit value */
  47. define('PT_LONG' , 3); /* Signed 32-bit value */
  48. define('PT_R4' , 4); /* 4-byte floating point */
  49. define('PT_DOUBLE' , 5); /* Floating point double */
  50. define('PT_CURRENCY' , 6); /* Signed 64-bit int (decimal w/ 4 digits right of decimal pt) */
  51. define('PT_APPTIME' , 7); /* Application time */
  52. define('PT_ERROR' , 10); /* 32-bit error value */
  53. define('PT_BOOLEAN' , 11); /* 16-bit boolean (non-zero true) */
  54. define('PT_OBJECT' , 13); /* Embedded object in a property */
  55. define('PT_I8' , 20); /* 8-byte signed integer */
  56. define('PT_STRING8' , 30); /* Null terminated 8-bit character string */
  57. define('PT_UNICODE' , 31); /* Null terminated Unicode string */
  58. define('PT_SYSTIME' , 64); /* FILETIME 64-bit int w/ number of 100ns periods since Jan 1,1601 */
  59. define('PT_CLSID' , 72); /* OLE GUID */
  60. define('PT_BINARY' ,258); /* Uninterpreted (counted byte array) */
  61. /* Changes are likely to these numbers, and to their structures. */
  62. /* Alternate property type names for ease of use */
  63. define('PT_SHORT' ,PT_I2);
  64. define('PT_I4' ,PT_LONG);
  65. define('PT_FLOAT' ,PT_R4);
  66. define('PT_R8' ,PT_DOUBLE);
  67. define('PT_LONGLONG' ,PT_I8);
  68. define('PT_TSTRING' ,PT_STRING8);
  69. define('PT_MV_I2' ,(MV_FLAG | PT_I2));
  70. define('PT_MV_LONG' ,(MV_FLAG | PT_LONG));
  71. define('PT_MV_R4' ,(MV_FLAG | PT_R4));
  72. define('PT_MV_DOUBLE' ,(MV_FLAG | PT_DOUBLE));
  73. define('PT_MV_CURRENCY' ,(MV_FLAG | PT_CURRENCY));
  74. define('PT_MV_APPTIME' ,(MV_FLAG | PT_APPTIME));
  75. define('PT_MV_SYSTIME' ,(MV_FLAG | PT_SYSTIME));
  76. define('PT_MV_STRING8' ,(MV_FLAG | PT_STRING8));
  77. define('PT_MV_BINARY' ,(MV_FLAG | PT_BINARY));
  78. define('PT_MV_UNICODE' ,(MV_FLAG | PT_UNICODE));
  79. define('PT_MV_CLSID' ,(MV_FLAG | PT_CLSID));
  80. define('PT_MV_I8' ,(MV_FLAG | PT_I8));
  81. define('PT_MV_TSTRING' ,PT_MV_STRING8);
  82. /* bit 0: set if descending, clear if ascending */
  83. define('TABLE_SORT_ASCEND' ,(0x00000000));
  84. define('TABLE_SORT_DESCEND' ,(0x00000001));
  85. define('TABLE_SORT_COMBINE' ,(0x00000002));
  86. /* Bookmarks in Table */
  87. define('BOOKMARK_BEGINNING' , 0); /* Before first row */
  88. define('BOOKMARK_CURRENT' , 1); /* Before current row */
  89. define('BOOKMARK_END' , 2); /* After last row */
  90. define('MAPI_UNICODE' ,0x80000000);
  91. /* IMAPIFolder Interface --------------------------------------------------- */
  92. define('CONVENIENT_DEPTH' ,0x00000001);
  93. define('SEARCH_RUNNING' ,0x00000001);
  94. define('SEARCH_REBUILD' ,0x00000002);
  95. define('SEARCH_RECURSIVE' ,0x00000004);
  96. define('SEARCH_FOREGROUND' ,0x00000008);
  97. define('STOP_SEARCH' ,0x00000001);
  98. define('RESTART_SEARCH' ,0x00000002);
  99. define('RECURSIVE_SEARCH' ,0x00000004);
  100. define('SHALLOW_SEARCH' ,0x00000008);
  101. define('FOREGROUND_SEARCH' ,0x00000010);
  102. define('BACKGROUND_SEARCH' ,0x00000020);
  103. /* IMAPIFolder folder type (enum) */
  104. define('FOLDER_ROOT' ,0x00000000);
  105. define('FOLDER_GENERIC' ,0x00000001);
  106. define('FOLDER_SEARCH' ,0x00000002);
  107. /* CreateMessage */
  108. /****** MAPI_DEFERRED_ERRORS ((ULONG) 0x00000008) below */
  109. /****** MAPI_ASSOCIATED ((ULONG) 0x00000040) below */
  110. /* CopyMessages */
  111. define('MESSAGE_MOVE' ,0x00000001);
  112. define('MESSAGE_DIALOG' ,0x00000002);
  113. /****** MAPI_DECLINE_OK ((ULONG) 0x00000004) above */
  114. /* CreateFolder */
  115. define('OPEN_IF_EXISTS' ,0x00000001);
  116. /****** MAPI_DEFERRED_ERRORS ((ULONG) 0x00000008) below */
  117. /****** MAPI_UNICODE ((ULONG) 0x80000000) above */
  118. /* DeleteFolder */
  119. define('DEL_MESSAGES' ,0x00000001);
  120. define('FOLDER_DIALOG' ,0x00000002);
  121. define('DEL_FOLDERS' ,0x00000004);
  122. /* EmptyFolder */
  123. define('DEL_ASSOCIATED' ,0x00000008);
  124. /* CopyFolder */
  125. define('FOLDER_MOVE' ,0x00000001);
  126. /****** FOLDER_DIALOG ((ULONG) 0x00000002) above */
  127. /****** MAPI_DECLINE_OK ((ULONG) 0x00000004) above */
  128. define('COPY_SUBFOLDERS' ,0x00000010);
  129. /****** MAPI_UNICODE ((ULONG) 0x80000000) above */
  130. /* SetReadFlags */
  131. define('SUPPRESS_RECEIPT' ,0x00000001);
  132. /****** FOLDER_DIALOG ((ULONG) 0x00000002) above */
  133. define('CLEAR_READ_FLAG' ,0x00000004);
  134. /****** MAPI_DEFERRED_ERRORS ((ULONG) 0x00000008) below */
  135. define('GENERATE_RECEIPT_ONLY' ,0x00000010);
  136. define('CLEAR_RN_PENDING' ,0x00000020);
  137. define('CLEAR_NRN_PENDING' ,0x00000040);
  138. /* Flags defined in PR_MESSAGE_FLAGS */
  139. define('MSGFLAG_READ' ,0x00000001);
  140. define('MSGFLAG_UNMODIFIED' ,0x00000002);
  141. define('MSGFLAG_SUBMIT' ,0x00000004);
  142. define('MSGFLAG_UNSENT' ,0x00000008);
  143. define('MSGFLAG_HASATTACH' ,0x00000010);
  144. define('MSGFLAG_FROMME' ,0x00000020);
  145. define('MSGFLAG_ASSOCIATED' ,0x00000040);
  146. define('MSGFLAG_RESEND' ,0x00000080);
  147. define('MSGFLAG_RN_PENDING' ,0x00000100);
  148. define('MSGFLAG_NRN_PENDING' ,0x00000200);
  149. /* GetMessageStatus */
  150. define('MSGSTATUS_HIGHLIGHTED' ,0x00000001);
  151. define('MSGSTATUS_TAGGED' ,0x00000002);
  152. define('MSGSTATUS_HIDDEN' ,0x00000004);
  153. define('MSGSTATUS_DELMARKED' ,0x00000008);
  154. /* Bits for remote message status */
  155. define('MSGSTATUS_REMOTE_DOWNLOAD' ,0x00001000);
  156. define('MSGSTATUS_REMOTE_DELETE' ,0x00002000);
  157. /* SaveContentsSort */
  158. define('RECURSIVE_SORT' ,0x00000002);
  159. /* PR_STATUS property */
  160. define('FLDSTATUS_HIGHLIGHTED' ,0x00000001);
  161. define('FLDSTATUS_TAGGED' ,0x00000002);
  162. define('FLDSTATUS_HIDDEN' ,0x00000004);
  163. define('FLDSTATUS_DELMARKED' ,0x00000008);
  164. /* IMAPIStatus Interface --------------------------------------------------- */
  165. /* Values for PR_RESOURCE_TYPE, _METHODS, _FLAGS */
  166. define('MAPI_STORE_PROVIDER' , 33); /* Message Store */
  167. define('MAPI_AB' , 34); /* Address Book */
  168. define('MAPI_AB_PROVIDER' , 35); /* Address Book Provider */
  169. define('MAPI_TRANSPORT_PROVIDER' , 36); /* Transport Provider */
  170. define('MAPI_SPOOLER' , 37); /* Message Spooler */
  171. define('MAPI_PROFILE_PROVIDER' , 38); /* Profile Provider */
  172. define('MAPI_SUBSYSTEM' , 39); /* Overall Subsystem Status */
  173. define('MAPI_HOOK_PROVIDER' , 40); /* Spooler Hook */
  174. define('STATUS_VALIDATE_STATE' ,0x00000001);
  175. define('STATUS_SETTINGS_DIALOG' ,0x00000002);
  176. define('STATUS_CHANGE_PASSWORD' ,0x00000004);
  177. define('STATUS_FLUSH_QUEUES' ,0x00000008);
  178. define('STATUS_DEFAULT_OUTBOUND' ,0x00000001);
  179. define('STATUS_DEFAULT_STORE' ,0x00000002);
  180. define('STATUS_PRIMARY_IDENTITY' ,0x00000004);
  181. define('STATUS_SIMPLE_STORE' ,0x00000008);
  182. define('STATUS_XP_PREFER_LAST' ,0x00000010);
  183. define('STATUS_NO_PRIMARY_IDENTITY' ,0x00000020);
  184. define('STATUS_NO_DEFAULT_STORE' ,0x00000040);
  185. define('STATUS_TEMP_SECTION' ,0x00000080);
  186. define('STATUS_OWN_STORE' ,0x00000100);
  187. define('STATUS_NEED_IPM_TREE' ,0x00000800);
  188. define('STATUS_PRIMARY_STORE' ,0x00001000);
  189. define('STATUS_SECONDARY_STORE' ,0x00002000);
  190. /* ------------ */
  191. /* Random flags */
  192. /* Flag for deferred error */
  193. define('MAPI_DEFERRED_ERRORS' ,0x00000008);
  194. /* Flag for creating and using Folder Associated Information Messages */
  195. define('MAPI_ASSOCIATED' ,0x00000040);
  196. /* Flags for OpenMessageStore() */
  197. define('MDB_NO_DIALOG' ,0x00000001);
  198. define('MDB_WRITE' ,0x00000004);
  199. /****** MAPI_DEFERRED_ERRORS ((ULONG) 0x00000008) above */
  200. /****** MAPI_BEST_ACCESS ((ULONG) 0x00000010) above */
  201. define('MDB_TEMPORARY' ,0x00000020);
  202. define('MDB_NO_MAIL' ,0x00000080);
  203. /* Flags for OpenAddressBook */
  204. define('AB_NO_DIALOG' ,0x00000001);
  205. /* ((ULONG) 0x00000001 is not a valid flag on ModifyRecipients. */
  206. define('MODRECIP_ADD' ,0x00000002);
  207. define('MODRECIP_MODIFY' ,0x00000004);
  208. define('MODRECIP_REMOVE' ,0x00000008);
  209. define('MAPI_ORIG' ,0); /* Recipient is message originator */
  210. define('MAPI_TO' ,1); /* Recipient is a primary recipient */
  211. define('MAPI_CC' ,2); /* Recipient is a copy recipient */
  212. define('MAPI_BCC' ,3); /* Recipient is blind copy recipient */
  213. /* IAttach Interface ------------------------------------------------------- */
  214. /* IAttach attachment methods: PR_ATTACH_METHOD values */
  215. define('NO_ATTACHMENT' ,0x00000000);
  216. define('ATTACH_BY_VALUE' ,0x00000001);
  217. define('ATTACH_BY_REFERENCE' ,0x00000002);
  218. define('ATTACH_BY_REF_RESOLVE' ,0x00000003);
  219. define('ATTACH_BY_REF_ONLY' ,0x00000004);
  220. define('ATTACH_EMBEDDED_MSG' ,0x00000005);
  221. define('ATTACH_OLE' ,0x00000006);
  222. /* OpenProperty - ulFlags */
  223. define('MAPI_MODIFY' ,0x00000001);
  224. define('MAPI_CREATE' ,0x00000002);
  225. define('STREAM_APPEND' ,0x00000004);
  226. /****** MAPI_DEFERRED_ERRORS ((ULONG) 0x00000008) below */
  227. /* PR_PRIORITY values */
  228. define('PRIO_URGENT' , 1);
  229. define('PRIO_NORMAL' , 0);
  230. define('PRIO_NONURGENT' ,-1);
  231. /* PR_SENSITIVITY values */
  232. define('SENSITIVITY_NONE' ,0x00000000);
  233. define('SENSITIVITY_PERSONAL' ,0x00000001);
  234. define('SENSITIVITY_PRIVATE' ,0x00000002);
  235. define('SENSITIVITY_COMPANY_CONFIDENTIAL' ,0x00000003);
  236. /* PR_IMPORTANCE values */
  237. define('IMPORTANCE_LOW' ,0);
  238. define('IMPORTANCE_NORMAL' ,1);
  239. define('IMPORTANCE_HIGH' ,2);
  240. /* Stream interace values */
  241. define('STREAM_SEEK_SET' ,0);
  242. define('STREAM_SEEK_CUR' ,1);
  243. define('STREAM_SEEK_END' ,2);
  244. define('SHOW_SOFT_DELETES' ,0x00000002);
  245. define('DELETE_HARD_DELETE' ,0x00000010);
  246. /*
  247. * The following flags are used to indicate to the client what access
  248. * level is permissible in the object. They appear in PR_ACCESS in
  249. * message and folder objects as well as in contents and associated
  250. * contents tables
  251. */
  252. define('MAPI_ACCESS_MODIFY' ,0x00000001);
  253. define('MAPI_ACCESS_READ' ,0x00000002);
  254. define('MAPI_ACCESS_DELETE' ,0x00000004);
  255. define('MAPI_ACCESS_CREATE_HIERARCHY' ,0x00000008);
  256. define('MAPI_ACCESS_CREATE_CONTENTS' ,0x00000010);
  257. define('MAPI_ACCESS_CREATE_ASSOCIATED' ,0x00000020);
  258. define('MAPI_SEND_NO_RICH_INFO' ,0x00010000);
  259. /* flags for PR_STORE_SUPPORT_MASK */
  260. define('STORE_ANSI_OK' ,0x00020000); // The message store supports properties containing ANSI (8-bit) characters.
  261. define('STORE_ATTACH_OK' ,0x00000020); // The message store supports attachments (OLE or non-OLE) to messages.
  262. define('STORE_CATEGORIZE_OK' ,0x00000400); // The message store supports categorized views of tables.
  263. define('STORE_CREATE_OK' ,0x00000010); // The message store supports creation of new messages.
  264. define('STORE_ENTRYID_UNIQUE' ,0x00000001); // Entry identifiers for the objects in the message store are unique, that is, never reused during the life of the store.
  265. define('STORE_HTML_OK' ,0x00010000); // The message store supports Hypertext Markup Language (HTML) messages, stored in the PR_BODY_HTML property. Note that STORE_HTML_OK is not defined in versions of MAPIDEFS.H included with Microsoft® Exchange 2000 Server and earlier. If your development environment uses a MAPIDEFS.H file that does not include STORE_HTML_OK, use the value 0x00010000 instead.
  266. define('STORE_LOCALSTORE' ,0x00080000); // This flag is reserved and should not be used.
  267. define('STORE_MODIFY_OK' ,0x00000008); // The message store supports modification of its existing messages.
  268. define('STORE_MV_PROPS_OK' ,0x00000200); // The message store supports multivalued properties, guarantees the stability of value order in a multivalued property throughout a save operation, and supports instantiation of multivalued properties in tables.
  269. define('STORE_NOTIFY_OK' ,0x00000100); // The message store supports notifications.
  270. define('STORE_OLE_OK' ,0x00000040); // The message store supports OLE attachments. The OLE data is accessible through an IStorage interface, such as that available through the PR_ATTACH_DATA_OBJ property.
  271. define('STORE_PUBLIC_FOLDERS' ,0x00004000); // The folders in this store are public (multi-user), not private (possibly multi-instance but not multi-user).
  272. define('STORE_READONLY' ,0x00000002); // All interfaces for the message store have a read-only access level.
  273. define('STORE_RESTRICTION_OK' ,0x00001000); // The message store supports restrictions.
  274. define('STORE_RTF_OK' ,0x00000800); // The message store supports Rich Text Format (RTF) messages, usually stored compressed, and the store itself keeps PR_BODY and PR_RTF_COMPRESSED synchronized.
  275. define('STORE_SEARCH_OK' ,0x00000004); // The message store supports search-results folders.
  276. define('STORE_SORT_OK' ,0x00002000); // The message store supports sorting views of tables.
  277. define('STORE_SUBMIT_OK' ,0x00000080); // The message store supports marking a message for submission.
  278. define('STORE_UNCOMPRESSED_RTF' ,0x00008000); // The message store supports storage of Rich Text Format (RTF) messages in uncompressed form. An uncompressed RTF stream is identified by the value dwMagicUncompressedRTF in the stream header. The dwMagicUncompressedRTF value is defined in the RTFLIB.H file.
  279. define('STORE_UNICODE_OK' ,0x00040000); // The message store supports properties containing Unicode characters.
  280. /* PR_DISPLAY_TYPEs */
  281. /* For address book contents tables */
  282. define('DT_MAILUSER', 0x00000000);
  283. define('DT_DISTLIST', 0x00000001);
  284. define('DT_FORUM', 0x00000002);
  285. define('DT_AGENT', 0x00000003);
  286. define('DT_ORGANIZATION', 0x00000004);
  287. define('DT_PRIVATE_DISTLIST', 0x00000005);
  288. define('DT_REMOTE_MAILUSER', 0x00000006);
  289. /* For address book hierarchy tables */
  290. define('DT_MODIFIABLE', 0x00010000);
  291. define('DT_GLOBAL', 0x00020000);
  292. define('DT_LOCAL', 0x00030000);
  293. define('DT_WAN', 0x00040000);
  294. define('DT_NOT_SPECIFIC', 0x00050000);
  295. /* For folder hierarchy tables */
  296. define('DT_FOLDER', 0x01000000);
  297. define('DT_FOLDER_LINK', 0x02000000);
  298. define('DT_FOLDER_SPECIAL', 0x04000000);
  299. /* PR_DISPLAY_TYPE_EX values */
  300. define('DT_ROOM', 0x00000007);
  301. define('DT_EQUIPMENT', 0x00000008);
  302. define('DT_SEC_DISTLIST', 0x00000009);
  303. /* PR_DISPLAY_TYPE_EX flags */
  304. define('DTE_FLAG_REMOTE_VALID', 0x80000000);
  305. define('DTE_FLAG_ACL_CAPABLE', 0x40000000); /* on for DT_MAILUSER and DT_SEC_DISTLIST */
  306. define('DTE_MASK_REMOTE', 0x0000FF00);
  307. define('DTE_MASK_LOCAL', 0x000000FF);
  308. /* OlResponseStatus */
  309. define('olResponseNone' ,0);
  310. define('olResponseOrganized' ,1);
  311. define('olResponseTentative' ,2);
  312. define('olResponseAccepted' ,3);
  313. define('olResponseDeclined' ,4);
  314. define('olResponseNotResponded' ,5);
  315. /* OlRecipientTrackStatus to set PR_RECIPIENT_TRACKSTATUS in recipient table
  316. * Value of the recipient trackstatus are same as OlResponseStatus but
  317. * recipient trackstatus doesn't have olResponseOrganized and olResponseNotResponded
  318. * and olResponseNone has different interpretation with PR_RECIPIENT_TRACKSTATUS
  319. * so to avoid confusions we have defined new constants.
  320. */
  321. define('olRecipientTrackStatusNone' ,0);
  322. define('olRecipientTrackStatusTentative' ,2);
  323. define('olRecipientTrackStatusAccepted' ,3);
  324. define('olRecipientTrackStatusDeclined' ,4);
  325. /* OlMeetingStatus */
  326. define('olNonMeeting' ,0);
  327. define('olMeeting' ,1);
  328. define('olMeetingReceived' ,3);
  329. define('olMeetingCanceled' ,5);
  330. define('olMeetingReceivedAndCanceled' ,7);
  331. /* OlMeetingResponse */
  332. define('olMeetingTentative' ,2);
  333. define('olMeetingAccepted' ,3);
  334. define('olMeetingDeclined' ,4);
  335. /* task status */
  336. define('olTaskNotStarted' ,0);
  337. define('olTaskInProgress' ,1);
  338. define('olTaskComplete' ,2);
  339. define('olTaskWaiting' ,3);
  340. define('olTaskDeferred' ,4);
  341. /* restrictions */
  342. define('RES_AND' ,0);
  343. define('RES_OR' ,1);
  344. define('RES_NOT' ,2);
  345. define('RES_CONTENT' ,3);
  346. define('RES_PROPERTY' ,4);
  347. define('RES_COMPAREPROPS' ,5);
  348. define('RES_BITMASK' ,6);
  349. define('RES_SIZE' ,7);
  350. define('RES_EXIST' ,8);
  351. define('RES_SUBRESTRICTION' ,9);
  352. define('RES_COMMENT' ,10);
  353. /* restriction compares */
  354. define('RELOP_LT' , 0);
  355. define('RELOP_LE' , 1);
  356. define('RELOP_GT' , 2);
  357. define('RELOP_GE' , 3);
  358. define('RELOP_EQ' , 4);
  359. define('RELOP_NE' , 5);
  360. define('RELOP_RE' , 6);
  361. /* string 'fuzzylevel' */
  362. define('FL_FULLSTRING' ,0x00000000);
  363. define('FL_SUBSTRING' ,0x00000001);
  364. define('FL_PREFIX' ,0x00000002);
  365. define('FL_IGNORECASE' ,0x00010000);
  366. define('FL_IGNORENONSPACE' ,0x00020000);
  367. define('FL_LOOSE' ,0x00040000);
  368. /* bitmask restriction types */
  369. define('BMR_EQZ' ,0x00000000);
  370. define('BMR_NEZ' ,0x00000001);
  371. /* array index values of restrictions -- same values are used in php-ext/main.cpp::PHPArraytoSRestriction() */
  372. define('VALUE' , 0); // propval
  373. define('RELOP' , 1); // compare method
  374. define('FUZZYLEVEL' , 2); // string search flags
  375. define('CB' , 3); // size restriction
  376. define('ULTYPE' , 4); // bit mask restriction type BMR_xxx
  377. define('ULMASK' , 5); // bitmask
  378. define('ULPROPTAG' , 6); // property
  379. define('ULPROPTAG1' , 7); // RES_COMPAREPROPS 1st property
  380. define('ULPROPTAG2' , 8); // RES_COMPAREPROPS 2nd property
  381. define('PROPS' , 9); // RES_COMMENT properties
  382. define('RESTRICTION' ,10); // RES_COMMENT and RES_SUBRESTRICTION restriction
  383. /* GUIDs for PR_MDB_PROVIDER */
  384. define("KOPANO_SERVICE_GUID" ,makeGuid("{3C253DCA-D227-443C-94FE-425FAB958C19}")); // default store
  385. define("KOPANO_STORE_PUBLIC_GUID" ,makeGuid("{D47F4A09-D3BD-493C-B2FC-3C90BBCB48D4}")); // public store
  386. define("KOPANO_STORE_DELEGATE_GUID" ,makeGuid("{7C7C1085-BC6D-4E53-9DAB-8A53F8DEF808}")); // other store
  387. define("KOPANO_STORE_ARCHIVER_GUID" ,makeGuid("{BC8953AD-2E3F-4172-9404-896FF459870F}")); // archive store
  388. /* webapp depends on these yet */
  389. define("ZARAFA_SERVICE_GUID" ,makeGuid("{3C253DCA-D227-443C-94FE-425FAB958C19}")); // default store
  390. define("ZARAFA_STORE_PUBLIC_GUID" ,makeGuid("{D47F4A09-D3BD-493C-B2FC-3C90BBCB48D4}")); // public store
  391. define("ZARAFA_STORE_DELEGATE_GUID" ,makeGuid("{7C7C1085-BC6D-4E53-9DAB-8A53F8DEF808}")); // other store
  392. define('ZARAFA_STORE_ARCHIVER_GUID' ,makeGuid("{BC8953AD-2E3F-4172-9404-896FF459870F}")); // archive store
  393. /* global profile section guid */
  394. define('pbGlobalProfileSectionGuid' ,makeGuid("{C8B0DB13-05AA-1A10-9BB0-00AA002FC45A}"));
  395. /* Contacts provider GUID */
  396. define("KOPANO_CONTACTS_GUID" ,makeGuid("{30047F72-92E3-DA4F-B86A-E52A7FE46571}"));
  397. define('ZARAFA_CONTACTS_GUID' ,makeGuid("{30047F72-92E3-DA4F-B86A-E52A7FE46571}"));
  398. /* Permissions */
  399. // Get permission type
  400. define('ACCESS_TYPE_DENIED' ,1);
  401. define('ACCESS_TYPE_GRANT' ,2);
  402. define('ACCESS_TYPE_BOTH' ,3);
  403. define('ecRightsNone' ,0x00000000);
  404. define('ecRightsReadAny' ,0x00000001);
  405. define('ecRightsCreate' ,0x00000002);
  406. define('ecRightsEditOwned' ,0x00000008);
  407. define('ecRightsDeleteOwned' ,0x00000010);
  408. define('ecRightsEditAny' ,0x00000020);
  409. define('ecRightsDeleteAny' ,0x00000040);
  410. define('ecRightsCreateSubfolder' ,0x00000080);
  411. define('ecRightsFolderAccess' ,0x00000100);
  412. //define('ecrightsContact' ,0x00000200);
  413. define('ecRightsFolderVisible' ,0x00000400);
  414. define('ecRightsAll' ,ecRightsReadAny | ecRightsCreate | ecRightsEditOwned | ecRightsDeleteOwned | ecRightsEditAny | ecRightsDeleteAny | ecRightsCreateSubfolder | ecRightsFolderAccess | ecRightsFolderVisible);
  415. define('ecRightsFullControl' ,ecRightsReadAny | ecRightsCreate | ecRightsEditOwned | ecRightsDeleteOwned | ecRightsEditAny | ecRightsDeleteAny | ecRightsCreateSubfolder | ecRightsFolderVisible);
  416. define('ecRightsDefault' ,ecRightsNone | ecRightsFolderVisible);
  417. define('ecRightsDefaultPublic' ,ecRightsReadAny | ecRightsFolderVisible);
  418. define('ecRightsAdmin' ,0x00001000);
  419. define('ecRightsAllMask' ,0x000015FB);
  420. // Right change indication
  421. define('RIGHT_NORMAL' ,0x00);
  422. define('RIGHT_NEW' ,0x01);
  423. define('RIGHT_MODIFY' ,0x02);
  424. define('RIGHT_DELETED' ,0x04);
  425. define('RIGHT_AUTOUPDATE_DENIED' ,0x08);
  426. // IExchangeModifyTable: defines for rules
  427. define('ROWLIST_REPLACE' ,0x0001);
  428. define('ROW_ADD' ,0x0001);
  429. define('ROW_MODIFY' ,0x0002);
  430. define('ROW_REMOVE' ,0x0004);
  431. define('ROW_EMPTY' ,(ROW_ADD|ROW_REMOVE));
  432. // new property types
  433. define('PT_SRESTRICTION' ,0x00FD);
  434. define('PT_ACTIONS' ,0x00FE);
  435. // unused, I believe
  436. define('PT_FILE_HANDLE' ,0x0103);
  437. define('PT_FILE_EA' ,0x0104);
  438. define('PT_VIRTUAL' ,0x0105);
  439. // rules state
  440. define('ST_DISABLED' ,0x0000);
  441. define('ST_ENABLED' ,0x0001);
  442. define('ST_ERROR' ,0x0002);
  443. define('ST_ONLY_WHEN_OOF' ,0x0004);
  444. define('ST_KEEP_OOF_HIST' ,0x0008);
  445. define('ST_EXIT_LEVEL' ,0x0010);
  446. define('ST_SKIP_IF_SCL_IS_SAFE' ,0x0020);
  447. define('ST_RULE_PARSE_ERROR' ,0x0040);
  448. define('ST_CLEAR_OOF_HIST' ,0x80000000);
  449. // action types
  450. define('OP_MOVE' , 1);
  451. define('OP_COPY' , 2);
  452. define('OP_REPLY' , 3);
  453. define('OP_OOF_REPLY' , 4);
  454. define('OP_DEFER_ACTION' , 5);
  455. define('OP_BOUNCE' , 6);
  456. define('OP_FORWARD' , 7);
  457. define('OP_DELEGATE' , 8);
  458. define('OP_TAG' , 9);
  459. define('OP_DELETE' ,10);
  460. define('OP_MARK_AS_READ' ,11);
  461. // for OP_REPLY
  462. define('DO_NOT_SEND_TO_ORIGINATOR' ,1);
  463. define('STOCK_REPLY_TEMPLATE' ,2);
  464. // for OP_FORWARD
  465. define('FWD_PRESERVE_SENDER' ,1);
  466. define('FWD_DO_NOT_MUNGE_MSG' ,2);
  467. define('FWD_AS_ATTACHMENT' ,4);
  468. // scBounceCodevalues
  469. define('BOUNCE_MESSAGE_SIZE_TOO_LARGE' ,13);
  470. define('BOUNCE_FORMS_MISMATCH' ,31);
  471. define('BOUNCE_ACCESS_DENIED' ,38);
  472. // Free/busystatus
  473. define('fbFree' ,0);
  474. define('fbTentative' ,1);
  475. define('fbBusy' ,2);
  476. define('fbOutOfOffice' ,3);
  477. /* ICS flags */
  478. // For Synchronize()
  479. define('SYNC_UNICODE', 0x01);
  480. define('SYNC_NO_DELETIONS', 0x02);
  481. define('SYNC_NO_SOFT_DELETIONS', 0x04);
  482. define('SYNC_READ_STATE', 0x08);
  483. define('SYNC_ASSOCIATED', 0x10);
  484. define('SYNC_NORMAL', 0x20);
  485. define('SYNC_NO_CONFLICTS', 0x40);
  486. define('SYNC_ONLY_SPECIFIED_PROPS', 0x80);
  487. define('SYNC_NO_FOREIGN_KEYS', 0x100);
  488. define('SYNC_LIMITED_IMESSAGE', 0x200);
  489. define('SYNC_CATCHUP', 0x400);
  490. define('SYNC_NEW_MESSAGE', 0x800); // only applicable to ImportMessageChange()
  491. define('SYNC_MSG_SELECTIVE', 0x1000); // Used internally. Will reject if used by clients.
  492. define('SYNC_BEST_BODY', 0x2000);
  493. define('SYNC_IGNORE_SPECIFIED_ON_ASSOCIATED', 0x4000);
  494. define('SYNC_PROGRESS_MODE', 0x8000); // AirMapi progress mode
  495. define('SYNC_FXRECOVERMODE', 0x10000);
  496. define('SYNC_DEFER_CONFIG', 0x20000);
  497. define('SYNC_FORCE_UNICODE', 0x40000); // Forces server to return Unicode properties
  498. define('EMS_AB_ADDRESS_LOOKUP', 0x00000001); // Flag for resolvename to resolve only exact matches
  499. define('TBL_BATCH', 0x00000002); // Batch multiple table commands
  500. /* Flags for recipients in exceptions */
  501. define('recipSendable', 0x00000001); // sendable attendee.
  502. define('recipOrganizer', 0x00000002); // meeting organizer
  503. define('recipExceptionalResponse', 0x00000010); // attendee gave a response for the exception
  504. define('recipExceptionalDeleted', 0x00000020); // recipientRow exists, but it is treated as if the corresponding recipient is deleted from meeting
  505. define('recipOriginal', 0x00000100); // recipient is an original Attendee
  506. define('recipReserved', 0x00000200);
  507. /* Flags which indicates type of Meeting Object */
  508. define('mtgEmpty', 0x00000000); // Unspecified.
  509. define('mtgRequest', 0x00000001); // Initial meeting request.
  510. define('mtgFull', 0x00010000); // Full update.
  511. define('mtgInfo', 0x00020000); // Informational update.
  512. define('mtgOutOfDate', 0x00080000); // A newer Meeting Request object or Meeting Update object was received after this one.
  513. define('mtgDelegatorCopy', 0x00100000); // This is set on the delegator's copy when a delegate will handle meeting-related objects.
  514. define('MAPI_ONE_OFF_UNICODE', 0x8000); // the flag that defines whether the embedded strings are Unicode in one off entryids.
  515. define('MAPI_ONE_OFF_NO_RICH_INFO', 0x0001); // the flag that specifies whether the recipient gets TNEF or not.
  516. /* Mask flags for mapi_msgstore_advise */
  517. define('fnevCriticalError', 0x00000001);
  518. define('fnevNewMail', 0x00000002);
  519. define('fnevObjectCreated', 0x00000004);
  520. define('fnevObjectDeleted', 0x00000008);
  521. define('fnevObjectModified', 0x00000010);
  522. define('fnevObjectMoved', 0x00000020);
  523. define('fnevObjectCopied', 0x00000040);
  524. define('fnevSearchComplete', 0x00000080);
  525. define('fnevTableModified', 0x00000100);
  526. define('fnevStatusObjectModified', 0x00000200);
  527. define('fnevReservedForMapi', 0x40000000);
  528. define('fnevExtended', 0x80000000);
  529. ?>