extract-msg 0.48.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. extract_msg/__init__.py +71 -0
  2. extract_msg/__main__.py +115 -0
  3. extract_msg/_rtf/__init__.py +21 -0
  4. extract_msg/_rtf/create_doc.py +29 -0
  5. extract_msg/_rtf/inject_rtf.py +174 -0
  6. extract_msg/_rtf/token.py +35 -0
  7. extract_msg/_rtf/tokenize_rtf.py +253 -0
  8. extract_msg/attachments/__init__.py +144 -0
  9. extract_msg/attachments/attachment.py +188 -0
  10. extract_msg/attachments/attachment_base.py +730 -0
  11. extract_msg/attachments/broken_att.py +42 -0
  12. extract_msg/attachments/custom_att.py +173 -0
  13. extract_msg/attachments/custom_att_handler/__init__.py +80 -0
  14. extract_msg/attachments/custom_att_handler/custom_handler.py +134 -0
  15. extract_msg/attachments/custom_att_handler/lnk_obj_att.py +109 -0
  16. extract_msg/attachments/custom_att_handler/outlook_image_dib.py +141 -0
  17. extract_msg/attachments/emb_msg_att.py +134 -0
  18. extract_msg/attachments/signed_att.py +234 -0
  19. extract_msg/attachments/unsupported_att.py +40 -0
  20. extract_msg/attachments/web_att.py +74 -0
  21. extract_msg/constants/__init__.py +294 -0
  22. extract_msg/constants/ps.py +46 -0
  23. extract_msg/constants/re.py +42 -0
  24. extract_msg/constants/st.py +110 -0
  25. extract_msg/data/logging-config/logging-nt.json +64 -0
  26. extract_msg/data/logging-config/logging-posix.json +64 -0
  27. extract_msg/encoding/__init__.py +277 -0
  28. extract_msg/encoding/_dt/__init__.py +4 -0
  29. extract_msg/encoding/_dt/_mac_ce.py +8 -0
  30. extract_msg/encoding/_dt/_mac_cyrillic.py +8 -0
  31. extract_msg/encoding/_dt/_mac_greek.py +8 -0
  32. extract_msg/encoding/_dt/_mac_iceland.py +8 -0
  33. extract_msg/encoding/_dt/_mac_turkish.py +8 -0
  34. extract_msg/encoding/_dt/_win874_dec.py +8 -0
  35. extract_msg/encoding/_dt/_win950_dec.py +6 -0
  36. extract_msg/encoding/utils.py +329 -0
  37. extract_msg/enums.py +2067 -0
  38. extract_msg/exceptions.py +170 -0
  39. extract_msg/msg_classes/__init__.py +49 -0
  40. extract_msg/msg_classes/appointment.py +195 -0
  41. extract_msg/msg_classes/calendar.py +92 -0
  42. extract_msg/msg_classes/calendar_base.py +496 -0
  43. extract_msg/msg_classes/contact.py +1335 -0
  44. extract_msg/msg_classes/journal.py +131 -0
  45. extract_msg/msg_classes/meeting_cancellation.py +108 -0
  46. extract_msg/msg_classes/meeting_exception.py +55 -0
  47. extract_msg/msg_classes/meeting_forward.py +115 -0
  48. extract_msg/msg_classes/meeting_related.py +65 -0
  49. extract_msg/msg_classes/meeting_request.py +189 -0
  50. extract_msg/msg_classes/meeting_response.py +74 -0
  51. extract_msg/msg_classes/message.py +12 -0
  52. extract_msg/msg_classes/message_base.py +1382 -0
  53. extract_msg/msg_classes/message_signed.py +17 -0
  54. extract_msg/msg_classes/message_signed_base.py +168 -0
  55. extract_msg/msg_classes/msg.py +1172 -0
  56. extract_msg/msg_classes/post.py +53 -0
  57. extract_msg/msg_classes/sticky_note.py +67 -0
  58. extract_msg/msg_classes/task.py +363 -0
  59. extract_msg/msg_classes/task_request.py +86 -0
  60. extract_msg/null_date.py +34 -0
  61. extract_msg/ole_writer.py +1086 -0
  62. extract_msg/open_msg.py +204 -0
  63. extract_msg/properties/__init__.py +23 -0
  64. extract_msg/properties/named.py +481 -0
  65. extract_msg/properties/prop.py +506 -0
  66. extract_msg/properties/properties_store.py +476 -0
  67. extract_msg/py.typed +0 -0
  68. extract_msg/recipient.py +362 -0
  69. extract_msg/structures/__init__.py +34 -0
  70. extract_msg/structures/_helpers.py +345 -0
  71. extract_msg/structures/business_card.py +422 -0
  72. extract_msg/structures/cfoas.py +108 -0
  73. extract_msg/structures/contact_link_entry.py +51 -0
  74. extract_msg/structures/dev_mode_a.py +621 -0
  75. extract_msg/structures/dv_target_device.py +168 -0
  76. extract_msg/structures/entry_id.py +697 -0
  77. extract_msg/structures/misc_id.py +222 -0
  78. extract_msg/structures/mon_stream.py +55 -0
  79. extract_msg/structures/odt.py +74 -0
  80. extract_msg/structures/ole_pres.py +302 -0
  81. extract_msg/structures/ole_stream_struct.py +117 -0
  82. extract_msg/structures/recurrence_pattern.py +199 -0
  83. extract_msg/structures/report_tag.py +127 -0
  84. extract_msg/structures/system_time.py +158 -0
  85. extract_msg/structures/time_zone_definition.py +111 -0
  86. extract_msg/structures/time_zone_struct.py +102 -0
  87. extract_msg/structures/toc_entry.py +137 -0
  88. extract_msg/structures/tz_rule.py +148 -0
  89. extract_msg/utils.py +1270 -0
  90. extract_msg-0.48.2.dist-info/LICENSE.txt +674 -0
  91. extract_msg-0.48.2.dist-info/METADATA +321 -0
  92. extract_msg-0.48.2.dist-info/RECORD +95 -0
  93. extract_msg-0.48.2.dist-info/WHEEL +5 -0
  94. extract_msg-0.48.2.dist-info/entry_points.txt +2 -0
  95. extract_msg-0.48.2.dist-info/top_level.txt +1 -0
