forked from Dijji/XstReader
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Property.cs
130 lines (113 loc) · 3.6 KB
/
Property.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
// Copyright (c) 2016, Dijji, and released under Ms-PL. This can be found in the root of this distribution.
using System;
using System.Collections.Generic;
namespace XstReader
{
// Enums and classes used in property handling
// Enum names are taken from <MS-PST>
public enum EpropertyType : UInt16
{
PtypBinary = 0x0102,
PtypBoolean = 0x000b,
PtypFloating64 = 0x0005,
PtypGuid = 0x0048,
PtypInteger16 = 0x0002,
PtypInteger32 = 0x0003,
PtypInteger64 = 0x0014,
PtypMultipleInteger32 = 0x1003,
PtypObject = 0x000d,
PtypString = 0x001f,
PtypString8 = 0x001e,
PtypMultipleString = 0x101F,
PtypTime = 0x0040,
}
public enum EpropertyTag : UInt16
{
PidTagDisplayName = 0x3001,
// Root folder
PidTagRecordKey = 0x0FF9,
PidTagIpmSubTreeEntryId = 0x35E0,
// Folder
PidTagContentCount = 0x3602,
PidTagSubfolders = 0x360A,
// Message List
PidTagSubjectW = 0x0037,
PidTagDisplayCcW = 0x0E03,
PidTagDisplayToW = 0x0E04,
PidTagMessageFlags = 0x0E07,
PidTagMessageDeliveryTime = 0x0E06,
PidTagSentRepresentingNameW = 0x0042,
PidTagSentRepresentingEmailAddress = 0x0065,
PidTagSenderName = 0x0C1A,
PidTagClientSubmitTime = 0x0039,
PidTagLastModificationTime = 0x3008,
// Message body
PidTagNativeBody = 0x1016,
PidTagBody = 0x1000,
PidTagInternetCodepage = 0x3FDE,
PidTagHtml = 0x1013,
PidTagRtfCompressed = 0x1009,
// Recipient
PidTagRecipientType = 0x0c15,
PidTagEmailAddress = 0x3003,
// Attachment
PidTagAttachFilenameW = 0x3704,
PidTagAttachLongFilename = 0x3707,
PidTagAttachmentSize = 0x0E20,
PidTagAttachMethod = 0x3705,
PidTagAttachMimeTag = 0x370e,
PidTagAttachContentId = 0x3712,
PidTagAttachFlags = 0x3714,
PidTagAttachPayloadClass = 0x371a,
PidTagAttachDataBinary = 0x3701,
PidTagAttachmentHidden = 0x7ffe,
//PidTagAttachDataObject = 0x3701,
// Named properties
PidTagNameidStreamGuid = 0x0002,
PidTagNameidStreamEntry = 0x0003,
PidTagNameidStreamString = 0x0004,
}
// Values of the PidTagNativeBody property
public enum BodyType : Int32
{
Undefined = 0x00000000,
PlainText = 0x00000001,
RTF = 0x00000002,
HTML = 0x00000003,
ClearSigned = 0x00000004,
}
// Values of the PidTagMessageFlags property
[Flags]
public enum MessageFlags : Int32
{
mfHasAttach = 0x00000010,
}
// Values of the PidTagRecipientType property
[Flags]
public enum RecipientType : Int32
{
Originator = 0x00000000,
To = 0x00000001,
Cc = 0x00000002,
Bcc = 0x00000003,
}
// Values of the PidTagAttachMethod property
public enum AttachMethods : Int32
{
afByValue = 0x00000001,
afEmbeddedMessage = 0x00000005,
afStorage = 0x00000006,
}
// Values of the PidTagAttachFlags property
public enum AttachFlags : UInt32
{
attInvisibleInHtml = 0x00000001,
attRenderedInBody = 0x00000004,
}
// Property getters are used to specify which properties should be retrieved from a property context
// or table context, and where they should be stored.
// T is the target object, Action arguments are target object, column value
class PropertyGetters<T> : Dictionary<EpropertyTag, Action<T, dynamic>>
{
}
}