extract_msg/enums.py ADDED
@@ -0,0 +1,2067 @@
1
+ from __future__ import annotations
2
+
3
+
4
+ __all__ = [
5
+ 'AddressBookType',
6
+ 'ADVF',
7
+ 'AppointmentAuxilaryFlag',
8
+ 'AppointmentColor',
9
+ 'AppointmentStateFlag',
10
+ 'AttachmentPermissionType',
11
+ 'AttachmentType',
12
+ 'BCImageAlignment',
13
+ 'BCImageSource',
14
+ 'BCLabelFormat',
15
+ 'BCTemplateID',
16
+ 'BCTextFormat',
17
+ 'BodyTypes',
18
+ 'BusyStatus',
19
+ 'ClientIntentFlag',
20
+ 'ClipboardFormat',
21
+ 'Color',
22
+ 'ContactAddressIndex',
23
+ 'ContactLinkState',
24
+ 'DeencapType',
25
+ 'DevModeFields',
26
+ 'DirectoryEntryType',
27
+ 'DisplayType',
28
+ 'DMPaperSize',
29
+ 'DVAspect',
30
+ 'ElectronicAddressProperties',
31
+ 'EntryIDType',
32
+ 'EntryIDTypeHex',
33
+ 'ErrorBehavior',
34
+ 'ErrorCode',
35
+ 'ErrorCodeType',
36
+ 'Gender',
37
+ 'IconIndex',
38
+ 'Importance',
39
+ 'InsecureFeatures',
40
+ 'LogFlags',
41
+ 'MacintoshEncoding',
42
+ 'MeetingObjectChange',
43
+ 'MeetingRecipientType',
44
+ 'MeetingType',
45
+ 'MessageFormat',
46
+ 'MessageType',
47
+ 'NamedPropertyType',
48
+ 'NoteColor',
49
+ 'ODTCf',
50
+ 'ODTPersist1',
51
+ 'ODTPersist2',
52
+ 'OORBodyFormat',
53
+ 'PostalAddressID',
54
+ 'Priority',
55
+ 'PropertiesType',
56
+ 'PropertyFlags',
57
+ 'RecipientRowFlagType',
58
+ 'RecipientType',
59
+ 'RecurCalendarType',
60
+ 'RecurDOW',
61
+ 'RecurEndType',
62
+ 'RecurFrequency',
63
+ 'RecurMonthNthWeek',
64
+ 'RecurPatternTypeSpecificWeekday',
65
+ 'RecurPatternType',
66
+ 'ResponseStatus',
67
+ 'ResponseType',
68
+ 'RetentionFlags',
69
+ 'RuleActionType',
70
+ 'SaveType',
71
+ 'Sensitivity',
72
+ 'ServerProcessingAction',
73
+ 'SideEffect',
74
+ 'TaskAcceptance',
75
+ 'TaskHistory',
76
+ 'TaskMode',
77
+ 'TaskMultipleRecipients',
78
+ 'TaskOwnership',
79
+ 'TaskRequestType',
80
+ 'TaskState',
81
+ 'TaskStatus',
82
+ 'TZFlag',
83
+ 'WrappedType',
84
+ ]
85
+
86
+
87
+ import enum
88
+
89
+ from typing import Any, Dict, Iterable, List, Set, Type, Union
90
+
91
+
92
+ class AddressBookType(enum.IntEnum):
93
+ """
94
+ The type of object that an address book entry ID represents.
95
+
96
+ MUST be one of these or it is invalid.
97
+ """
98
+ LOCAL_MAIL_USER = 0x000
99
+ DISTRIBUTION_LIST = 0x001
100
+ BULLETIN_BOARD_OR_PUBLIC_FOLDER = 0x002
101
+ AUTOMATED_MAILBOX = 0x003
102
+ ORGANIZATIONAL_MAILBOX = 0x004
103
+ PRIVATE_DISTRIBUTION_LIST = 0x005
104
+ REMOTE_MAIL_USER = 0x006
105
+ CONTAINER = 0x100
106
+ TEMPLATE = 0x101
107
+ ONE_OFF_USER = 0x102
108
+ SEARCH = 0x200
109
+
110
+
111
+
112
+ class ADVF(enum.IntEnum):
113
+ ADVF_NODATA = 1
114
+ ADVF_PRIMEFIRST = 2
115
+ ADVF_ONLYONCE = 4
116
+ ADVF_DATAONSTOP = 64
117
+ ADVFCACHE_NOHANDLER = 8
118
+ ADVFCACHE_FORVEBUILTIN = 16
119
+ ADVFCACHE_ONSAVE = 32
120
+
121
+
122
+
123
+ class AppointmentAuxilaryFlag(enum.IntFlag):
124
+ """
125
+ Describes the auxilary state of the object.
126
+
127
+ * COPIED: The Calendar object was copied from another Calendar folder.
128
+ * FORCE_MEETING_RESPONSE: The client of server can require that a Meeting
129
+ Response object be sent to the organizer when a response is chosen.
130
+ * FORWARDED: The object was forwarded by the organizer or another recipient.
131
+ * REPAIR_UPDATE_MESSAGE: The meeting request is a Repair Update Message sent
132
+ from a server-side calendar repair system.
133
+ """
134
+ COPIED = 0b1
135
+ FORCE_MEETING_RESPONSE = 0b10
136
+ FORWARDED = 0b100
137
+ REPAIR_UPDATE_MESSAGE = 0b100000
138
+
139
+
140
+
141
+ class AppointmentColor(enum.IntEnum):
142
+ NONE = 0x00000000
143
+ RED = 0x00000001
144
+ BLUE = 0x00000002
145
+ GREEN = 0x00000003
146
+ GREY = 0x00000004
147
+ ORANGE = 0x00000005
148
+ CYAN = 0x00000006
149
+ OLIVE = 0x00000007
150
+ PURPLE = 0x00000008
151
+ TEAL = 0x00000009
152
+ YELLOW = 0x0000000A
153
+
154
+
155
+
156
+ class AppointmentStateFlag(enum.IntFlag):
157
+ """
158
+ The appointment start of the object.
159
+
160
+ * MEETING: The object is a Meeting object or meeting-related object.
161
+ * RECEIVED: The represented object was received from someone else.
162
+ * CANCELED: The Meeting object that is represented has been canceled.
163
+ """
164
+ MEETING = 0b1
165
+ RECEIVED = 0b10
166
+ CANCELED = 0b100
167
+
168
+
169
+
170
+ class AttachmentPermissionType(enum.IntEnum):
171
+ """
172
+ The permission type data associated with a web reference attachment.
173
+ """
174
+ NONE = 0
175
+ VIEW = 1
176
+ EDIT = 2
177
+
178
+
179
+
180
+ class AttachmentType(enum.IntEnum):
181
+ """
182
+ The type represented by the attachment.
183
+
184
+ * DATA: An attachment stored as plain bytes in the MSG file.
185
+ * MSG: A normally embedded MSG file.
186
+ * WEB: An attachment referencing a resource on the web.
187
+ * SIGNED: An attachment of a signed message that is *not* an MSG file.
188
+ * SIGNED_EMBEDDED: An MSG file embedded in a signed message.
189
+ * BROKEN: An attachment with a critical issue.
190
+ * UNSUPPORTED: An attachment that does not match any supported types.
191
+ * UNKNOWN: The attachment type could not be determined.
192
+ """
193
+ DATA = 0
194
+ MSG = 1
195
+ WEB = 2
196
+ SIGNED = 3
197
+ BROKEN = 4
198
+ UNSUPPORTED = 5
199
+ SIGNED_EMBEDDED = 6
200
+ CUSTOM = 7
201
+
202
+ UNKNOWN = 0xFFFFFFFF
203
+
204
+
205
+
206
+ class BCImageAlignment(enum.IntEnum):
207
+ STRETCH = 0x00
208
+ TOP_LEFT = 0x01
209
+ TOP_CENTER = 0x02
210
+ TOP_RIGHT = 0x03
211
+ MIDDLE_LEFT = 0x04
212
+ MIDDLE_CENTER = 0x05
213
+ MIDDLE_RIGHT = 0x06
214
+ BOTTOM_LEFT = 0x07
215
+ BOTTOM_CENTER = 0x08
216
+ BOTTOM_RIGHT = 0x09
217
+
218
+
219
+
220
+ class BCImageSource(enum.IntEnum):
221
+ CONTACT_PHOTO = 0
222
+ CARD_PHOTO = 1
223
+
224
+
225
+
226
+ class BCLabelFormat(enum.IntFlag):
227
+ """
228
+ The format for a label of a business card.
229
+
230
+ If the bit for ``RIGHT_TO_LEFT`` is not set, the is left to
231
+ right.
232
+
233
+ ALIGN_LEFT and ALIGN_RIGHT are mutually exclusive.
234
+ """
235
+ # Define normal values.
236
+ NO_LABEL = 0b000
237
+ ALIGN_RIGHT = 0b001
238
+ ALIGN_LEFT = 0b010
239
+ RIGHT_TO_LEFT = 0b100
240
+
241
+
242
+
243
+ class BCTemplateID(enum.IntEnum):
244
+ """
245
+ The template ID for a business card.
246
+
247
+ * IM_ALIGN_LEFT: The image area will be left aligned, stretching the full
248
+ height of the card vertically; text fields will appear to the right of
249
+ the image area.
250
+ * IM_ALIGN_RIGHT: The image area will be right aligned, stretching the full
251
+ height of the card vertically; text fields will appear to the left of
252
+ the image area.
253
+ * IM_ALIGN_TOP: The image area will be aligned to the top, stretching the
254
+ full width of the card horizontally; text fields will appear under the
255
+ image area.
256
+ * IM_ALIGN_BOTTOM: The image area will be aligned to the bottom, stretching
257
+ the full width of the card horizontally; text fields will appear above
258
+ the image area.
259
+ * NO_IMAGE: No image area is included in the card, only text fields are
260
+ included.
261
+ * BACKGROUND: The image area will be used as a background for the card,
262
+ stretching the full height and width of the card. Text fields are
263
+ displayed on top of the image area.
264
+ """
265
+ IM_ALIGN_LEFT = 0x00
266
+ IM_ALIGN_RIGHT = 0x01
267
+ IM_ALIGN_TOP = 0x02
268
+ IM_ALIGN_BOTTOM = 0x03
269
+ NO_IMAGE = 0x04
270
+ BACKGROUND = 0x05
271
+
272
+
273
+
274
+ class BCTextFormat(enum.IntFlag):
275
+ """
276
+ The alignment and formatting for the text field.
277
+
278
+ If none of the bits are set, the text field is displayed as a single line,
279
+ left-aligned.
280
+
281
+ RIGHT and CENTER are mutually exclusive.
282
+ """
283
+ DEFAULT = 0b000000
284
+ MULTILINE = 0b000001
285
+ BOLD = 0b000010
286
+ ITALIC = 0b000100
287
+ UNDERLINE = 0b001000
288
+ RIGHT = 0b010000
289
+ CENTER = 0b100000
290
+
291
+
292
+
293
+ class BodyTypes(enum.IntFlag):
294
+ """
295
+ Enum representing the types of bodies found in a message.
296
+
297
+ This does not include bodies generated from other sources, and so is a good
298
+ detection method for generated bodies (if you check a body and it is not
299
+ null, but it is not listed in the enum, then it was generated from another
300
+ body).
301
+
302
+ This is an IntFlag enum, so to check if a body was found use the in operator
303
+ with the body you are checking. For example:
304
+
305
+ .. code-block:: python
306
+
307
+ >>> rtfFound: bool = BodyTypes.RTF in msg.detectedBodies
308
+ """
309
+ NONE = 0b000
310
+ PLAIN = 0b001
311
+ RTF = 0b010
312
+ HTML = 0b100
313
+ ALL = 0b111
314
+
315
+
316
+
317
+ class BusyStatus(enum.IntEnum):
318
+ """
319
+ The availability of a use for the event described by the object.
320
+
321
+ * OL_FREE: The user is available.
322
+ * OL_TENTATIVE: The user has a tentative event scheduled.
323
+ * OL_BUSY: The user is busy.
324
+ * OL_OUT_OF_OFFICE: The user is Out of Office.
325
+ * OL_WORKING_ELSEWHERE: The user is working from a location other than the
326
+ office.
327
+ """
328
+ OL_FREE = 0x00000000
329
+ OL_TENTATIVE = 0x00000001
330
+ OL_BUSY = 0x00000002
331
+ OL_OUT_OF_OFFICE = 0x00000003
332
+ OL_WORKING_ELSEWHERE = 0x00000004
333
+
334
+
335
+
336
+ class ClientIntentFlag(enum.IntFlag):
337
+ """
338
+ An action a user has taken on a Meeting object.
339
+
340
+ * MANAGER: The user is the owner of the Meeting object's Calendar folder. If
341
+ set, DELEGATE SHOULD NOT be set.
342
+ * DELEGATE: The user is a delegate acting on a Meeting object in a
343
+ delegator's Calendar folder. If set, MANAGER SHOULD NOT be set.
344
+ * DELETED_WITH_NO_RESPONSE: The user deleted the Meeting object with no
345
+ response sent to the organizer.
346
+ * DELETED_EXCEPTION_WITH_NO_RESPONSE: The user deleted an exception to a
347
+ recurring series with no response sent to the organizer.
348
+ * RESPONDED_TENTATIVE: The user tentatively accepted the meeting request.
349
+ * RESPONSED_ACCEPT: The user accepted the meeting request.
350
+ * RESPONDED_DECLINE: The user declined the meeting request.
351
+ * MODIFIED_START_TIME: The user modified the start time.
352
+ * MODIFIED_END_TIME: The user modified the end time.
353
+ * MODIFIED_LOCATION: The user changed the location of the meeting.
354
+ * RESPONDED_EXCEPTION_DECLINE: The user declined an exception to a recurring
355
+ series.
356
+ * CANCELED: The user canceled a meeting request.
357
+ * EXCEPTION_CANCELED: The user canceled an exception to a recurring series.
358
+ """
359
+ MANAGER = 0b1
360
+ DELEGATE = 0b10
361
+ DELETED_WITH_NO_RESPONSE = 0b100
362
+ DELETED_EXCEPTION_WITH_NO_RESPONSE = 0b1000
363
+ RESPONDED_TENTATIVE = 0b10000
364
+ RESPONSED_ACCEPT = 0b100000
365
+ RESPONDED_DECLINE = 0b1000000
366
+ MODIFIED_START_TIME = 0b10000000
367
+ MODIFIED_END_TIME = 0b100000000
368
+ MODIFIED_LOCATION = 0b1000000000
369
+ RESPONDED_EXCEPTION_DECLINE = 0b10000000000
370
+ CANCELED = 0b100000000000
371
+ EXCEPTION_CANCELED = 0b1000000000000
372
+
373
+
374
+
375
+ class ClipboardFormat(enum.IntEnum):
376
+ """
377
+ The standard clipboard formats, as specified in [MS-OLEDS].
378
+ """
379
+ CF_BITMAP = 0x00000002
380
+ CF_METAFILEPICT = 0x00000003
381
+ CF_DIB = 0x00000008
382
+ CF_ENHMETAFILE = 0x0000000E
383
+
384
+
385
+
386
+ class Color(enum.IntEnum):
387
+ RED = 0
388
+ BLACK = 1
389
+
390
+
391
+
392
+ class ContactAddressIndex(enum.IntEnum):
393
+ EMAIL_1 = 0
394
+ EMAIL_2 = 1
395
+ EMAIL_3 = 2
396
+ FAX_1 = 3
397
+ FAX_2 = 4
398
+ FAX_3 = 5
399
+
400
+
401
+
402
+ class ContactLinkState(enum.IntEnum):
403
+ """
404
+ Values for PidLidContactLinkGlobalAddressListLinkState.
405
+
406
+ * DUPLICATE_NOT_LINKED: The duplicate contact is not linked to the GAL
407
+ contact or the GAL contact is not downloaded.
408
+ * DUPLICATE_LINKED: The duplicate contact is linked to the GAL contact.
409
+ * DUPLICATE_CANNOT_LINK: The duplicate contact cannot be automatically
410
+ linked to the GAL contact.
411
+ """
412
+ DUPLICATE_NOT_LINKED = 0
413
+ DUPLICATE_LINKED = 1
414
+ DUPLICATE_CANNOT_LINK = 2
415
+
416
+
417
+
418
+ class DeencapType(enum.IntEnum):
419
+ """
420
+ Enum to specify to custom deencapsulation functions the type of data being
421
+ requested.
422
+ """
423
+ PLAIN = 0
424
+ HTML = 1
425
+
426
+
427
+
428
+ class DevModeFields(enum.IntFlag):
429
+ DM_NUP = 0b00000000000000000000000000000010
430
+ DM_SCALE = 0b00000000000000000000000000001000
431
+ DM_PAPERWIDTH = 0b00000000000000000000000000010000
432
+ DM_PAPERLENGTH = 0b00000000000000000000000000100000
433
+ DM_PAPERSIZE = 0b00000000000000000000000001000000
434
+ DM_ORIENTATION = 0b00000000000000000000000010000000
435
+ DM_COLLATE = 0b00000000000000000000000100000000
436
+ DM_TTOPTION = 0b00000000000000000000001000000000
437
+ DM_YRESOLUTION = 0b00000000000000000000010000000000
438
+ DM_DUPLEX = 0b00000000000000000000100000000000
439
+ DM_COLOR = 0b00000000000000000001000000000000
440
+ DM_PRINTQUALITY = 0b00000000000000000010000000000000
441
+ DM_DEFAULTSOURCE = 0b00000000000000000100000000000000
442
+ DM_COPIES = 0b00000000000000001000000000000000
443
+ DM_ICMMETHOD = 0b00000000000000010000000000000000
444
+ DM_FORMNAME = 0b00000000100000000000000000000000
445
+ DM_DITHERTYPE = 0b00100000000000000000000000000000
446
+ DM_MEDIATYPE = 0b01000000000000000000000000000000
447
+ DM_ICMINTENT = 0b10000000000000000000000000000000
448
+
449
+
450
+
451
+ class DirectoryEntryType(enum.IntEnum):
452
+ UNALLOCATED = 0
453
+ UNKNOWN = 0
454
+ STORAGE = 1
455
+ STREAM = 2
456
+ ROOT_STORAGE = 5
457
+
458
+
459
+
460
+ class DisplayType(enum.IntEnum):
461
+ MAILUSER = 0x0000
462
+ DISTLIST = 0x0001
463
+ FORUM = 0x0002
464
+ AGENT = 0x0003
465
+ ORGANIZATION = 0x0004
466
+ PRIVATE_DISTLIST = 0x0005
467
+ REMOTE_MAILUSER = 0x0006
468
+ CONTAINER = 0x0100
469
+ TEMPLATE = 0x0101
470
+ ADDRESS_TEMPLATE = 0x0102
471
+ SEARCH = 0x0200
472
+
473
+
474
+
475
+ class DMPaperSize(enum.IntEnum):
476
+ """
477
+ The size of the output media for printers.
478
+
479
+ Value *SHOULD* be one of these, however it MAY be a device-specific value
480
+ that is greater than or equal to 0x0100.
481
+ """
482
+ DMPAPER_LETTER = 0x0001
483
+ DMPAPER_LETTERSMALL = 0x0002
484
+ DMPAPER_TABLOID = 0x0003
485
+ DMPAPER_LEDGER = 0x0004
486
+ DMPAPER_LEGAL = 0x0005
487
+ DMPAPER_STATEMENT = 0x0006
488
+ DMPAPER_EXECUTIVE = 0x0007
489
+ DMPAPER_A3 = 0x0008
490
+ DMPAPER_A4 = 0x0009
491
+ DMPAPER_A4SMALL = 0x000A
492
+ DMPAPER_A5 = 0x000B
493
+ DMPAPER_B4 = 0x000C
494
+ DMPAPER_B5 = 0x000D
495
+ DMPAPER_FOLIO = 0x000E
496
+ DMPAPER_QUARTO = 0x000F
497
+ DMPAPER_10X14 = 0x0010
498
+ DMPAPER_11X17 = 0x0011
499
+ DMPAPER_NOTE = 0x0012
500
+ DMPAPER_ENV_9 = 0x0013
501
+ DMPAPER_ENV_10 = 0x0014
502
+ DMPAPER_ENV_11 = 0x0015
503
+ DMPAPER_ENV_12 = 0x0016
504
+ DMPAPER_ENV_14 = 0x0017
505
+ DMPAPER_CSHEET = 0x0018
506
+ DMPAPER_DSHEET = 0x0019
507
+ DMPAPER_ESHEET = 0x001A
508
+ DMPAPER_ENV_DL = 0x001B
509
+ DMPAPER_ENV_C5 = 0x001C
510
+ DMPAPER_ENV_C3 = 0x001D
511
+ DMPAPER_ENV_C4 = 0x001E
512
+ DMPAPER_ENV_C6 = 0x001F
513
+ DMPAPER_ENV_C65 = 0x0020
514
+ DMPAPER_ENV_B4 = 0x0021
515
+ DMPAPER_ENV_B5 = 0x0022
516
+ DMPAPER_ENV_B6 = 0x0023
517
+ DMPAPER_ENV_ITALY = 0x0024
518
+ DMPAPER_ENV_MONARCH = 0x0025
519
+ DMPAPER_ENV_PERSONAL = 0x0026
520
+ DMPAPER_FANFOLD_US = 0x0027
521
+ DMPAPER_FANFOLD_STD_GERMAN = 0x0028
522
+ DMPAPER_FANFOLD_LGL_GERMAN = 0x0029
523
+ DMPAPER_DBL_JAPANESE_POSTCARD = 0x0045
524
+ DMPAPER_A6 = 0x0046
525
+ DMPAPER_JENV_KAKU2 = 0x0047
526
+ DMPAPER_JENV_KAKU3 = 0x0048
527
+ DMPAPER_JENV_CHOU3 = 0x0049
528
+ DMPAPER_JENV_CHOU4 = 0x004A
529
+ DMPAPER_LETTER_ROTATED = 0x004B
530
+ DMPAPER_A3_ROTATED = 0x004C
531
+ DMPAPER_A4_ROTATED = 0x004D
532
+ DMPAPER_A5_ROTATED = 0x004E
533
+ DMPAPER_B4_JIS_ROTATED = 0x004F
534
+ DMPAPER_B5_JIS_ROTATED = 0x0050
535
+ DMPAPER_JAPANESE_POSTCARD_ROTATED = 0x0051
536
+ DMPAPER_DBL_JAPANESE_POSTCARD_ROTATED = 0x0052
537
+ DMPAPER_A6_ROTATED = 0x0053
538
+ DMPAPER_JENV_KAKU2_ROTATED = 0x0054
539
+ DMPAPER_JENV_KAKU3_ROTATED = 0x0055
540
+ DMPAPER_JENV_CHOU3_ROTATED = 0x0056
541
+ DMPAPER_JENV_CHOU4_ROTATED = 0x0057
542
+ DMPAPER_B6_JIS = 0x0058
543
+ DMPAPER_B6_JIS_ROTATED = 0x0059
544
+ DMPAPER_12X11 = 0x005A
545
+ DMPAPER_JENV_YOU4 = 0x005B
546
+ DMPAPER_JENV_YOU4_ROTATED = 0x005C
547
+ DMPAPER_P16K = 0x005D
548
+ DMPAPER_P32K = 0x005E
549
+ DMPAPER_P32KBIG = 0x005F
550
+ DMPAPER_PENV_1 = 0x0060
551
+ DMPAPER_PENV_2 = 0x0061
552
+ DMPAPER_PENV_3 = 0x0062
553
+ DMPAPER_PENV_4 = 0x0063
554
+ DMPAPER_PENV_5 = 0x0064
555
+ DMPAPER_PENV_6 = 0x0065
556
+ DMPAPER_PENV_7 = 0x0066
557
+ DMPAPER_PENV_8 = 0x0067
558
+ DMPAPER_PENV_9 = 0x0068
559
+ DMPAPER_PENV_10 = 0x0069
560
+ DMPAPER_P16K_ROTATED = 0x006A
561
+ DMPAPER_P32K_ROTATED = 0x006B
562
+ DMPAPER_P32KBIG_ROTATED = 0x006C
563
+ DMPAPER_PENV_1_ROTATED = 0x006D
564
+ DMPAPER_PENV_2_ROTATED = 0x006E
565
+ DMPAPER_PENV_3_ROTATED = 0x006F
566
+ DMPAPER_PENV_4_ROTATED = 0x0070
567
+ DMPAPER_PENV_5_ROTATED = 0x0071
568
+ DMPAPER_PENV_6_ROTATED = 0x0072
569
+ DMPAPER_PENV_7_ROTATED = 0x0073
570
+ DMPAPER_PENV_8_ROTATED = 0x0074
571
+ DMPAPER_PENV_9_ROTATED = 0x0075
572
+ DMPAPER_PENV_10_ROTATED = 0x0076
573
+ # TODO
574
+
575
+
576
+
577
+ class DVAspect(enum.IntEnum):
578
+ """
579
+ Part of the extra data for Outlook signatures.
580
+
581
+ Different sources seem to disagree on the meanings, so I'm sticking to the
582
+ meanings in the official Microsoft documentation of the DVASPECT
583
+ enumeration.
584
+ """
585
+ CONTENT = 1
586
+ THUMBNAIL = 2
587
+ ICON = 4
588
+ DOCPRINT = 8
589
+
590
+
591
+
592
+ class ElectronicAddressProperties(enum.IntEnum):
593
+ @classmethod
594
+ def fromIter(cls, items: Iterable[int]) -> Set[ElectronicAddressProperties]:
595
+ """
596
+ Uses the iterable of ints to create a set of this enum.
597
+ """
598
+ return {cls(x) for x in items}
599
+
600
+ EMAIL_1 = 0x00000000
601
+ EMAIL_2 = 0x00000001
602
+ EMAIL_3 = 0x00000002
603
+ BUSINESS_FAX = 0x00000003
604
+ HOME_FAX = 0x00000004
605
+ PRIMARY_FAX = 0x00000005
606
+
607
+
608
+
609
+ class EntryIDType(enum.Enum):
610
+ """
611
+ Converts a UID to the type of Entry ID structure.
612
+ """
613
+ def toHex(self):
614
+ """
615
+ Converts an EntryIDType to it's hex equivelent.
616
+ """
617
+ return EntryIDTypeHex[self.name]
618
+
619
+ # This is the same as the one used for permanent IDs, and the strucutre is
620
+ # near identical too. Anything that needs a PermanentEntryID will need to
621
+ # specifically ask for it instead of autogenerating it.
622
+ ADDRESS_BOOK_RECIPIENT = b'\xDC\xA7\x40\xC8\xC0\x42\x10\x1A\xB4\xB9\x08\x00\x2B\x2F\xE1\x82'
623
+ # Contact address or personal distribution list recipient.
624
+ CA_OR_PDL_RECIPIENT = b'\xFE\x42\xAA\x0A\x18\xC7\x1A\x10\xE8\x85\x0B\x65\x1C\x24\x00\x00'
625
+ # This is also used for the Store Object EntryID structure.
626
+ NNTP_NEWSGROUP_FOLDER = b'\x38\xA1\xBB\x10\x05\xE5\x10\x1A\xA1\xBB\x08\x00\x2B\x2A\x56\xC2'
627
+ ONE_OFF_RECIPIENT = b'\x81\x2B\x1F\xA4\xBE\xA3\x10\x19\x9D\x6E\x00\xDD\x01\x0F\x54\x02'
628
+ PUBLIC_MESSAGE_STORE = b'\x1A\x44\x73\x90\xAA\x66\x11\xCD\x9B\xC8\x00\xAA\x00\x2F\xC4\x5A'
629
+ # [MS-OXOCNTC] WrappedEntryId Structure.
630
+ WRAPPED = b'\xC0\x91\xAD\xD3\x51\x9D\xCF\x11\xA4\xA9\x00\xAA\x00\x47\xFA\xA4'
631
+
632
+
633
+
634
+ class EntryIDTypeHex(enum.Enum):
635
+ """
636
+ Converts a UID to the type of Entry ID structure.
637
+
638
+ Uses a hex string instead of bytes for the value.
639
+ """
640
+ def toRaw(self):
641
+ """
642
+ Converts and EntryIDTypeHex to it's raw equivelent.
643
+ """
644
+ return EntryIDType[self.name]
645
+
646
+ ADDRESS_BOOK_RECIPIENT = 'DCA740C8C042101AB4B908002B2FE182'
647
+ # Contact address or personal distribution list recipient.
648
+ CA_OR_PDL_RECIPIENT = 'FE42AA0A18C71A10E8850B651C240000'
649
+ NNTP_NEWSGROUP_FOLDER = '38A1BB1005E5101AA1BB08002B2A56C2'
650
+ ONE_OFF_RECIPIENT = '812B1FA4BEA310199D6E00DD010F5402'
651
+ PUBLIC_MESSAGE_STORE = '1A447390AA6611CD9BC800AA002FC45A'
652
+ # [MS-OXOCNTC] WrappedEntryId Structure.
653
+ WRAPPED = 'C091ADD3519DCF11A4A900AA0047FAA4'
654
+
655
+
656
+
657
+ class ErrorBehavior(enum.IntFlag):
658
+ """
659
+ The behavior to follow when handling an error in an MSG file and it's
660
+ attachments.
661
+
662
+ Specifying an option indicates the behavior for the situation is to log a
663
+ message, if anything, instead of raising an exception. This is an int flag
664
+ enum, so the options you want will be ORed with each other.
665
+
666
+ * THROW: Throw the exception regardless of type.
667
+ * ATTACH_NOT_IMPLEMENTED: Silence the exception for NotImplementedError.
668
+ * ATTACH_BROKEN: Silence the exception for broken attachments.
669
+ * ATTACH_SUPPRESS_ALL: Silence the exception for NotImplementedError and for
670
+ broken attachments.
671
+ * RTFDE_MALFORMED: Silences errors about malformed RTF data.
672
+ * RTFDE_UNKNOWN_ERROR: Silences errors from RTFDE that are not normal.
673
+ * RTFDE: Silences all errors from RTFDE.
674
+ * STANDARDS_VIOLATION: Silences StandardViolationError where acceptable.
675
+ * OLE_DEFECT_INCORRECT: Silences defects of type DEFECT_INCORRECT that are
676
+ enabled by default. This can lead to strange bugs.
677
+ * NAMED_NAME_STREAM: Silences errors caused by invalid indexes into the
678
+ name stream for named properties. Any properties with an invalid name will
679
+ simply be dropped.
680
+ * SUPPRESS_ALL: Silences all of the above.
681
+ """
682
+ THROW = 0b000000
683
+ # Attachments.
684
+ ATTACH_NOT_IMPLEMENTED = 0b000001
685
+ ATTACH_BROKEN = 0b000010
686
+ ATTACH_SUPPRESS_ALL = 0b000011
687
+ # RTFDE.
688
+ RTFDE_MALFORMED = 0b000100
689
+ RTFDE_UNKNOWN_ERROR = 0b001000
690
+ RTFDE = 0b001100
691
+ # General.
692
+ STANDARDS_VIOLATION = 0b010000
693
+ OLE_DEFECT_INCORRECT = 0b100000
694
+ # Named Properties
695
+ NAMED_NAME_STREAM = 0b1000000
696
+
697
+ SUPPRESS_ALL = 0b1111111
698
+
699
+
700
+
701
+ class ErrorCode(enum.IntEnum):
702
+ SUCCESS = 0x00000000
703
+ GENERAL_FAILURE = 0x80004005
704
+ OUT_OF_MEMORY = 0x8007000E
705
+ INVALID_PARAMETER = 0x80070057
706
+ NO_INTERFACE = 0x80004002
707
+ ACCESS_DENIED = 0x80070005
708
+ STORAGE_INVALID_FUNCTION = 0x80030001
709
+ STORAGE_ACCESS_DENIED = 0x80030005
710
+ STORAGE_INSUFFICIENT_MEMORY = 0x80030008
711
+ STORAGE_INVALID_POINTER = 0x80030009
712
+ STORAGE_READ_FAULT = 0x8003001E
713
+ STORAGE_LOCK_VIOLATION = 0x80030021
714
+ STORAGE_INVALID_PARAMETER = 0x80030057
715
+ STREAM_SIZE_ERROR = 0x80030070
716
+ STORAGE_INVALID_FLAG = 0x800300FF
717
+ STORAGE_CANNOT_SAVE = 0x80030103
718
+ NOT_SUPPORTED = 0x80040102
719
+ INVALID_CHARACTER_WIDTH = 0x80040103
720
+ STRING_TOO_LONG = 0x80040105
721
+ INVALID_FLAG = 0x80040106
722
+ INVALID_ENTRY_ID = 0x80040107
723
+ INVALID_OBJECT = 0x80040108
724
+ OBJECT_CHANGED = 0x80040109
725
+ OBJECT_DELETED = 0x8004010A
726
+ SERVER_BUSY = 0x8004010B
727
+ OUT_OF_DISK = 0x8004010D
728
+ OUT_OF_RESOURCES = 0x8004010E
729
+ NOT_FOUND = 0x8004010F
730
+ VERSION_MISMATCH = 0x80040110
731
+ LOGON_FAILED = 0x80040111
732
+ TOO_MANY_SESSIONS = 0x80040112
733
+ USER_CANCELED = 0x80040113
734
+ ABORT_FAILED = 0x80040114
735
+ NETWORK_ERROR = 0x80040115
736
+ DISK_ERROR = 0x80040116
737
+ TOO_COMPLEX = 0x80040117
738
+ INVALID_COLUMN = 0x80040118
739
+ COMPUTED_VALUE = 0x8004011A
740
+ CORRUPT_DATA = 0x8004011B
741
+ INVALID_CODEPAGE = 0x8004011E
742
+ INVALID_LOCALE = 0x8004011F
743
+ TIME_SKEW = 0x80040123
744
+ END_OF_SESSION = 0x80040200
745
+ UNKNOWN_ENTRY_ID = 0x80040201
746
+ NOT_COMPLETED = 0x80040400
747
+ TIMEOUT = 0x80040401
748
+ EMPTY_TABLE = 0x80040402
749
+ TABLE_TOO_BIG = 0x80040403
750
+ INVALID_BOOKMARK = 0x80040405
751
+ ERROR_WAIT = 0x80040500
752
+ ERROR_CANCEL = 0x80040501
753
+ NO_SUPPRESS = 0x80040602
754
+ COLLIDING_NAMES = 0x80040604
755
+ NOT_INITIALIZED = 0x80040605
756
+ NO_RECIPIENTS = 0x80040607
757
+ ALREADY_SENT = 0x80040608
758
+ HAS_FOLDERS = 0x80040609
759
+ HAS_MESSAGES = 0x8004060A
760
+ FOLDER_CYCLE = 0x8004060B
761
+ TOO_MANY_LOCKS = 0x8004060D
762
+ AMBIGUOUS_RECIPIENT = 0x80040700
763
+ SYNC_OBJECT_DELETED = 0x80040800
764
+ IGNORE_FAILURE = 0x80040801
765
+ SYNC_CONFLICT = 0x80040802
766
+ NO_PARENT_FOLDER = 0x80040803
767
+ CYCLE_DETECTED = 0x80040804
768
+ NOT_SYNCHRONIZED = 0x80040805
769
+ NAMED_PROPERTY_QUOTA = 0x80040900
770
+ NOT_IMPLEMENTED = 0x80040FFF
771
+
772
+
773
+
774
+ class ErrorCodeType(enum.IntEnum):
775
+ """
776
+ Enum representing values for PtypErrorCode.
777
+
778
+ See "Additional Error Codes" in [MS-OXCDATA].
779
+ """
780
+ SUCCESS = 0x00000000
781
+ ISAM_ERROR = 0x000003EA
782
+ UNKNOWN_USER = 0x000003EB
783
+ EXITING = 0x000003ED
784
+ BAD_CONFIGURATION = 0x000003EE
785
+ UNKNOWN_CODE_PAGE = 0x000003EF
786
+ SERVER_MEMORY = 0x000003F0
787
+ LOGIN_PERMISSION = 0x000003F2
788
+ DATABASE_ROLLED_BACK = 0x000003F3
789
+ DATABASE_COPIED_ERROR = 0x000003F4
790
+ AUDIT_NOT_ALLOWED = 0x000003F5
791
+ ZOMBIE_USER = 0x000003F6
792
+ UNCONVERTABLE_ACL = 0x000003F7
793
+ NO_FREE_JET_SESSIONS = 0x0000044C
794
+ DIFFERENT_JET_SESSION = 0x0000044D
795
+ FILE_REMOVE = 0x0000044F
796
+ PARAMETER_OVERFLOW = 0x00000450
797
+ BAD_VERSION = 0x00000451
798
+ TOO_MANY_COLUMNS = 0x00000452
799
+ HAVE_MORE = 0x00000453
800
+ DATABASE_ERROR = 0x00000454
801
+ INDEX_NAME_TOO_BIG = 0x00000455
802
+ UNSUPPORTED_PROPERTY = 0x00000456
803
+ MESSAGE_NOT_SAVED = 0x00000457
804
+ UNPUBLISHED_NOTIFICATION = 0x00000459
805
+ DIFFERENT_ROOT = 0x0000045B
806
+ BAD_FOLDER_NAME = 0x0000045C
807
+ ATTACHMENT_OPEN = 0x0000045D
808
+ INVALID_COLLAPSE_STATE = 0x0000045E
809
+ SKIP_MY_CHILDREN = 0x0000045F
810
+ SEARCH_FOLDER = 0x00000460
811
+ NOT_SEARCH_FOLDER = 0x00000461
812
+ FOLDER_SET_RECEIVE = 0x00000462
813
+ NO_RECEIVE_FOLDER = 0x00000463
814
+ DELETE_SUBMITTED_MESSAGE = 0x00000465
815
+ INVALID_RECIPIENTS = 0x00000467
816
+ NO_REPLICA_HERE = 0x00000468
817
+ NO_REPLICA_AVAILABLE = 0x00000469
818
+ PUBLIC_DATABASE = 0x0000046A
819
+ NOT_PUBLIC_DATABASE = 0x0000046B
820
+ RECORD_NOT_FOUND = 0x0000046C
821
+ REPLICATION_CONFLICT = 0x0000046D
822
+ FX_BUFFER_OVERRUN = 0x00000470
823
+ FX_BUFFER_EMPTY = 0x00000471
824
+ FX_PARTIAL_VALUE = 0x00000472
825
+ FX_NO_ROOM = 0x00000473
826
+ TIME_EXPIRED = 0x00000474
827
+ DESTINATION_ERROR = 0x00000475
828
+ DATABASE_NOT_INITIALIZED = 0x00000476
829
+ WRONG_SERVER = 0x00000478
830
+ BUFFER_TOO_SMALL = 0x0000047D
831
+ ATTACHMENT_RESOLUTION_REQUIRED = 0x0000047E
832
+ SERVER_PAUSED = 0x0000047F
833
+ SERVER_BUSY = 0x00000480
834
+ NO_SUCH_LOGON = 0x00000481
835
+ LOAD_LIBRARY_FAILED = 0x00000482
836
+ ALREADY_CONFIGURED = 0x00000483
837
+ NOT_CONFIGURED = 0x00000484
838
+ DATA_LOSS = 0x00000485
839
+ MAXIMUM_SEND_THREAD_EXCEEDED = 0x00000488
840
+ FX_ERROR_MARKER = 0x00000489
841
+ NO_FREE_JTABS = 0x0000048A
842
+ NOT_PRIVATE_DATABASE = 0x0000048B
843
+ ISINTEG_MDB = 0x0000048C
844
+ RECOVERY_MISMATCH = 0x0000048D
845
+ TABLE_MAY_NOT_BE_DELETED = 0x0000048E
846
+ SEARCH_FOLDER_SCOPE_VIOLATION = 0x00000490
847
+ RPC_REGISTER_IF = 0x000004B1
848
+ RPC_LISTEN = 0x000004B2
849
+ RPC_FORMAT = 0x000004B6
850
+ NO_COPY_TO = 0x000004B7
851
+ NULL_OBJECT = 0x000004B9
852
+ RPC_AUTHENTICATION = 0x000004BC
853
+ RPC_BAD_AUTHENTICATION_LEVEL = 0x000004BD
854
+ NULL_COMMENT_RESTRICTION = 0x000004BE
855
+ RULES_LOAD_ERROR = 0x000004CC
856
+ RULES_DELIVER_ERR = 0x000004CD
857
+ RULES_PARSING_ERR = 0x000004CE
858
+ RULES_CREATE_DAE = 0x000004CF
859
+ RULES_CREATE_DAM = 0x000004D0
860
+ RULES_NO_MOVE_COPY_FOLDER = 0x000004D1
861
+ RULES_NO_FOLDER_RIGHTS = 0x000004D2
862
+ MESSAGE_TOO_BIG = 0x000004D4
863
+ FORM_NOT_VALID = 0x000004D5
864
+ NOT_AUTHORIZED = 0x000004D6
865
+ DELETE_MESSAGE = 0x000004D7
866
+ BOUNCE_MESSAGE = 0x000004D8
867
+ QUOTA_EXCEEDED = 0x000004D9
868
+ MAX_SUBMISSION_EXCEEDED = 0x000004DA
869
+ MAX_ATTACHMENT_EXCEEDED = 0x000004DB
870
+ SEND_AS_DENIED = 0x000004DC
871
+ SHUTOFF_QUOTA_EXCEEDED = 0x000004DD
872
+ TOO_MANY_OPEN_OBJECTS = 0x000004DE
873
+ CLIENT_VERSION_BLOCKED = 0x000004DF
874
+ RPC_HTTP_DISALLOWED = 0x000004E0
875
+ CACHED_MODE_REQUIRED = 0x000004E1
876
+ FOLDER_NOT_CLEANED_UP = 0x000004E3
877
+ FORMAT_ERROR = 0x000004ED
878
+ NOT_EXPANDED = 0x000004F7
879
+ NOT_COLLAPSED = 0x000004F8
880
+ NO_EXPAND_LEAF_ROW = 0x000004F9
881
+ UNREGISTERED_NAME_PROP = 0x000004FA
882
+ FOLDER_DISABLED = 0x000004FB
883
+ DOMAIN_ERROR = 0x000004FC
884
+ NO_CREATE_RIGHT = 0x000004FF
885
+ PUBLIC_ROOT = 0x00000500
886
+ NO_READ_RIGHT = 0x00000501
887
+ NO_CREATE_SUBFOLDER_RIGHT = 0x00000502
888
+ MESSAGE_CYCLE = 0x00000504
889
+ NULL_DESTINATION_OBJECT = 0x00000503
890
+ TOO_MANY_RECIPS = 0x00000505
891
+ VIRUS_SCAN_IN_PROGRESS = 0x0000050A
892
+ VIRUS_DETECTED = 0x0000050B
893
+ MAILBOX_IN_TRANSIT = 0x0000050C
894
+ BACKUP_IN_PROGRESS = 0x0000050D
895
+ VIRUS_MESSAGE_DELETED = 0x0000050E
896
+ INVALID_BACKUP_SEQUENCE = 0x0000050F
897
+ INVALID_BACKUP_TYPE = 0x00000510
898
+ TOO_MANY_BACKUPS = 0x00000511
899
+ RESTORE_IN_PROGRESS = 0x00000512
900
+ DUPLICATE_OBJECT = 0x00000579
901
+ OBJECT_NOT_FOUND = 0x0000057A
902
+ FIXUP_REPLY_RULE = 0x0000057B
903
+ TEMPLATE_NOT_FOUND = 0x0000057C
904
+ RULE_EXECUTION = 0x0000057D
905
+ DS_NO_SUCH_OBJECT = 0x0000057E
906
+ ALREADY_TOMBSTONED = 0x0000057F
907
+ READ_ONLY_TRANSACTION = 0x00000596
908
+ PAUSED = 0x0000060E
909
+ NOT_PAUSED = 0x0000060F
910
+ WRONG_MAILBOX = 0x00000648
911
+ CHANGE_PASSWORD = 0x0000064C
912
+ PASSWORD_EXPIRED = 0x0000064D
913
+ INVALID_WORKSTATION = 0x0000064E
914
+ INVALID_LOGON_HOURS = 0x0000064F
915
+ ACCOUNT_DISABLED = 0x00000650
916
+ RULE_VERSION = 0x000006A4
917
+ RULE_FORMAT = 0x000006A5
918
+ RULE_SEND_AS_DENIED = 0x000006A6
919
+ NO_SERVER_SUPPORT = 0x000006B9
920
+ LOCK_TIMED_OUT = 0x000006BA
921
+ OBJECT_LOCKED = 0x000006BB
922
+ INVALID_LOCK_NAMESPACE = 0x000006BD
923
+ MESSAGE_DELETED = 0x000007D6
924
+ PROTOCOL_DISABLED = 0x000007D8
925
+ CLEARTEXT_LOGON_DISABLED = 0x000007D9
926
+ REJECTED = 0x000007EE
927
+ AMBIGUOUS_ALIAS = 0x0000089A
928
+ UNKNOWN_MAILBOX = 0x0000089B
929
+ EXPRESSION_RESERVED = 0x000008FC
930
+ EXPRESSION_PARSE_DEPTH = 0x000008FD
931
+ EXPRESSION_ARGUMENT_TYPE = 0x000008FE
932
+ EXPRESSION_SYNTAX = 0x000008FF
933
+ EXPRESSION_BAD_STRING_TOKEN = 0x00000900
934
+ EXPRESSION_BAD_COL_TOKEN = 0x00000901
935
+ EXPRESSION_TYPE_MISMATCH = 0x00000902
936
+ EXPRESSION_OPERATOR_NOT_SUPPORTED = 0x00000903
937
+ EXPRESSION_DIVIDE_BY_ZERO = 0x00000904
938
+ EXPRESSION_UNARY_ARGUMENT = 0x00000905
939
+ NOT_LOCKED = 0x00000960
940
+ CLIENT_EVENT = 0x00000961
941
+ CORRUPT_EVENT = 0x00000965
942
+ CORRUPT_WATERMARK = 0x00000966
943
+ EVENT_ERROR = 0x00000967
944
+ WATERMARK_ERROR = 0x00000968
945
+ NON_CANONICAL_ACL = 0x00000969
946
+ MAILBOX_DISABLED = 0x0000096C
947
+ RULES_FOLDER_OVER_QUOTA = 0x0000096D
948
+ ADDRESS_BOOK_UNAVAILABLE = 0x0000096E
949
+ ADDRESS_BOOK_ERROR = 0x0000096F
950
+ ADDRESS_BOOK_OBJECT_NOT_FOUND = 0x00000971
951
+ ADDRESS_BOOK_PROPERTY_ERROR = 0x00000972
952
+ NOT_ENCRYPTED = 0x00000970
953
+ RPC_SERVER_TOO_BUSY = 0x00000973
954
+ RPC_OUT_OF_MEMORY = 0x00000974
955
+ RPC_SERVER_OUT_OF_MEMORY = 0x00000975
956
+ RPC_OUT_OF_RESOURCES = 0x00000976
957
+ RPC_SERVER_UNAVAILABLE = 0x00000977
958
+ SECURE_SUBMIT_ERROR = 0x0000097A
959
+ EVENTS_DELETED = 0x0000097C
960
+ SUBSYSTEM_STOPPING = 0x0000097D
961
+ ATTENDANT_UNAVAILABLE = 0x0000097E
962
+ CI_STOPPING = 0x00000A28
963
+ FX_INVALID_STATE = 0x00000A29
964
+ FX_UNEXPECTED_MARKER = 0x00000A2A
965
+ DUPLICATE_DELIVERY = 0x00000A2B
966
+ CONDITION_VIOLATION = 0x00000A2C
967
+ MAXIMUM_CONNECTION_POOLS_EXCEEDED = 0x00000A2D
968
+ INVALID_RPC_HANDLE = 0x00000A2E
969
+ EVENT_NOT_FOUND = 0x00000A2F
970
+ PROPERTY_NOT_PROMOTED = 0x00000A30
971
+ LOW_FREE_SPACE_FOR_DATABASE = 0x00000A31
972
+ LOW_FREE_SPACE_FOR_LOGS = 0x00000A32
973
+ MAILBOX_IS_QUARANTINED = 0x00000A33
974
+ DATABASE_MOUNT_IN_PROGRESS = 0x00000A34
975
+ DATABASE_DISMOUNT_IN_PROGRESS = 0x00000A35
976
+ CONNECTIONS_OVER_BUDGET = 0x00000A36
977
+ NOT_FOUND_IN_CONTAINER = 0x00000A37
978
+ CANNOT_REMOVE = 0x00000A38
979
+ INVALID_CONNECTION_POOL = 0x00000A39
980
+ VIRUS_SCAN_GENERAL_FAILURE = 0x00000A3A
981
+ ISAM_ERROR_RFS_FAILURE = 0xFFFFFF9C
982
+ ISAM_ERROR_RFS_NOT_ARMED = 0xFFFFFF9B
983
+ ISAM_ERROR_FILE_CLOSE = 0xFFFFFF9A
984
+ ISAM_ERROR_OUT_OF_THREADS = 0xFFFFFF99
985
+ ISAM_ERROR_TOO_MANY_IO = 0xFFFFFF97
986
+ ISAM_ERROR_TASK_DROPPED = 0xFFFFFF96
987
+ ISAM_ERROR_INTERNAL_ERROR = 0xFFFFFF95
988
+ ISAM_ERROR_DATABASE_BUFFER_DEPENDENCIES_CORRUPTED = 0xFFFFFF01
989
+ ISAM_ERROR_PREVIOUS_VERSION = 0xFFFFFEBE
990
+ ISAM_ERROR_PAGE_BOUNDARY = 0xFFFFFEBD
991
+ ISAM_ERROR_KEY_BOUNDARY = 0xFFFFFEBC
992
+ ISAM_ERROR_BAD_PAGE_LINK = 0xFFFFFEB9
993
+ ISAM_ERROR_BAD_BOOKMARK = 0xFFFFFEB8
994
+ ISAM_ERROR_NT_SYSTEM_CALL_FAILED = 0xFFFFFEB2
995
+ ISAM_ERROR_BAD_PARENT_PAGE_LINK = 0xFFFFFEAE
996
+ ISAM_ERROR_SP_AVAIL_EXT_CACHE_OUT_OF_SYNC = 0xFFFFFEAC
997
+ ISAM_ERROR_SP_AVAIL_EXT_CORRUPTED = 0xFFFFFEAB
998
+ ISAM_ERROR_SP_AVAIL_EXT_CACHE_OUT_OF_MEMORY = 0xFFFFFEAA
999
+ ISAM_ERROR_SP_OWN_EXT_CORRUPTED = 0xFFFFFEA9
1000
+ ISAM_ERROR_DB_TIME_CORRUPTED = 0xFFFFFEA8
1001
+ ISAM_ERROR_KEY_TRUNCATED = 0xFFFFFEA6
1002
+ ISAM_ERROR_KEY_TOO_BIG = 0xFFFFFE68
1003
+ ISAM_ERROR_INVALID_LOGGED_OPERATION = 0xFFFFFE0C
1004
+ ISAM_ERROR_LOG_FILE_CORRUPT = 0xFFFFFE0B
1005
+ ISAM_ERROR_NO_BACKUP_DIRECTORY = 0xFFFFFE09
1006
+ ISAM_ERROR_BACKUP_DIRECTORY_NOT_EMPTY = 0xFFFFFE08
1007
+ ISAM_ERROR_BACKUP_IN_PROGRESS = 0xFFFFFE07
1008
+ ISAM_ERROR_RESTORE_IN_PROGRESS = 0xFFFFFE06
1009
+ ISAM_ERROR_MISSING_PREVIOUS_LOG_FILE = 0xFFFFFE03
1010
+ ISAM_ERROR_LOG_WRITE_FAIL = 0xFFFFFE02
1011
+ ISAM_ERROR_LOG_DISABLED_DUE_TO_RECOVERY_FAILURE = 0xFFFFFE01
1012
+ ISAM_ERROR_CANNOT_LOG_DURING_RECOVERY_REDO = 0xFFFFFE00
1013
+ ISAM_ERROR_LOG_GENERATION_MISMATCH = 0xFFFFFDFF
1014
+ ISAM_ERROR_BAD_LOG_VERSION = 0xFFFFFDFE
1015
+ ISAM_ERROR_INVALID_LOG_SEQUENCE = 0xFFFFFDFD
1016
+ ISAM_ERROR_LOGGING_DISABLED = 0xFFFFFDFC
1017
+ ISAM_ERROR_LOG_BUFFER_TOO_SMALL = 0xFFFFFDFB
1018
+ ISAM_ERROR_LOG_SEQUENCE_END = 0xFFFFFDF9
1019
+ ISAM_ERROR_NO_BACKUP = 0xFFFFFDF8
1020
+ ISAM_ERROR_INVALID_BACKUP_SEQUENCE = 0xFFFFFDF7
1021
+ ISAM_ERROR_BACKUP_NOT_ALLOWED_YET = 0xFFFFFDF5
1022
+ ISAM_ERROR_DELETE_BACKUP_FILE_FAIL = 0xFFFFFDF4
1023
+ ISAM_ERROR_MAKE_BACKUP_DIRECTORY_FAIL = 0xFFFFFDF3
1024
+ ISAM_ERROR_INVALID_BACKUP = 0xFFFFFDF2
1025
+ ISAM_ERROR_RECOVERED_WITH_ERRORS = 0xFFFFFDF1
1026
+ ISAM_ERROR_MISSING_LOG_FILE = 0xFFFFFDF0
1027
+ ISAM_ERROR_LOG_DISK_FULL = 0xFFFFFDEF
1028
+ ISAM_ERROR_BAD_LOG_SIGNATURE = 0xFFFFFDEE
1029
+ ISAM_ERROR_BAD_DB_SIGNATURE = 0xFFFFFDED
1030
+ ISAM_ERROR_BAD_CHECKPOINT_SIGNATURE = 0xFFFFFDEC
1031
+ ISAM_ERROR_CHECKPOINT_CORRUPT = 0xFFFFFDEB
1032
+ ISAM_ERROR_MISSING_PATCH_PAGE = 0xFFFFFDEA
1033
+ ISAM_ERROR_BAD_PATCH_PAGE = 0xFFFFFDE9
1034
+ ISAM_ERROR_REDO_ABRUPT_ENDED = 0xFFFFFDE8
1035
+ ISAM_ERROR_BAD_SLV_SIGNATURE = 0xFFFFFDE7
1036
+ ISAM_ERROR_PATCH_FILE_MISSING = 0xFFFFFDE6
1037
+ ISAM_ERROR_DATABASE_LOG_SET_MISMATCH = 0xFFFFFDE5
1038
+ ISAM_ERROR_DATABASE_STREAMING_FILE_MISMATCH = 0xFFFFFDE4
1039
+ ISAM_ERROR_LOG_FILE_SIZE_MISMATCH = 0xFFFFFDE3
1040
+ ISAM_ERROR_CHECKPOINT_FILE_NOT_FOUND = 0xFFFFFDE2
1041
+ ISAM_ERROR_REQUIRED_LOG_FILES_MISSING = 0xFFFFFDE1
1042
+ ISAM_ERROR_SOFT_RECOVERY_ON_BACKUP_DATABASE = 0xFFFFFDE0
1043
+ ISAM_ERROR_LOG_FILE_SIZE_MISMATCH_DATABASES_CONSISTENT = 0xFFFFFDDF
1044
+ ISAM_ERROR_LOG_SECTOR_SIZE_MISMATCH = 0xFFFFFDDE
1045
+ ISAM_ERROR_LOG_SECTOR_SIZE_MISMATCH_DATABASES_CONSISTENT = 0xFFFFFDDD
1046
+ ISAM_ERROR_LOG_SEQUENCE_END_DATABASES_CONSISTENT = 0xFFFFFDDC
1047
+ ISAM_ERROR_STREAMING_DATA_NOT_LOGGED = 0xFFFFFDDB
1048
+ ISAM_ERROR_DATABASE_DIRTY_SHUTDOWN = 0xFFFFFDDA
1049
+ ISAM_ERROR_CONSISTENT_TIME_MISMATCH = 0xFFFFFDD9
1050
+ ISAM_ERROR_DATABASE_PATCH_FILE_MISMATCH = 0xFFFFFDD8
1051
+ ISAM_ERROR_ENDING_RESTORE_LOG_TOO_LOW = 0xFFFFFDD7
1052
+ ISAM_ERROR_STARTING_RESTORE_LOG_TOO_HIGH = 0xFFFFFDD6
1053
+ ISAM_ERROR_GIVEN_LOG_FILE_HAS_BAD_SIGNATURE = 0xFFFFFDD5
1054
+ ISAM_ERROR_GIVEN_LOG_FILE_IS_NOT_CONTIGUOUS = 0xFFFFFDD4
1055
+ ISAM_ERROR_MISSING_RESTORE_LOG_FILES = 0xFFFFFDD3
1056
+ ISAM_ERROR_MISSING_FULL_BACKUP = 0xFFFFFDD0
1057
+ ISAM_ERROR_BAD_BACKUP_DATABASE_SIZE = 0xFFFFFDCF
1058
+ ISAM_ERROR_DATABASE_ALREADY_UPGRADED = 0xFFFFFDCE
1059
+ ISAM_ERROR_DATABASE_INCOMPLETE_UPGRADE = 0xFFFFFDCD
1060
+ ISAM_ERROR_MISSING_CURRENT_LOG_FILES = 0xFFFFFDCB
1061
+ ISAM_ERROR_DB_TIME_TOO_OLD = 0xFFFFFDCA
1062
+ ISAM_ERROR_DB_TIME_TOO_NEW = 0xFFFFFDC9
1063
+ ISAM_ERROR_MISSING_FILE_TO_BACKUP = 0xFFFFFDC7
1064
+ ISAM_ERROR_LOG_TORN_WRITE_DURING_HARD_RESTORE = 0xFFFFFDC6
1065
+ ISAM_ERROR_LOG_TORN_WRITE_DURING_HARD_RECOVERY = 0xFFFFFDC5
1066
+ ISAM_ERROR_LOG_CORRUPT_DURING_HARD_RESTORE = 0xFFFFFDC3
1067
+ ISAM_ERROR_LOG_CORRUPT_DURING_HARD_RECOVERY = 0xFFFFFDC2
1068
+ ISAM_ERROR_MUST_DISABLE_LOGGING_FOR_DB_UPGRADE = 0xFFFFFDC1
1069
+ ISAM_ERROR_BAD_RESTORE_TARGET_INSTANCE = 0xFFFFFDBF
1070
+ ISAM_ERROR_RECOVERED_WITHOUT_UNDO = 0xFFFFFDBD
1071
+ ISAM_ERROR_DATABASES_NOT_FROM_SAME_SNAPSHOT = 0xFFFFFDBC
1072
+ ISAM_ERROR_SOFT_RECOVERY_ON_SNAPSHOT = 0xFFFFFDBB
1073
+ ISAM_ERROR_COMMITTED_LOG_FILES_MISSING = 0xFFFFFDBA
1074
+ ISAM_ERROR_COMMITTED_LOG_FILES_CORRUPT = 0xFFFFFDB6
1075
+ ISAM_ERROR_UNICODE_TRANSLATION_BUFFER_TOO_SMALL = 0xFFFFFDA7
1076
+ ISAM_ERROR_UNICODE_TRANSLATION_FAIL = 0xFFFFFDA6
1077
+ ISAM_ERROR_UNICODE_NORMALIZATION_NOT_SUPPORTED = 0xFFFFFDA5
1078
+ ISAM_ERROR_EXISTING_LOG_FILE_HAS_BAD_SIGNATURE = 0xFFFFFD9E
1079
+ ISAM_ERROR_EXISTING_LOG_FILE_IS_NOT_CONTIGUOUS = 0xFFFFFD9D
1080
+ ISAM_ERROR_LOG_READ_VERIFY_FAILURE = 0xFFFFFD9C
1081
+ ISAM_ERROR_SLV_READ_VERIFY_FAILURE = 0xFFFFFD9B
1082
+ ISAM_ERROR_CHECKPOINT_DEPTH_TOO_DEEP = 0xFFFFFD9A
1083
+ ISAM_ERROR_RESTORE_OF_NON_BACKUP_DATABASE = 0xFFFFFD99
1084
+ ISAM_ERROR_INVALID_GRBIT = 0xFFFFFC7C
1085
+ ISAM_ERROR_TERM_IN_PROGRESS = 0xFFFFFC18
1086
+ ISAM_ERROR_FEATURE_NOT_AVAILABLE = 0xFFFFFC17
1087
+ ISAM_ERROR_INVALID_NAME = 0xFFFFFC16
1088
+ ISAM_ERROR_INVALID_PARAMETER = 0xFFFFFC15
1089
+ ISAM_ERROR_DATABASE_FILE_READ_ONLY = 0xFFFFFC10
1090
+ ISAM_ERROR_INVALID_DATABASE_ID = 0xFFFFFC0E
1091
+ ISAM_ERROR_OUT_OF_MEMORY = 0xFFFFFC0D
1092
+ ISAM_ERROR_OUT_OF_DATABASE_SPACE = 0xFFFFFC0C
1093
+ ISAM_ERROR_OUT_OF_CURSORS = 0xFFFFFC0B
1094
+ ISAM_ERROR_OUT_OF_BUFFERS = 0xFFFFFC0A
1095
+ ISAM_ERROR_TOO_MANY_INDEXES = 0xFFFFFC09
1096
+ ISAM_ERROR_TOO_MANY_KEYS = 0xFFFFFC08
1097
+ ISAM_ERROR_RECORD_DELETED = 0xFFFFFC07
1098
+ ISAM_ERROR_READ_VERIFY_FAILURE = 0xFFFFFC06
1099
+ ISAM_ERROR_PAGE_NOT_INITIALIZED = 0xFFFFFC05
1100
+ ISAM_ERROR_OUT_OF_FILE_HANDLES = 0xFFFFFC04
1101
+ ISAM_ERROR_DISK_IO = 0xFFFFFC02
1102
+ ISAM_ERROR_INVALID_PATH = 0xFFFFFC01
1103
+ ISAM_ERROR_INVALID_SYSTEM_PATH = 0xFFFFFC00
1104
+ ISAM_ERROR_INVALID_LOG_DIRECTORY = 0xFFFFFBFF
1105
+ ISAM_ERROR_RECORD_TOO_BIG = 0xFFFFFBFE
1106
+ ISAM_ERROR_TOO_MANY_OPEN_DATABASES = 0xFFFFFBFD
1107
+ ISAM_ERROR_INVALID_DATABASE = 0xFFFFFBFC
1108
+ ISAM_ERROR_NOT_INITIALIZED = 0xFFFFFBFB
1109
+ ISAM_ERROR_ALREADY_INITIALIZED = 0xFFFFFBFA
1110
+ ISAM_ERROR_INIT_IN_PROGRESS = 0xFFFFFBF9
1111
+ ISAM_ERROR_FILE_ACCESS_DENIED = 0xFFFFFBF8
1112
+ ISAM_ERROR_BUFFER_TOO_SMALL = 0xFFFFFBF2
1113
+ ISAM_ERROR_TOO_MANY_COLUMNS = 0xFFFFFBF0
1114
+ ISAM_ERROR_CONTAINER_NOT_EMPTY = 0xFFFFFBED
1115
+ ISAM_ERROR_INVALID_FILENAME = 0xFFFFFBEC
1116
+ ISAM_ERROR_INVALID_BOOKMARK = 0xFFFFFBEB
1117
+ ISAM_ERROR_COLUMN_IN_USE = 0xFFFFFBEA
1118
+ ISAM_ERROR_INVALID_BUFFER_SIZE = 0xFFFFFBE9
1119
+ ISAM_ERROR_COLUMN_NOT_UPDATABLE = 0xFFFFFBE8
1120
+ ISAM_ERROR_INDEX_IN_USE = 0xFFFFFBE5
1121
+ ISAM_ERROR_LINK_NOT_SUPPORTED = 0xFFFFFBE4
1122
+ ISAM_ERROR_NULL_KEY_DISALLOWED = 0xFFFFFBE3
1123
+ ISAM_ERROR_NOT_IN_TRANSACTION = 0xFFFFFBE2
1124
+ ISAM_ERROR_TOO_MANY_ACTIVE_USERS = 0xFFFFFBDD
1125
+ ISAM_ERROR_INVALID_COUNTRY = 0xFFFFFBDB
1126
+ ISAM_ERROR_INVALID_LANGUAGE_ID = 0xFFFFFBDA
1127
+ ISAM_ERROR_INVALID_CODE_PAGE = 0xFFFFFBD9
1128
+ ISAM_ERROR_INVALID_LC_MAP_STRING_FLAGS = 0xFFFFFBD8
1129
+ ISAM_ERROR_VERSION_STORE_ENTRY_TOO_BIG = 0xFFFFFBD7
1130
+ ISAM_ERROR_VERSION_STORE_OUT_OF_MEMORY_AND_CLEANUP_TIMED_OUT = 0xFFFFFBD6
1131
+ ISAM_ERROR_VERSION_STORE_OUT_OF_MEMORY = 0xFFFFFBD3
1132
+ ISAM_ERROR_CANNOT_INDEX = 0xFFFFFBD1
1133
+ ISAM_ERROR_RECORD_NOT_DELETED = 0xFFFFFBD0
1134
+ ISAM_ERROR_TOO_MANY_MEMPOOL_ENTRIES = 0xFFFFFBCF
1135
+ ISAM_ERROR_OUT_OF_OBJECT_I_DS = 0xFFFFFBCE
1136
+ ISAM_ERROR_OUT_OF_LONG_VALUE_I_DS = 0xFFFFFBCD
1137
+ ISAM_ERROR_OUT_OF_AUTOINCREMENT_VALUES = 0xFFFFFBCC
1138
+ ISAM_ERROR_OUT_OF_DBTIME_VALUES = 0xFFFFFBCB
1139
+ ISAM_ERROR_OUT_OF_SEQUENTIAL_INDEX_VALUES = 0xFFFFFBCA
1140
+ ISAM_ERROR_RUNNING_IN_ONE_INSTANCE_MODE = 0xFFFFFBC8
1141
+ ISAM_ERROR_RUNNING_IN_MULTI_INSTANCE_MODE = 0xFFFFFBC7
1142
+ ISAM_ERROR_SYSTEM_PARAMS_ALREADY_SET = 0xFFFFFBC6
1143
+ ISAM_ERROR_SYSTEM_PATH_IN_USE = 0xFFFFFBC5
1144
+ ISAM_ERROR_LOG_FILE_PATH_IN_USE = 0xFFFFFBC4
1145
+ ISAM_ERROR_TEMP_PATH_IN_USE = 0xFFFFFBC3
1146
+ ISAM_ERROR_INSTANCE_NAME_IN_USE = 0xFFFFFBC2
1147
+ ISAM_ERROR_INSTANCE_UNAVAILABLE = 0xFFFFFBBE
1148
+ ISAM_ERROR_DATABASE_UNAVAILABLE = 0xFFFFFBBD
1149
+ ISAM_ERROR_INSTANCE_UNAVAILABLE_DUE_TO_FATAL_LOG_DISK_FULL = 0xFFFFFBBC
1150
+ ISAM_ERROR_OUT_OF_SESSIONS = 0xFFFFFBB3
1151
+ ISAM_ERROR_WRITE_CONFLICT = 0xFFFFFBB2
1152
+ ISAM_ERROR_TRANS_TOO_DEEP = 0xFFFFFBB1
1153
+ ISAM_ERROR_INVALID_SESID = 0xFFFFFBB0
1154
+ ISAM_ERROR_WRITE_CONFLICT_PRIMARY_INDEX = 0xFFFFFBAF
1155
+ ISAM_ERROR_IN_TRANSACTION = 0xFFFFFBAC
1156
+ ISAM_ERROR_ROLLBACK_REQUIRED = 0xFFFFFBAB
1157
+ ISAM_ERROR_TRANS_READ_ONLY = 0xFFFFFBAA
1158
+ ISAM_ERROR_SESSION_WRITE_CONFLICT = 0xFFFFFBA9
1159
+ ISAM_ERROR_RECORD_TOO_BIG_FOR_BACKWARD_COMPATIBILITY = 0xFFFFFBA8
1160
+ ISAM_ERROR_CANNOT_MATERIALIZE_FORWARD_ONLY_SORT = 0xFFFFFBA7
1161
+ ISAM_ERROR_SESID_TABLE_ID_MISMATCH = 0xFFFFFBA6
1162
+ ISAM_ERROR_INVALID_INSTANCE = 0xFFFFFBA5
1163
+ ISAM_ERROR_DATABASE_DUPLICATE = 0xFFFFFB4F
1164
+ ISAM_ERROR_DATABASE_IN_USE = 0xFFFFFB4E
1165
+ ISAM_ERROR_DATABASE_NOT_FOUND = 0xFFFFFB4D
1166
+ ISAM_ERROR_DATABASE_INVALID_NAME = 0xFFFFFB4C
1167
+ ISAM_ERROR_DATABASE_INVALID_PAGES = 0xFFFFFB4B
1168
+ ISAM_ERROR_DATABASE_CORRUPTED = 0xFFFFFB4A
1169
+ ISAM_ERROR_DATABASE_LOCKED = 0xFFFFFB49
1170
+ ISAM_ERROR_CANNOT_DISABLE_VERSIONING = 0xFFFFFB48
1171
+ ISAM_ERROR_INVALID_DATABASE_VERSION = 0xFFFFFB47
1172
+ ISAM_ERROR_DATABASE200_FORMAT = 0xFFFFFB46
1173
+ ISAM_ERROR_DATABASE400_FORMAT = 0xFFFFFB45
1174
+ ISAM_ERROR_DATABASE500_FORMAT = 0xFFFFFB44
1175
+ ISAM_ERROR_PAGE_SIZE_MISMATCH = 0xFFFFFB43
1176
+ ISAM_ERROR_TOO_MANY_INSTANCES = 0xFFFFFB42
1177
+ ISAM_ERROR_DATABASE_SHARING_VIOLATION = 0xFFFFFB41
1178
+ ISAM_ERROR_ATTACHED_DATABASE_MISMATCH = 0xFFFFFB40
1179
+ ISAM_ERROR_DATABASE_INVALID_PATH = 0xFFFFFB3F
1180
+ ISAM_ERROR_DATABASE_ID_IN_USE = 0xFFFFFB3E
1181
+ ISAM_ERROR_FORCE_DETACH_NOT_ALLOWED = 0xFFFFFB3D
1182
+ ISAM_ERROR_CATALOG_CORRUPTED = 0xFFFFFB3C
1183
+ ISAM_ERROR_PARTIALLY_ATTACHED_DB = 0xFFFFFB3B
1184
+ ISAM_ERROR_DATABASE_SIGN_IN_USE = 0xFFFFFB3A
1185
+ ISAM_ERROR_DATABASE_CORRUPTED_NO_REPAIR = 0xFFFFFB38
1186
+ ISAM_ERROR_INVALID_CREATE_DB_VERSION = 0xFFFFFB37
1187
+ ISAM_ERROR_TABLE_LOCKED = 0xFFFFFAEA
1188
+ ISAM_ERROR_TABLE_DUPLICATE = 0xFFFFFAE9
1189
+ ISAM_ERROR_TABLE_IN_USE = 0xFFFFFAE8
1190
+ ISAM_ERROR_OBJECT_NOT_FOUND = 0xFFFFFAE7
1191
+ ISAM_ERROR_DENSITY_INVALID = 0xFFFFFAE5
1192
+ ISAM_ERROR_TABLE_NOT_EMPTY = 0xFFFFFAE4
1193
+ ISAM_ERROR_INVALID_TABLE_ID = 0xFFFFFAE2
1194
+ ISAM_ERROR_TOO_MANY_OPEN_TABLES = 0xFFFFFAE1
1195
+ ISAM_ERROR_ILLEGAL_OPERATION = 0xFFFFFAE0
1196
+ ISAM_ERROR_TOO_MANY_OPEN_TABLES_AND_CLEANUP_TIMED_OUT = 0xFFFFFADF
1197
+ ISAM_ERROR_OBJECT_DUPLICATE = 0xFFFFFADE
1198
+ ISAM_ERROR_INVALID_OBJECT = 0xFFFFFADC
1199
+ ISAM_ERROR_CANNOT_DELETE_TEMP_TABLE = 0xFFFFFADB
1200
+ ISAM_ERROR_CANNOT_DELETE_SYSTEM_TABLE = 0xFFFFFADA
1201
+ ISAM_ERROR_CANNOT_DELETE_TEMPLATE_TABLE = 0xFFFFFAD9
1202
+ ISAM_ERROR_EXCLUSIVE_TABLE_LOCK_REQUIRED = 0xFFFFFAD6
1203
+ ISAM_ERROR_FIXED_DDL = 0xFFFFFAD5
1204
+ ISAM_ERROR_FIXED_INHERITED_DDL = 0xFFFFFAD4
1205
+ ISAM_ERROR_CANNOT_NEST_DDL = 0xFFFFFAD3
1206
+ ISAM_ERROR_DDL_NOT_INHERITABLE = 0xFFFFFAD2
1207
+ ISAM_ERROR_INVALID_SETTINGS = 0xFFFFFAD0
1208
+ ISAM_ERROR_CLIENT_REQUEST_TO_STOP_JET_SERVICE = 0xFFFFFACF
1209
+ ISAM_ERROR_CANNOT_ADD_FIXED_VAR_COLUMN_TO_DERIVED_TABLE = 0xFFFFFACE
1210
+ ISAM_ERROR_INDEX_CANT_BUILD = 0xFFFFFA87
1211
+ ISAM_ERROR_INDEX_HAS_PRIMARY = 0xFFFFFA86
1212
+ ISAM_ERROR_INDEX_DUPLICATE = 0xFFFFFA85
1213
+ ISAM_ERROR_INDEX_NOT_FOUND = 0xFFFFFA84
1214
+ ISAM_ERROR_INDEX_MUST_STAY = 0xFFFFFA83
1215
+ ISAM_ERROR_INDEX_INVALID_DEF = 0xFFFFFA82
1216
+ ISAM_ERROR_INVALID_CREATE_INDEX = 0xFFFFFA7F
1217
+ ISAM_ERROR_TOO_MANY_OPEN_INDEXES = 0xFFFFFA7E
1218
+ ISAM_ERROR_MULTI_VALUED_INDEX_VIOLATION = 0xFFFFFA7D
1219
+ ISAM_ERROR_INDEX_BUILD_CORRUPTED = 0xFFFFFA7C
1220
+ ISAM_ERROR_PRIMARY_INDEX_CORRUPTED = 0xFFFFFA7B
1221
+ ISAM_ERROR_SECONDARY_INDEX_CORRUPTED = 0xFFFFFA7A
1222
+ ISAM_ERROR_INVALID_INDEX_ID = 0xFFFFFA78
1223
+ ISAM_ERROR_INDEX_TUPLES_SECONDARY_INDEX_ONLY = 0xFFFFFA6A
1224
+ ISAM_ERROR_INDEX_TUPLES_TOO_MANY_COLUMNS = 0xFFFFFA69
1225
+ ISAM_ERROR_INDEX_TUPLES_NON_UNIQUE_ONLY = 0xFFFFFA68
1226
+ ISAM_ERROR_INDEX_TUPLES_TEXT_BINARY_COLUMNS_ONLY = 0xFFFFFA67
1227
+ ISAM_ERROR_INDEX_TUPLES_VAR_SEG_MAC_NOT_ALLOWED = 0xFFFFFA66
1228
+ ISAM_ERROR_INDEX_TUPLES_INVALID_LIMITS = 0xFFFFFA65
1229
+ ISAM_ERROR_INDEX_TUPLES_CANNOT_RETRIEVE_FROM_INDEX = 0xFFFFFA64
1230
+ ISAM_ERROR_INDEX_TUPLES_KEY_TOO_SMALL = 0xFFFFFA63
1231
+ ISAM_ERROR_COLUMN_LONG = 0xFFFFFA23
1232
+ ISAM_ERROR_COLUMN_NO_CHUNK = 0xFFFFFA22
1233
+ ISAM_ERROR_COLUMN_DOES_NOT_FIT = 0xFFFFFA21
1234
+ ISAM_ERROR_NULL_INVALID = 0xFFFFFA20
1235
+ ISAM_ERROR_COLUMN_INDEXED = 0xFFFFFA1F
1236
+ ISAM_ERROR_COLUMN_TOO_BIG = 0xFFFFFA1E
1237
+ ISAM_ERROR_COLUMN_NOT_FOUND = 0xFFFFFA1D
1238
+ ISAM_ERROR_COLUMN_DUPLICATE = 0xFFFFFA1C
1239
+ ISAM_ERROR_MULTI_VALUED_COLUMN_MUST_BE_TAGGED = 0xFFFFFA1B
1240
+ ISAM_ERROR_COLUMN_REDUNDANT = 0xFFFFFA1A
1241
+ ISAM_ERROR_INVALID_COLUMN_TYPE = 0xFFFFFA19
1242
+ ISAM_ERROR_TAGGED_NOT_NULL = 0xFFFFFA16
1243
+ ISAM_ERROR_NO_CURRENT_INDEX = 0xFFFFFA15
1244
+ ISAM_ERROR_KEY_IS_MADE = 0xFFFFFA14
1245
+ ISAM_ERROR_BAD_COLUMN_ID = 0xFFFFFA13
1246
+ ISAM_ERROR_BAD_ITAG_SEQUENCE = 0xFFFFFA12
1247
+ ISAM_ERROR_COLUMN_IN_RELATIONSHIP = 0xFFFFFA11
1248
+ ISAM_ERROR_CANNOT_BE_TAGGED = 0xFFFFFA0F
1249
+ ISAM_ERROR_DEFAULT_VALUE_TOO_BIG = 0xFFFFFA0C
1250
+ ISAM_ERROR_MULTI_VALUED_DUPLICATE = 0xFFFFFA0B
1251
+ ISAM_ERROR_LV_CORRUPTED = 0xFFFFFA0A
1252
+ ISAM_ERROR_MULTI_VALUED_DUPLICATE_AFTER_TRUNCATION = 0xFFFFFA08
1253
+ ISAM_ERROR_DERIVED_COLUMN_CORRUPTION = 0xFFFFFA07
1254
+ ISAM_ERROR_INVALID_PLACEHOLDER_COLUMN = 0xFFFFFA06
1255
+ ISAM_ERROR_RECORD_NOT_FOUND = 0xFFFFF9BF
1256
+ ISAM_ERROR_RECORD_NO_COPY = 0xFFFFF9BE
1257
+ ISAM_ERROR_NO_CURRENT_RECORD = 0xFFFFF9BD
1258
+ ISAM_ERROR_RECORD_PRIMARY_CHANGED = 0xFFFFF9BC
1259
+ ISAM_ERROR_KEY_DUPLICATE = 0xFFFFF9BB
1260
+ ISAM_ERROR_ALREADY_PREPARED = 0xFFFFF9B9
1261
+ ISAM_ERROR_KEY_NOT_MADE = 0xFFFFF9B8
1262
+ ISAM_ERROR_UPDATE_NOT_PREPARED = 0xFFFFF9B7
1263
+ ISAM_ERROR_DATA_HAS_CHANGED = 0xFFFFF9B5
1264
+ ISAM_ERROR_LANGUAGE_NOT_SUPPORTED = 0xFFFFF9AD
1265
+ ISAM_ERROR_TOO_MANY_SORTS = 0xFFFFF95B
1266
+ ISAM_ERROR_INVALID_ON_SORT = 0xFFFFF95A
1267
+ ISAM_ERROR_TEMP_FILE_OPEN_ERROR = 0xFFFFF8F5
1268
+ ISAM_ERROR_TOO_MANY_ATTACHED_DATABASES = 0xFFFFF8F3
1269
+ ISAM_ERROR_DISK_FULL = 0xFFFFF8F0
1270
+ ISAM_ERROR_PERMISSION_DENIED = 0xFFFFF8EF
1271
+ ISAM_ERROR_FILE_NOT_FOUND = 0xFFFFF8ED
1272
+ ISAM_ERROR_FILE_INVALID_TYPE = 0xFFFFF8EC
1273
+ ISAM_ERROR_AFTER_INITIALIZATION = 0xFFFFF8C6
1274
+ ISAM_ERROR_LOG_CORRUPTED = 0xFFFFF8C4
1275
+ ISAM_ERROR_INVALID_OPERATION = 0xFFFFF88E
1276
+ ISAM_ERROR_ACCESS_DENIED = 0xFFFFF88D
1277
+ ISAM_ERROR_TOO_MANY_SPLITS = 0xFFFFF88B
1278
+ ISAM_ERROR_SESSION_SHARING_VIOLATION = 0xFFFFF88A
1279
+ ISAM_ERROR_ENTRY_POINT_NOT_FOUND = 0xFFFFF889
1280
+ ISAM_ERROR_SESSION_CONTEXT_ALREADY_SET = 0xFFFFF888
1281
+ ISAM_ERROR_SESSION_CONTEXT_NOT_SET_BY_THIS_THREAD = 0xFFFFF887
1282
+ ISAM_ERROR_SESSION_IN_USE = 0xFFFFF886
1283
+ ISAM_ERROR_RECORD_FORMAT_CONVERSION_FAILED = 0xFFFFF885
1284
+ ISAM_ERROR_ONE_DATABASE_PER_SESSION = 0xFFFFF884
1285
+ ISAM_ERROR_ROLLBACK_ERROR = 0xFFFFF883
1286
+ ISAM_ERROR_CALLBACK_FAILED = 0xFFFFF7CB
1287
+ ISAM_ERROR_CALLBACK_NOT_RESOLVED = 0xFFFFF7CA
1288
+ ISAM_ERROR_OS_SNAPSHOT_INVALID_SEQUENCE = 0xFFFFF69F
1289
+ ISAM_ERROR_OS_SNAPSHOT_TIME_OUT = 0xFFFFF69E
1290
+ ISAM_ERROR_OS_SNAPSHOT_NOT_ALLOWED = 0xFFFFF69D
1291
+ ISAM_ERROR_OS_SNAPSHOT_INVALID_SNAP_ID = 0xFFFFF69C
1292
+ ISAM_ERROR_LS_CALLBACK_NOT_SPECIFIED = 0xFFFFF448
1293
+ ISAM_ERROR_LS_ALREADY_SET = 0xFFFFF447
1294
+ ISAM_ERROR_LS_NOT_SET = 0xFFFFF446
1295
+ ISAM_ERROR_FILE_IO_SPARSE = 0xFFFFF060
1296
+ ISAM_ERROR_FILE_IO_BEYOND_EOF = 0xFFFFF05F
1297
+ ISAM_ERROR_FILE_COMPRESSED = 0xFFFFF05B
1298
+
1299
+
1300
+
1301
+ class Gender(enum.IntEnum):
1302
+ # Seems rather binary, which is less than ideal. We are directly using the
1303
+ # terms used by the documentation.
1304
+ UNSPECIFIED = 0x0000
1305
+ FEMALE = 0x0001
1306
+ MALE = 0x0002
1307
+
1308
+
1309
+
1310
+ class IconIndex(enum.IntEnum):
1311
+ @classmethod
1312
+ def tryMake(cls, value: int) -> Union[IconIndex, int]:
1313
+ """
1314
+ Try to make an instance, returning the value on failure.
1315
+ """
1316
+ try:
1317
+ return cls(value)
1318
+ except ValueError:
1319
+ return value
1320
+
1321
+ UNSPECIFIED = 0xFFFFFFFF
1322
+ SINGLE_INSTANCE_APPOINTMENT = 0x00000400
1323
+ RECURRING_APPOINTMENT = 0x00000401
1324
+ SINGLE_INSTANCE_MEETING = 0x00000402
1325
+ RECURRING_MEETING = 0x00000403
1326
+ MEETING_REQUEST_UPDATE = 0x00000404
1327
+ ACCEPT_MEETING_REQUEST = 0x00000405
1328
+ DECLINE_MEETING_REQUEST = 0x00000406
1329
+ TENTATIVELY_ACCEPT_MEETING_REQUEST = 0x00000407
1330
+ MEETING_CANCELLATION = 0x00000408
1331
+ MEETING_UPDATE_INFORMATIONAL = 0x00000409
1332
+ FORWARD_NOTIFICATION = 0x0000040B
1333
+
1334
+
1335
+
1336
+ class Importance(enum.IntEnum):
1337
+ LOW = 0
1338
+ MEDIUM = 1
1339
+ HIGH = 2
1340
+
1341
+
1342
+
1343
+ class InsecureFeatures(enum.IntFlag):
1344
+ """
1345
+ Insecure options that can be enabled for an MSG file.
1346
+
1347
+ Using ALL is not recommended unless you check this list before updating to
1348
+ a new version of the module, as new features may have been added. It is
1349
+ also not recommended to use these on files you do not trust.
1350
+
1351
+ The following features are avilable:
1352
+
1353
+ * NONE: No insecure features are allowed (default).
1354
+ * PIL_IMAGE_PARSING: Various operations requiring PIL or Pillow that will
1355
+ read image data from parts of the MSG file. These operations are usually
1356
+ constructing new images or are converting from one format to another.
1357
+ This may expose you to security issues from those libraries.
1358
+ * ALL: All of the previously listed features will be enabled for the MSG
1359
+ file.
1360
+ """
1361
+ NONE = 0b0000
1362
+ PIL_IMAGE_PARSING = 0b0001
1363
+ ALL = 0b1111
1364
+
1365
+
1366
+
1367
+ class LogFlags(enum.IntFlag):
1368
+ NO_JOURNAL_ASSOCIATED_ATT = 0x00000000
1369
+ HAS_JOUNRAL_ASSOCIATED_ATT = 0x40000000
1370
+
1371
+
1372
+
1373
+ class MacintoshEncoding(enum.IntEnum):
1374
+ """
1375
+ The encoding to use for Macintosh-specific data attachments.
1376
+ """
1377
+ BIN_HEX = 0
1378
+ UUENCODE = 1
1379
+ APPLE_SINGLE = 2
1380
+ APPLE_DOUBLE = 3
1381
+
1382
+
1383
+
1384
+ class MeetingObjectChange(enum.IntFlag):
1385
+ """
1386
+ Indicates a property that has changed on a meeting object.
1387
+
1388
+ * START: The start has changed.
1389
+ * END: The end has changed.
1390
+ * RECUR: The recurrence pattern has changed.
1391
+ * LOCATION: The location has changed.
1392
+ * SUBJECT: The subject has changed.
1393
+ * REQUIRED_ATTENDEE: One or more required attendees were added.
1394
+ * OPTIONAL_ATTENDEE: One or more optional attendees were added.
1395
+ * BODY: The body was modified.
1396
+ * RESPONSE: The responseRequested or replyRequested property has changed.
1397
+ * ALLOW_PROPOSE: The appointmentNotAllowPropose property has changed.
1398
+ """
1399
+ START = 0b1
1400
+ END = 0b10
1401
+ RECUR = 0b100
1402
+ LOCATION = 0b1000
1403
+ SUBJECT = 0b10000
1404
+ REQUIRED_ATTENDEE = 0b100000
1405
+ OPTIONAL_ATTENDEE = 0b1000000
1406
+ BODY = 0b10000000
1407
+ RESPONSE = 0b1000000000
1408
+ ALLOW_PROPOSE = 0b10000000000
1409
+ DEPRECATED = 0b100000000000
1410
+
1411
+
1412
+
1413
+ class MeetingRecipientType(enum.IntEnum):
1414
+ ORGANIZER = 0x01
1415
+ SENDABLE_REQUIRED_ATTENDEE = 0x01
1416
+ SENDABLE_OPTIONAL_ATTENDEE = 0x02
1417
+ SENDABLE_RESOURCE_OBJECT = 0x03
1418
+
1419
+
1420
+
1421
+ class MeetingType(enum.IntEnum):
1422
+ """
1423
+ The type of Meeting Request object of Meeting Update object.
1424
+
1425
+ * EMPTY: Unspecified.
1426
+ * REQUEST: The meeting request is the initial request.
1427
+ * FULL: Attendees were added, the meeting was cancelled and the organizer is
1428
+ uncancelling it, and or the start, end, or recurrance property was
1429
+ changed.
1430
+ * INFO: An informational update was made to the meeting and it is not one of
1431
+ the conditions for FULL.
1432
+ * OUT_OF_DATE: A newer Meeting Request object or MeetingUpdate object was
1433
+ received after this one.
1434
+ * DELEGATOR_COPY: Set on the delegator's copy when a delegate will handle
1435
+ meeting-related objects.
1436
+ """
1437
+ EMPTY = 0x00000000
1438
+ REQUEST = 0x00000001
1439
+ FULL = 0x00010000
1440
+ INFO = 0x00020000
1441
+ OUT_OF_DATE = 0x00080000
1442
+ DELEGATOR_COPY = 0x00100000
1443
+
1444
+
1445
+
1446
+ class MessageFormat(enum.IntEnum):
1447
+ TNEF = 0
1448
+ MIME = 1
1449
+
1450
+
1451
+
1452
+ class MessageType(enum.IntEnum):
1453
+ PRIVATE_FOLDER = 0x0001
1454
+ PUBLIC_FOLDER = 0x0003
1455
+ MAPPED_PUBLIC_FOLDER = 0x0005
1456
+ PRIVATE_MESSAGE = 0x0007
1457
+ PUBLIC_MESSAGE = 0x0009
1458
+ MAPPED_PUBLIC_MESSAGE = 0x000B
1459
+ PUBLIC_NEWSGROUP_FOLDER = 0x000C
1460
+
1461
+
1462
+
1463
+ class NamedPropertyType(enum.IntEnum):
1464
+ NUMERICAL_NAMED = 0
1465
+ STRING_NAMED = 1
1466
+
1467
+
1468
+
1469
+ class NoteColor(enum.IntEnum):
1470
+ BLUE = 0
1471
+ GREEN = 1
1472
+ PINK = 2
1473
+ YELLOW = 3
1474
+ WHITE = 4
1475
+
1476
+
1477
+
1478
+ class ODTCf(enum.IntEnum):
1479
+ """
1480
+ Values for the ``cf`` field of the ODT structure.
1481
+ """
1482
+ UNSPECIFIED = 0x0000
1483
+ RICH_TEXT_FORMAT = 0x0001
1484
+ TEXT_FORMAT = 0x0002
1485
+ METAFILE = 0x0003
1486
+ BITMAP = 0x0004
1487
+ DEVICE_INDEPENDENT_BITMAP = 0x0005
1488
+ HTML_FORMAT = 0x000A
1489
+ UNICODE_TEXT_FORMAT = 0x0014
1490
+
1491
+
1492
+
1493
+ class ODTPersist1(enum.IntFlag):
1494
+ """
1495
+ Flag values for ODTPersist1, in the order they would appear when unpacking a
1496
+ little endian unsigned short.
1497
+ """
1498
+ NONE = 0b0000000000000000
1499
+ RESERVED_1 = 0b0000000000000001
1500
+ F_DEF_HANDLER = 0b0000000000000010
1501
+ RESERVED_2 = 0b0000000000000100
1502
+ RESERVED_3 = 0b0000000000001000
1503
+ F_LINK = 0b0000000000010000
1504
+ RESERVED_4 = 0b0000000000100000
1505
+ F_ICON = 0b0000000001000000
1506
+ F_IS_OLE1 = 0b0000000010000000
1507
+ F_MANUAL = 0b0000000100000000
1508
+ F_RECOMPOSE_ON_RESIZE = 0b0000001000000000
1509
+ RESERVED_5 = 0b0000010000000000
1510
+ RESERVED_6 = 0b0000100000000000
1511
+ F_OCX = 0b0001000000000000
1512
+ F_STREAM = 0b0010000000000000
1513
+ RESERVED_7 = 0b0100000000000000
1514
+ F_VIEW_OBJECT = 0b1000000000000000
1515
+
1516
+
1517
+
1518
+ class ODTPersist2(enum.IntFlag):
1519
+ """
1520
+ Flag values for ODTPersist2, in the order they would appear when unpacking a
1521
+ little endian unsigned short.
1522
+ """
1523
+ NONE = 0b0000000000000000
1524
+ F_EMF = 0b0000000000000001
1525
+ RESERVED_1 = 0b0000000000000010
1526
+ F_QUERIED_EMF = 0b0000000000000100
1527
+ F_STORED_AS_EMF = 0b0000000000001000
1528
+ RESERVED_2 = 0b0000000000010000
1529
+ RESERVED_3 = 0b0000000000100000
1530
+ RESERVED_4 = 0b0000000001000000
1531
+ RESERVED_5 = 0b0000000010000000
1532
+ RESERVED_6 = 0b0000000100000000
1533
+ RESERVED_7 = 0b0000001000000000
1534
+ RESERVED_8 = 0b0000010000000000
1535
+ RESERVED_9 = 0b0000100000000000
1536
+ RESERVED_10 = 0b0001000000000000
1537
+ RESERVED_11 = 0b0010000000000000
1538
+ RESERVED_12 = 0b0100000000000000
1539
+ RESERVED_13 = 0b1000000000000000
1540
+
1541
+
1542
+
1543
+ class OORBodyFormat(enum.IntEnum):
1544
+ """
1545
+ The body format for One Off Recipients.
1546
+ """
1547
+ TEXT_ONLY = 0b0011
1548
+ HTML_ONLY = 0b0111
1549
+ TEXT_AND_HTML = 0b1011
1550
+ # This one isn't actually listed in the documentation, but I've seen it and
1551
+ # this is my best guess for what a format of 0 is meant to mean. This will
1552
+ # also prevent the code from failing on a 0 format.
1553
+ UNSPECIFIED = 0b0000
1554
+
1555
+
1556
+
1557
+ class PostalAddressID(enum.IntEnum):
1558
+ UNSPECIFIED = 0x00000000
1559
+ HOME = 0x00000001
1560
+ WORK = 0x00000002
1561
+ OTHER = 0x00000003
1562
+
1563
+
1564
+
1565
+ class Priority(enum.IntEnum):
1566
+ URGENT = 0x00000001
1567
+ NORMAL = 0x00000000
1568
+ NOT_URGENT = 0xFFFFFFFF
1569
+
1570
+
1571
+
1572
+ class PropertiesType(enum.IntEnum):
1573
+ """
1574
+ The type of the properties instance.
1575
+ """
1576
+ MESSAGE = 0
1577
+ MESSAGE_EMBED = 1
1578
+ ATTACHMENT = 2
1579
+ RECIPIENT = 3
1580
+
1581
+
1582
+
1583
+ class PropertyFlags(enum.IntFlag):
1584
+ MANDATORY = 0b001
1585
+ READABLE = 0b010
1586
+ WRITABLE = 0b100
1587
+
1588
+
1589
+
1590
+ class RecipientRowFlagType(enum.IntEnum):
1591
+ NOTYPE = 0x0
1592
+ X500DN = 0x1
1593
+ MSMAIL = 0x2
1594
+ SMTP = 0x3
1595
+ FAX = 0x4
1596
+ PROFESSIONALOFFICESYSTEM = 0x5
1597
+ PERSONALDESTRIBUTIONLIST1 = 0x6
1598
+ PERSONALDESTRIBUTIONLIST2 = 0x7
1599
+
1600
+
1601
+
1602
+ class RecipientType(enum.IntEnum):
1603
+ """
1604
+ The type of recipient.
1605
+ """
1606
+ SENDER = 0
1607
+ TO = 1
1608
+ CC = 2
1609
+ BCC = 3
1610
+
1611
+
1612
+
1613
+ class RecurCalendarType(enum.IntEnum):
1614
+ DEFAULT = 0x0000
1615
+ CAL_GREGORIAN = 0x0001
1616
+ CAL_GREGORIAN_US = 0x0002
1617
+ CAL_JAPAN = 0x0003
1618
+ CAL_TAIWAN = 0x0004
1619
+ CAL_KOREA = 0x0005
1620
+ CAL_HIJRI = 0x0006
1621
+ CAL_THAI = 0x0007
1622
+ CAL_HEBREW = 0x0008
1623
+ CAL_GREGORIAN_ME_FRENCH = 0x0009
1624
+ CAL_GREGORIAN_ARABIC = 0x000A
1625
+ CAL_GREGORIAN_XLIT_ENGLISH = 0x000B
1626
+ CAL_GREGORIAN_XLIT_FRENCH = 0x000C
1627
+ CAL_LUNAR_JAPANESE = 0x000E
1628
+ CAL_CHINESE_LUNAR = 0x000F
1629
+ CAL_SAKA = 0x0010
1630
+ CAL_LUNAR_ETO_CHN = 0x0011
1631
+ CAL_LUNAR_ETO_KOR = 0x0012
1632
+ CAL_LUNAR_ROKUYOU = 0x0013
1633
+ CAL_LUNAR_KOREAN = 0x0014
1634
+ CAL_UMALQURA = 0x0017
1635
+
1636
+
1637
+
1638
+ class RecurDOW(enum.IntEnum):
1639
+ SUNDAY = 0x00000000
1640
+ MONDAY = 0x00000001
1641
+ TUESDAY = 0x00000002
1642
+ WEDNESDAY = 0x00000003
1643
+ THURSDAY = 0x00000004
1644
+ FRIDAY = 0x00000005
1645
+ SATURDAY = 0x00000006
1646
+
1647
+
1648
+
1649
+ class RecurEndType(enum.IntEnum):
1650
+ @classmethod
1651
+ def fromInt(cls, value: int) -> RecurEndType:
1652
+ """
1653
+ Some enum values CAN be created from more than one int, so handle that.
1654
+ """
1655
+ return cls(0x00002023) if value == 0xFFFFFFFF else cls(value)
1656
+
1657
+ END_AFTER_DATE = 0x00002021
1658
+ END_AFTER_N_OCCURRENCES = 0x00002022
1659
+ NEVER_END = 0x00002023
1660
+
1661
+
1662
+ class RecurFrequency(enum.IntEnum):
1663
+ """
1664
+ See [MS-OXOCAL] for details.
1665
+ """
1666
+ DAILY = 0x200A
1667
+ WEEKLY = 0x200B
1668
+ MONTHLY = 0x200C
1669
+ YEARLY = 0x200D
1670
+
1671
+
1672
+
1673
+ class RecurMonthNthWeek(enum.IntEnum):
1674
+ FIRST = 0x00000001
1675
+ SECOND = 0x00000002
1676
+ THIRD = 0x00000003
1677
+ FOURTH = 0x00000004
1678
+ LAST = 0x00000005
1679
+
1680
+
1681
+
1682
+ class RecurPatternTypeSpecificWeekday(enum.IntFlag):
1683
+ """
1684
+ See [MS-OXOCAL] for details.
1685
+ """
1686
+ SATURDAY = 0b10
1687
+ FRIDAY = 0b100
1688
+ THURSDAY = 0b1000
1689
+ WEDNESDAY = 0b10000
1690
+ TUESDAY = 0b100000
1691
+ MONDAY = 0b1000000
1692
+ SUNDAY = 0b10000000
1693
+
1694
+
1695
+
1696
+ class RecurPatternType(enum.IntEnum):
1697
+ """
1698
+ See [MS-OXOCAL] for details.
1699
+ """
1700
+ DAY = 0x0000
1701
+ WEEK = 0x0001
1702
+ MONTH = 0x0002
1703
+ MONTH_NTH = 0x0003
1704
+ MONTH_END = 0x0004
1705
+ HJ_MONTH = 0x000A
1706
+ HJ_MONTH_NTH = 0x000B
1707
+ HJ_MONTH_END = 0x000C
1708
+
1709
+
1710
+
1711
+ class ResponseStatus(enum.IntEnum):
1712
+ """
1713
+ The response status of an attendee.
1714
+
1715
+ * NONE: No response is required for this object.
1716
+ * ORGANIZED: This Meeting object belongs to the organizer.
1717
+ * TENTATIVE: The attendee has tentatively accepted.
1718
+ * ACCEPTED: The attendee has accepted.
1719
+ * DECLINED: The attendee has declined.
1720
+ * NOT_RESPONDED: The attendee has not yet responded.
1721
+ """
1722
+
1723
+ @classmethod
1724
+ def fromIter(cls, items: Iterable[int]) -> List[ResponseStatus]:
1725
+ """
1726
+ Uses the iterable of ints to create a list of this enum.
1727
+ """
1728
+ return [cls(x) for x in items]
1729
+
1730
+ NONE = 0x00000000
1731
+ ORGANIZED = 0x00000001
1732
+ TENTATIVE = 0x00000002
1733
+ ACCEPTED = 0x00000003
1734
+ DECLINED = 0x00000004
1735
+ NOT_RESPONDED = 0x00000005
1736
+
1737
+
1738
+
1739
+ class ResponseType(enum.Enum):
1740
+ """
1741
+ The type of response for a Meeting Response object.
1742
+ """
1743
+ ACCEPT = 'pos'
1744
+ DECLINE = 'neg'
1745
+ TENTATIVE = 'tent'
1746
+
1747
+
1748
+
1749
+ class RetentionFlags(enum.IntFlag):
1750
+ """
1751
+ Flags that specify the status of nature of an item's retention tag or
1752
+ archive tag.
1753
+
1754
+ See the section labeled "PidTagRetentionFlags" of [MS-OXCMSG] for details.
1755
+ """
1756
+ EXPLICIT_TAG = 0x001
1757
+ USER_OVERRIDE = 0x002
1758
+ AUTO_TAG = 0x004
1759
+ PERSONAL_TAG = 0x008
1760
+ EXPLICIT_ARCHIVE_TAG = 0x010
1761
+ KEEP_IN_PLACE = 0x020
1762
+ SYSTEM_DATA = 0x040
1763
+ NEEDS_RESCAN = 0x080
1764
+ PENDING_RESCAN = 0x100
1765
+
1766
+
1767
+
1768
+ class RuleActionType(enum.IntEnum):
1769
+ OP_MOVE = 0x01
1770
+ OP_COPY = 0x02
1771
+ OP_REPLY = 0x03
1772
+ OP_OOF_REPLY = 0x04
1773
+ OP_DEFER_ACTION = 0x05
1774
+ OP_BOUNCE = 0x06
1775
+ OP_FORWARD = 0x07
1776
+ OP_DELEGATE = 0x08
1777
+ OP_TAG = 0x09
1778
+ OP_DELETE = 0x0A
1779
+ OP_MARK_AS_READ = 0x0B
1780
+
1781
+
1782
+
1783
+ class SaveType(enum.IntEnum):
1784
+ """
1785
+ Specifies the way that a function saved the data.
1786
+
1787
+ Used to determine how the return value from a save function should be read.
1788
+
1789
+ * CUSTOM: An unlisted save method was used, and the second value is
1790
+ unspecified.
1791
+ * NONE: No data was saved, and the second tuple value should be None.
1792
+ * FILE: A single file was save, and the location is the second value.
1793
+ * FILES: Multiple files were created, and the second value is a list of the
1794
+ locations.
1795
+ * FOLDER: A folder was created to store data, and the location is the second
1796
+ value.
1797
+ * FOLDERS: Multiple folders were created to store data, and the second value
1798
+ is a list of the locations.
1799
+ """
1800
+ CUSTOM = -1
1801
+ NONE = 0
1802
+ FILE = 1
1803
+ FILES = 2
1804
+ FOLDER = 3
1805
+ FOLDERS = 4
1806
+
1807
+
1808
+
1809
+ class Sensitivity(enum.IntEnum):
1810
+ NORMAL = 0
1811
+ PERSONAL = 1
1812
+ PRIVATE = 2
1813
+ CONFIDENTIAL = 3
1814
+
1815
+
1816
+
1817
+ class ServerProcessingAction(enum.IntFlag):
1818
+ """
1819
+ Actions taken on a meeting-related object.
1820
+ """
1821
+ DELEGATOR_WANTS_COPY = 0x00000002
1822
+ CREATED_ON_PRINCIPLE = 0x00000010
1823
+ UPDATED_CAL_ITEM = 0x00000080
1824
+ COPIED_OLD_PROPERTIES = 0x00000100
1825
+ SEND_AUTO_RESPONSE = 0x00000400
1826
+ REVIVED_EXCEPTION = 0x00000800
1827
+ PROCESSED_MEETING_FORWARD_NOTIFICATION = 0x00001000
1828
+
1829
+
1830
+
1831
+ class SideEffect(enum.IntFlag):
1832
+ """
1833
+ A flag for how a Message object is handled by the client in relation to
1834
+ certain user interface actions.
1835
+
1836
+ * OPEN_TO_DELETE: The client opens the Message object when deleting.
1837
+ * NO_FRAME: No UI is associated with the Message object.
1838
+ * COERCE_TO_INDEX: The client moves the Message object to the Inbox folder
1839
+ when moving or copying to a Folder object with the PidTagContainerClass
1840
+ property set to "IPF.Note".
1841
+ * OPEN_TO_COPY: The client opens the Message object when copying to another
1842
+ folder.
1843
+ * OPEN_TO_MOVE: The client opens the Message object when moving to another
1844
+ folder.
1845
+ * OPEN_FOR_CTX_MENU: The client opens the Message object when displaying
1846
+ context-sensitive commands, such as a context menu, to the end user.
1847
+ * CANNOT_UNDO_DELETE: The client cannot undo a delete operation. Must not be
1848
+ set unless the OPEN_TO_DELETE flag is set.
1849
+ * CANNOT_UNDO_COPY: The client cannot undo a copy operation. Must not be set
1850
+ unless the OPEN_TO_COPY flag is set.
1851
+ * CANNOT_UNDO_MOVE: The client cannot undo a move operation. Must not be set
1852
+ unless the OPEN_TO_MOVE flag is set.
1853
+ * HAS_SCRIPT: The Message object contains end-user script.
1854
+ * OPEN_TO_PERM_DELETE: The client opens the Message object to permanently
1855
+ delete it.
1856
+ """
1857
+ OPEN_TO_DELETE = 0b1
1858
+ NO_FRAME = 0b1000
1859
+ COERCE_TO_INDEX = 0b10000
1860
+ OPEN_TO_COPY = 0b100000
1861
+ OPEN_TO_MOVE = 0b1000000
1862
+ OPEN_FOR_CTX_MENU = 0b100000000
1863
+ CANNOT_UNDO_DELETE = 0b10000000000
1864
+ CANNOT_UNDO_COPY = 0b100000000000
1865
+ CANNOT_UNDO_MOVE = 0b1000000000000
1866
+ HAS_SCRIPT = 0b10000000000000
1867
+ OPEN_TO_PERM_DELETE = 0b100000000000000
1868
+
1869
+
1870
+
1871
+ class TaskAcceptance(enum.IntEnum):
1872
+ """
1873
+ The acceptance state of the task.
1874
+ """
1875
+ NOT_ASSIGNED = 0x00000000
1876
+ UNKNOWN = 0x00000001
1877
+ ACCEPTED = 0x00000002
1878
+ REJECTED = 0x00000003
1879
+
1880
+
1881
+
1882
+ class TaskHistory(enum.IntEnum):
1883
+ """
1884
+ The type of the last change to the Task object.
1885
+ """
1886
+ NONE = 0x00000000
1887
+ ACCEPTED = 0x00000001
1888
+ REJECTED = 0x00000002
1889
+ OTHER = 0x00000003
1890
+ DUE_DATE_CHANGED = 0x00000004
1891
+ ASSIGNED = 0x00000005
1892
+
1893
+
1894
+
1895
+ class TaskMode(enum.IntEnum):
1896
+ """
1897
+ The mode of the Task object used in task communication (PidLidTaskMode).
1898
+
1899
+ * UNASSIGNED: The Task object is not assigned.
1900
+ * EMBEDDED_REQUEST: The Task object is embedded in a task request.
1901
+ * ACCEPTED: The Task object has been accepted by the task assignee.
1902
+ * REJECTED: The Task object was rejected by the task assignee.
1903
+ * EMBEDDED_UPDATE: The Task object is embedded in a task update.
1904
+ * SELF_ASSIGNED: The Task object was assigned to the task assigner
1905
+ (self-delegation).
1906
+ """
1907
+ UNASSIGNED = 0
1908
+ EMBEDDED_REQUEST = 1
1909
+ ACCEPTED = 2
1910
+ REJECTED = 3
1911
+ EMBEDDED_UPDATE = 4
1912
+ SELF_ASSIGNED = 5
1913
+
1914
+
1915
+
1916
+ class TaskMultipleRecipients(enum.IntFlag):
1917
+ SENT = 0x00000001
1918
+ RECEIVED = 0x00000002
1919
+
1920
+
1921
+
1922
+ class TaskOwnership(enum.IntEnum):
1923
+ """
1924
+ The role of the current user relative to the Task object.
1925
+
1926
+ * NOT_ASSIGNED: The Task object is not assigned.
1927
+ * ASSIGNERS_COPY: The Task object is the task assigner's copy of the Task
1928
+ object.
1929
+ * ASSIGNEES_COPY: The Task object is the task assignee's copy of the Task
1930
+ object.
1931
+ """
1932
+ NOT_ASSIGNED = 0x00000000
1933
+ ASSIGNERS_COPY = 0x00000001
1934
+ ASSIGNEES_COPY = 0x00000002
1935
+
1936
+
1937
+
1938
+ class TaskRequestType(enum.IntEnum):
1939
+ """
1940
+ The type of task request.
1941
+
1942
+ * REQUEST: A plain request.
1943
+ * ACCEPT: Task has been accepted.
1944
+ * DECLINE: Task has been declined.
1945
+ * UPDATE: Task has been updated.
1946
+ """
1947
+
1948
+ @classmethod
1949
+ def fromClassType(cls, classType: str) -> TaskRequestType:
1950
+ """
1951
+ Convert a class type string into a TaskRequestType.
1952
+ """
1953
+ classType = classType.lower()
1954
+ if 'accept' in classType:
1955
+ return cls(1)
1956
+ if 'decline' in classType:
1957
+ return cls(2)
1958
+ if 'update' in classType:
1959
+ return cls(3)
1960
+ return cls(0)
1961
+
1962
+ REQUEST = 0
1963
+ ACCEPT = 1
1964
+ DECLINE = 2
1965
+ UPDATE = 3
1966
+
1967
+
1968
+
1969
+ class TaskState(enum.IntEnum):
1970
+ """
1971
+ TaskState.
1972
+
1973
+ * NOT_ASSIGNED: The Task object is not assigned.
1974
+ * ASSIGNEES_COPY_ACCEPTED: The Task object is the task assignee's copy of an
1975
+ assigned Task object.
1976
+ * ASSIGNERS_COPY_ACCEPTED: The Task object is the task assigner's copy of an
1977
+ assigned Task object.
1978
+ * ASSIGNERS_COPY_REJECTED: The Task object is the task assigner's copy of a
1979
+ rejected Task object.
1980
+ * EMBEDDED_REJECTION: This Task object was created to correspond to a Task
1981
+ object that was embedded in a task rejection but could not be found
1982
+ locally.
1983
+ """
1984
+ NOT_ASSIGNED = 0x00000001
1985
+ ASSIGNEES_COPY_ACCEPTED = 0x00000002
1986
+ ASSIGNERS_COPY_ACCEPTED = 0x00000003
1987
+ ASSIGNERS_COPY_REJECTED = 0x00000004
1988
+ EMBEDDED_REJECTION = 0x00000005
1989
+
1990
+
1991
+
1992
+ class TaskStatus(enum.IntEnum):
1993
+ """
1994
+ The status of a task object (PidLidTaskStatus).
1995
+
1996
+ * NOT_STARTED: The user has not started the task.
1997
+ * IN_PROGRESS: The users's work on the Task object is in progress.
1998
+ * COMPLETE: The user's work on the Task object is complete.
1999
+ * WAITING_ON_OTHER: The user is waiting on somebody else.
2000
+ * DEFERRED: The user has deferred work on the Task object.
2001
+ """
2002
+ NOT_STARTED = 0x00000000
2003
+ IN_PROGRESS = 0x00000001
2004
+ COMPLETE = 0x00000002
2005
+ WAITING_ON_OTHER = 0x00000003
2006
+ DEFERRED = 0x00000004
2007
+
2008
+
2009
+
2010
+ class TZFlag(enum.IntFlag):
2011
+ """
2012
+ Flags for a TZRule object as defined in [MS-OXOCAL].
2013
+
2014
+ * RECUR_CURRENT_TZREG: The rule is associated with a recurring series.
2015
+ * EFFECTIVE_TZREG: The rule is the effective rule.
2016
+ """
2017
+ RECUR_CURRENT_TZREG = 0b1
2018
+ EFFECTIVE_TZREG = 0b10
2019
+
2020
+
2021
+
2022
+ class WrappedType(enum.IntEnum):
2023
+ MESSAGE_STORE = 0x6
2024
+ MAILBOX_STORE = 0xC
2025
+
2026
+
2027
+
2028
+ class _EnumDeprecator:
2029
+ """
2030
+ Special class for handling deprecated enums in a way that shouldn't break
2031
+ existing code, including code for checking ``is`` on a member of the enum.
2032
+ """
2033
+ def __init__(self, oldClassName: str, newClass: Type[enum.Enum], nameConversion: Dict[str, Any] = {}, valueConversion: Dict = {}):
2034
+ """
2035
+ :param oldClassName: The name to use in the deprecation message.
2036
+ :param newClass: The new enum class to look for the value in.
2037
+ :param nameConversion: A dictionary of old names to new names to
2038
+ convert if needed. If a name is the same, it can be omitted.
2039
+ :param valueConversion: A dictionary of old values to new values used
2040
+ when getting a value from the enum.
2041
+ """
2042
+ self.__warnMessage = f'Enum {oldClassName} is deprecated and has been replaced with {newClass.__name__}. Please update your code.'
2043
+ self.__new = newClass
2044
+ self.__nameConv = nameConversion
2045
+ self.__valConv = valueConversion
2046
+
2047
+ def __call__(self, val):
2048
+ # Warn about the deprecation
2049
+ import warnings
2050
+ warnings.warn(self.__warnMessage, DeprecationWarning)
2051
+
2052
+ return self.__new(self.__valConv.get(val, val))
2053
+
2054
+ def __getattr__(self, key):
2055
+ # Warn about the deprecation
2056
+ import warnings
2057
+ warnings.warn(self.__warnMessage, DeprecationWarning)
2058
+
2059
+ return getattr(self.__new, self.__nameConv.get(key, key))
2060
+
2061
+ def __getitem__(self, name):
2062
+ # Warn about the deprecation
2063
+ import warnings
2064
+ warnings.warn(self.__warnMessage, DeprecationWarning)
2065
+
2066
+ return self.__new.__getitem__(self.__nameConv.get(name, name))
2067
+