annotate src/libpst.h @ 123:ab2a11e72250

more cleanup of #include files. common.h is the only file allowed to include system .h files unprotected by autoconf HAVE_ symbols. define.h is the only other file allowed to include system .h files. define.h is never installed; common.h is installed if we are building the shared library.
author Carl Byington <carl@five-ten-sg.com>
date Tue, 03 Feb 2009 10:59:10 -0800
parents bdb38b434c0a
children 23a36ac0514d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
1 /***
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
2 * libpst.h
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
3 * Part of LibPST project
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
4 * Written by David Smith
46
b2a7f2e0926a more fixes for 64 bit format
carl
parents: 44
diff changeset
5 * dave.s@earthcorp.com
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
6 */
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
7 // LibPST - Library for Accessing Outlook .pst files
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
8 // Dave Smith - davesmith@users.sourceforge.net
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
9
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
10 #ifndef LIBPST_H
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
11 #define LIBPST_H
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
12
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
13
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
14 #if BYTE_ORDER == BIG_ENDIAN
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
15 # define LE64_CPU(x) \
90
631d02d30a1c More fixes for 32/64 bit portability on big endian ppc.
Carl Byington <carl@five-ten-sg.com>
parents: 87
diff changeset
16 x = ((((x) & UINT64_C(0xff00000000000000)) >> 56) | \
631d02d30a1c More fixes for 32/64 bit portability on big endian ppc.
Carl Byington <carl@five-ten-sg.com>
parents: 87
diff changeset
17 (((x) & UINT64_C(0x00ff000000000000)) >> 40) | \
631d02d30a1c More fixes for 32/64 bit portability on big endian ppc.
Carl Byington <carl@five-ten-sg.com>
parents: 87
diff changeset
18 (((x) & UINT64_C(0x0000ff0000000000)) >> 24) | \
631d02d30a1c More fixes for 32/64 bit portability on big endian ppc.
Carl Byington <carl@five-ten-sg.com>
parents: 87
diff changeset
19 (((x) & UINT64_C(0x000000ff00000000)) >> 8 ) | \
631d02d30a1c More fixes for 32/64 bit portability on big endian ppc.
Carl Byington <carl@five-ten-sg.com>
parents: 87
diff changeset
20 (((x) & UINT64_C(0x00000000ff000000)) << 8 ) | \
631d02d30a1c More fixes for 32/64 bit portability on big endian ppc.
Carl Byington <carl@five-ten-sg.com>
parents: 87
diff changeset
21 (((x) & UINT64_C(0x0000000000ff0000)) << 24) | \
631d02d30a1c More fixes for 32/64 bit portability on big endian ppc.
Carl Byington <carl@five-ten-sg.com>
parents: 87
diff changeset
22 (((x) & UINT64_C(0x000000000000ff00)) << 40) | \
631d02d30a1c More fixes for 32/64 bit portability on big endian ppc.
Carl Byington <carl@five-ten-sg.com>
parents: 87
diff changeset
23 (((x) & UINT64_C(0x00000000000000ff)) << 56));
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
24 # define LE32_CPU(x) \
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
25 x = ((((x) & 0xff000000) >> 24) | \
46
b2a7f2e0926a more fixes for 64 bit format
carl
parents: 44
diff changeset
26 (((x) & 0x00ff0000) >> 8 ) | \
b2a7f2e0926a more fixes for 64 bit format
carl
parents: 44
diff changeset
27 (((x) & 0x0000ff00) << 8 ) | \
b2a7f2e0926a more fixes for 64 bit format
carl
parents: 44
diff changeset
28 (((x) & 0x000000ff) << 24));
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
29 # define LE16_CPU(x) \
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
30 x = ((((x) & 0xff00) >> 8) | \
46
b2a7f2e0926a more fixes for 64 bit format
carl
parents: 44
diff changeset
31 (((x) & 0x00ff) << 8));
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
32 #elif BYTE_ORDER == LITTLE_ENDIAN
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
33 # define LE64_CPU(x) {}
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
34 # define LE32_CPU(x) {}
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
35 # define LE16_CPU(x) {}
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
36 #else
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
37 # error "Byte order not supported by this library"
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
38 #endif // BYTE_ORDER
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
39
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
40
79
56fa05fd5271 Patch from Robert Simpson for encryption type 2.
Carl Byington <carl@five-ten-sg.com>
parents: 75
diff changeset
41 #define PST_TYPE_NOTE 1
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
42 #define PST_TYPE_APPOINTMENT 8
79
56fa05fd5271 Patch from Robert Simpson for encryption type 2.
Carl Byington <carl@five-ten-sg.com>
parents: 75
diff changeset
43 #define PST_TYPE_CONTACT 9
56fa05fd5271 Patch from Robert Simpson for encryption type 2.
Carl Byington <carl@five-ten-sg.com>
parents: 75
diff changeset
44 #define PST_TYPE_JOURNAL 10
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
45 #define PST_TYPE_STICKYNOTE 11
79
56fa05fd5271 Patch from Robert Simpson for encryption type 2.
Carl Byington <carl@five-ten-sg.com>
parents: 75
diff changeset
46 #define PST_TYPE_TASK 12
56fa05fd5271 Patch from Robert Simpson for encryption type 2.
Carl Byington <carl@five-ten-sg.com>
parents: 75
diff changeset
47 #define PST_TYPE_OTHER 13
56fa05fd5271 Patch from Robert Simpson for encryption type 2.
Carl Byington <carl@five-ten-sg.com>
parents: 75
diff changeset
48 #define PST_TYPE_REPORT 14
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
49
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
50 // defines whether decryption is done on this bit of data
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
51 #define PST_NO_ENC 0
79
56fa05fd5271 Patch from Robert Simpson for encryption type 2.
Carl Byington <carl@five-ten-sg.com>
parents: 75
diff changeset
52 #define PST_ENC 1
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
53
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
54 // defines types of possible encryption
79
56fa05fd5271 Patch from Robert Simpson for encryption type 2.
Carl Byington <carl@five-ten-sg.com>
parents: 75
diff changeset
55 #define PST_NO_ENCRYPT 0
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
56 #define PST_COMP_ENCRYPT 1
79
56fa05fd5271 Patch from Robert Simpson for encryption type 2.
Carl Byington <carl@five-ten-sg.com>
parents: 75
diff changeset
57 #define PST_ENCRYPT 2
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
58
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
59 // defines different types of mappings
46
b2a7f2e0926a more fixes for 64 bit format
carl
parents: 44
diff changeset
60 #define PST_MAP_ATTRIB (uint32_t)1
b2a7f2e0926a more fixes for 64 bit format
carl
parents: 44
diff changeset
61 #define PST_MAP_HEADER (uint32_t)2
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
62
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
63 // define my custom email attributes.
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
64 #define PST_ATTRIB_HEADER -1
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
65
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
66 // defines types of free/busy values for appointment->showas
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
67 #define PST_FREEBUSY_FREE 0
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
68 #define PST_FREEBUSY_TENTATIVE 1
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
69 #define PST_FREEBUSY_BUSY 2
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
70 #define PST_FREEBUSY_OUT_OF_OFFICE 3
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
71
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
72 // defines labels for appointment->label
46
b2a7f2e0926a more fixes for 64 bit format
carl
parents: 44
diff changeset
73 #define PST_APP_LABEL_NONE 0 // None
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
74 #define PST_APP_LABEL_IMPORTANT 1 // Important
46
b2a7f2e0926a more fixes for 64 bit format
carl
parents: 44
diff changeset
75 #define PST_APP_LABEL_BUSINESS 2 // Business
b2a7f2e0926a more fixes for 64 bit format
carl
parents: 44
diff changeset
76 #define PST_APP_LABEL_PERSONAL 3 // Personal
b2a7f2e0926a more fixes for 64 bit format
carl
parents: 44
diff changeset
77 #define PST_APP_LABEL_VACATION 4 // Vacation
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
78 #define PST_APP_LABEL_MUST_ATTEND 5 // Must Attend
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
79 #define PST_APP_LABEL_TRAVEL_REQ 6 // Travel Required
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
80 #define PST_APP_LABEL_NEEDS_PREP 7 // Needs Preparation
46
b2a7f2e0926a more fixes for 64 bit format
carl
parents: 44
diff changeset
81 #define PST_APP_LABEL_BIRTHDAY 8 // Birthday
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
82 #define PST_APP_LABEL_ANNIVERSARY 9 // Anniversary
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
83 #define PST_APP_LABEL_PHONE_CALL 10// Phone Call
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
84
50
fb3818370dd6 more fixes for 64 bit format
carl
parents: 49
diff changeset
85 // define type of reccuring event
fb3818370dd6 more fixes for 64 bit format
carl
parents: 49
diff changeset
86 #define PST_APP_RECUR_NONE 0
fb3818370dd6 more fixes for 64 bit format
carl
parents: 49
diff changeset
87 #define PST_APP_RECUR_DAILY 1
fb3818370dd6 more fixes for 64 bit format
carl
parents: 49
diff changeset
88 #define PST_APP_RECUR_WEEKLY 2
fb3818370dd6 more fixes for 64 bit format
carl
parents: 49
diff changeset
89 #define PST_APP_RECUR_MONTHLY 3
fb3818370dd6 more fixes for 64 bit format
carl
parents: 49
diff changeset
90 #define PST_APP_RECUR_YEARLY 4
fb3818370dd6 more fixes for 64 bit format
carl
parents: 49
diff changeset
91
49
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
92
46
b2a7f2e0926a more fixes for 64 bit format
carl
parents: 44
diff changeset
93 typedef struct pst_misc_6_struct {
49
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
94 int32_t i1;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
95 int32_t i2;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
96 int32_t i3;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
97 int32_t i4;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
98 int32_t i5;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
99 int32_t i6;
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
100 } pst_misc_6;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
101
49
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
102
46
b2a7f2e0926a more fixes for 64 bit format
carl
parents: 44
diff changeset
103 typedef struct pst_entryid_struct {
49
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
104 int32_t u1;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
105 char entryid[16];
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
106 uint32_t id;
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
107 } pst_entryid;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
108
49
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
109
46
b2a7f2e0926a more fixes for 64 bit format
carl
parents: 44
diff changeset
110 typedef struct pst_desc_struct32 {
49
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
111 uint32_t d_id;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
112 uint32_t desc_id;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
113 uint32_t list_id;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
114 uint32_t parent_id;
43
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
115 } pst_desc32;
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
116
49
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
117
46
b2a7f2e0926a more fixes for 64 bit format
carl
parents: 44
diff changeset
118 typedef struct pst_desc_structn {
49
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
119 uint64_t d_id;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
120 uint64_t desc_id;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
121 uint64_t list_id;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
122 uint32_t parent_id; // not 64 bit ??
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
123 uint32_t u1; // padding
43
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
124 } pst_descn;
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
125
49
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
126
46
b2a7f2e0926a more fixes for 64 bit format
carl
parents: 44
diff changeset
127 typedef struct pst_index_struct32 {
49
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
128 uint32_t id;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
129 uint32_t offset;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
130 uint16_t size;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
131 int16_t u1;
43
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
132 } pst_index32;
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
133
49
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
134
46
b2a7f2e0926a more fixes for 64 bit format
carl
parents: 44
diff changeset
135 typedef struct pst_index_struct {
49
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
136 uint64_t id;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
137 uint64_t offset;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
138 uint16_t size;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
139 int16_t u0;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
140 int32_t u1;
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
141 } pst_index;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
142
49
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
143
46
b2a7f2e0926a more fixes for 64 bit format
carl
parents: 44
diff changeset
144 typedef struct pst_index_tree32 {
49
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
145 uint32_t id;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
146 uint32_t offset;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
147 uint32_t size;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
148 int32_t u1;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
149 struct pst_index_tree * next;
43
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
150 } pst_index_ll32;
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
151
49
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
152
46
b2a7f2e0926a more fixes for 64 bit format
carl
parents: 44
diff changeset
153 typedef struct pst_index_tree {
49
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
154 uint64_t id;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
155 uint64_t offset;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
156 uint64_t size;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
157 int64_t u1;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
158 struct pst_index_tree * next;
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
159 } pst_index_ll;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
160
49
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
161
46
b2a7f2e0926a more fixes for 64 bit format
carl
parents: 44
diff changeset
162 typedef struct pst_index2_tree {
49
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
163 uint64_t id2;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
164 pst_index_ll *id;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
165 struct pst_index2_tree * next;
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
166 } pst_index2_ll;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
167
49
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
168
46
b2a7f2e0926a more fixes for 64 bit format
carl
parents: 44
diff changeset
169 typedef struct pst_desc_tree {
49
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
170 uint64_t id;
101
1fc33da23175 fix for orphan children when building descriptor tree, avoid writing uninitialized data to debug log file
Carl Byington <carl@five-ten-sg.com>
parents: 94
diff changeset
171 uint64_t parent_id;
49
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
172 pst_index_ll * list_index;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
173 pst_index_ll * desc;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
174 int32_t no_child;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
175 struct pst_desc_tree * prev;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
176 struct pst_desc_tree * next;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
177 struct pst_desc_tree * parent;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
178 struct pst_desc_tree * child;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
179 struct pst_desc_tree * child_tail;
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
180 } pst_desc_ll;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
181
49
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
182
46
b2a7f2e0926a more fixes for 64 bit format
carl
parents: 44
diff changeset
183 typedef struct pst_item_email_subject {
49
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
184 int off1;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
185 int off2;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
186 char *subj;
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
187 } pst_item_email_subject;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
188
49
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
189
46
b2a7f2e0926a more fixes for 64 bit format
carl
parents: 44
diff changeset
190 typedef struct pst_item_email {
49
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
191 FILETIME *arrival_date;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
192 int autoforward; // 1 = true, 0 = not set, -1 = false
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
193 char *body;
116
ed2a260bbb98 improve handling of content-type charset values in mime parts
Carl Byington <carl@five-ten-sg.com>
parents: 102
diff changeset
194 char *body_charset; // null if not specified
49
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
195 char *cc_address;
59
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 52
diff changeset
196 char *bcc_address;
49
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
197 char *common_name;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
198 int32_t conv_index;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
199 int conversion_prohib; // 1 = true, 0 = false
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
200 int delete_after_submit; // 1 = true, 0 = false
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
201 int delivery_report; // 1 = true, 0 = false
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
202 char *encrypted_body;
50
fb3818370dd6 more fixes for 64 bit format
carl
parents: 49
diff changeset
203 size_t encrypted_body_size;
49
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
204 char *encrypted_htmlbody;
50
fb3818370dd6 more fixes for 64 bit format
carl
parents: 49
diff changeset
205 size_t encrypted_htmlbody_size;
49
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
206 int32_t flag;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
207 char *header;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
208 char *htmlbody;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
209 int32_t importance;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
210 char *in_reply_to;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
211 int message_cc_me; // 1 = true, 0 = false
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
212 int message_recip_me; // 1 = true, 0 = false
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
213 int message_to_me; // 1 = true, 0 = false
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
214 char *messageid;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
215 int32_t orig_sensitivity;
63
cfd6175f9334 Start work on pst2dii to convert to Summation dii load file format.
Carl Byington <carl@five-ten-sg.com>
parents: 59
diff changeset
216 char *original_bcc;
cfd6175f9334 Start work on pst2dii to convert to Summation dii load file format.
Carl Byington <carl@five-ten-sg.com>
parents: 59
diff changeset
217 char *original_cc;
cfd6175f9334 Start work on pst2dii to convert to Summation dii load file format.
Carl Byington <carl@five-ten-sg.com>
parents: 59
diff changeset
218 char *original_to;
49
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
219 char *outlook_recipient;
63
cfd6175f9334 Start work on pst2dii to convert to Summation dii load file format.
Carl Byington <carl@five-ten-sg.com>
parents: 59
diff changeset
220 char *outlook_recipient_name;
49
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
221 char *outlook_recipient2;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
222 char *outlook_sender;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
223 char *outlook_sender_name;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
224 char *outlook_sender2;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
225 int32_t priority;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
226 char *proc_subject;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
227 int read_receipt; // 1 = true, 0 = false
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
228 char *recip_access;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
229 char *recip_address;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
230 char *recip2_access;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
231 char *recip2_address;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
232 int reply_requested; // 1 = true, 0 = false
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
233 char *reply_to;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
234 char *return_path_address;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
235 int32_t rtf_body_char_count;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
236 int32_t rtf_body_crc;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
237 char *rtf_body_tag;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
238 char *rtf_compressed;
63
cfd6175f9334 Start work on pst2dii to convert to Summation dii load file format.
Carl Byington <carl@five-ten-sg.com>
parents: 59
diff changeset
239 uint32_t rtf_compressed_size;
49
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
240 int rtf_in_sync; // 1 = true, 0 = doesn't exist, -1 = false
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
241 int32_t rtf_ws_prefix_count;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
242 int32_t rtf_ws_trailing_count;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
243 char *sender_access;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
244 char *sender_address;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
245 char *sender2_access;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
246 char *sender2_address;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
247 int32_t sensitivity;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
248 FILETIME *sent_date;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
249 pst_entryid *sentmail_folder;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
250 char *sentto_address;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
251 pst_item_email_subject *subject;
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
252 } pst_item_email;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
253
49
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
254
46
b2a7f2e0926a more fixes for 64 bit format
carl
parents: 44
diff changeset
255 typedef struct pst_item_folder {
49
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
256 int32_t email_count;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
257 int32_t unseen_email_count;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
258 int32_t assoc_count;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
259 int subfolder; // 1 = true, 0 = false
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
260 } pst_item_folder;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
261
49
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
262
46
b2a7f2e0926a more fixes for 64 bit format
carl
parents: 44
diff changeset
263 typedef struct pst_item_message_store {
51
06c0262ad689 code cleanup
carl
parents: 50
diff changeset
264 pst_entryid *top_of_personal_folder; // 0x35e0
06c0262ad689 code cleanup
carl
parents: 50
diff changeset
265 pst_entryid *default_outbox_folder; // 0x35e2
06c0262ad689 code cleanup
carl
parents: 50
diff changeset
266 pst_entryid *deleted_items_folder; // 0x35e3
06c0262ad689 code cleanup
carl
parents: 50
diff changeset
267 pst_entryid *sent_items_folder; // 0x35e4
06c0262ad689 code cleanup
carl
parents: 50
diff changeset
268 pst_entryid *user_views_folder; // 0x35e5
06c0262ad689 code cleanup
carl
parents: 50
diff changeset
269 pst_entryid *common_view_folder; // 0x35e6
06c0262ad689 code cleanup
carl
parents: 50
diff changeset
270 pst_entryid *search_root_folder; // 0x35e7
06c0262ad689 code cleanup
carl
parents: 50
diff changeset
271 pst_entryid *top_of_folder; // 0x7c07
06c0262ad689 code cleanup
carl
parents: 50
diff changeset
272 int32_t valid_mask; // 0x35df // what folders the message store contains
06c0262ad689 code cleanup
carl
parents: 50
diff changeset
273 int32_t pwd_chksum; // 0x76ff
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
274 } pst_item_message_store;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
275
49
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
276
46
b2a7f2e0926a more fixes for 64 bit format
carl
parents: 44
diff changeset
277 typedef struct pst_item_contact {
49
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
278 char *access_method;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
279 char *account_name;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
280 char *address1;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
281 char *address1a;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
282 char *address1_desc;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
283 char *address1_transport;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
284 char *address2;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
285 char *address2a;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
286 char *address2_desc;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
287 char *address2_transport;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
288 char *address3;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
289 char *address3a;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
290 char *address3_desc;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
291 char *address3_transport;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
292 char *assistant_name;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
293 char *assistant_phone;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
294 char *billing_information;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
295 FILETIME *birthday;
51
06c0262ad689 code cleanup
carl
parents: 50
diff changeset
296 char *business_address; // 0x801b
49
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
297 char *business_city;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
298 char *business_country;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
299 char *business_fax;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
300 char *business_homepage;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
301 char *business_phone;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
302 char *business_phone2;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
303 char *business_po_box;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
304 char *business_postal_code;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
305 char *business_state;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
306 char *business_street;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
307 char *callback_phone;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
308 char *car_phone;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
309 char *company_main_phone;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
310 char *company_name;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
311 char *computer_name;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
312 char *customer_id;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
313 char *def_postal_address;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
314 char *department;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
315 char *display_name_prefix;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
316 char *first_name;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
317 char *followup;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
318 char *free_busy_address;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
319 char *ftp_site;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
320 char *fullname;
51
06c0262ad689 code cleanup
carl
parents: 50
diff changeset
321 int16_t gender;
49
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
322 char *gov_id;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
323 char *hobbies;
51
06c0262ad689 code cleanup
carl
parents: 50
diff changeset
324 char *home_address; // 0x801a
49
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
325 char *home_city;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
326 char *home_country;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
327 char *home_fax;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
328 char *home_phone;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
329 char *home_phone2;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
330 char *home_po_box;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
331 char *home_postal_code;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
332 char *home_state;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
333 char *home_street;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
334 char *initials;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
335 char *isdn_phone;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
336 char *job_title;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
337 char *keyword;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
338 char *language;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
339 char *location;
51
06c0262ad689 code cleanup
carl
parents: 50
diff changeset
340 int mail_permission; // 1 = true, 0 = false
49
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
341 char *manager_name;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
342 char *middle_name;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
343 char *mileage;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
344 char *mobile_phone;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
345 char *nickname;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
346 char *office_loc;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
347 char *org_id;
51
06c0262ad689 code cleanup
carl
parents: 50
diff changeset
348 char *other_address; // 0x801c
49
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
349 char *other_city;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
350 char *other_country;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
351 char *other_phone;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
352 char *other_po_box;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
353 char *other_postal_code;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
354 char *other_state;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
355 char *other_street;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
356 char *pager_phone;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
357 char *personal_homepage;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
358 char *pref_name;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
359 char *primary_fax;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
360 char *primary_phone;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
361 char *profession;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
362 char *radio_phone;
51
06c0262ad689 code cleanup
carl
parents: 50
diff changeset
363 int rich_text; // 1 = true, 0 = false
49
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
364 char *spouse_name;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
365 char *suffix;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
366 char *surname;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
367 char *telex;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
368 char *transmittable_display_name;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
369 char *ttytdd_phone;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
370 FILETIME *wedding_anniversary;
51
06c0262ad689 code cleanup
carl
parents: 50
diff changeset
371 char *work_address_street; // 0x8045
06c0262ad689 code cleanup
carl
parents: 50
diff changeset
372 char *work_address_city; // 0x8046
06c0262ad689 code cleanup
carl
parents: 50
diff changeset
373 char *work_address_state; // 0x8047
06c0262ad689 code cleanup
carl
parents: 50
diff changeset
374 char *work_address_postalcode; // 0x8048
06c0262ad689 code cleanup
carl
parents: 50
diff changeset
375 char *work_address_country; // 0x8049
06c0262ad689 code cleanup
carl
parents: 50
diff changeset
376 char *work_address_postofficebox; // 0x804a
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
377 } pst_item_contact;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
378
49
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
379
46
b2a7f2e0926a more fixes for 64 bit format
carl
parents: 44
diff changeset
380 typedef struct pst_item_attach {
49
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
381 char *filename1;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
382 char *filename2;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
383 char *mimetype;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
384 char *data;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
385 size_t size;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
386 uint64_t id2_val;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
387 uint64_t id_val; // calculated from id2_val during creation of record
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
388 int32_t method;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
389 int32_t position;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
390 int32_t sequence;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
391 struct pst_item_attach *next;
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
392 } pst_item_attach;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
393
49
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
394
46
b2a7f2e0926a more fixes for 64 bit format
carl
parents: 44
diff changeset
395 typedef struct pst_item_extra_field {
49
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
396 char *field_name;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
397 char *value;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
398 struct pst_item_extra_field *next;
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
399 } pst_item_extra_field;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
400
49
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
401
46
b2a7f2e0926a more fixes for 64 bit format
carl
parents: 44
diff changeset
402 typedef struct pst_item_journal {
49
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
403 FILETIME *end;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
404 FILETIME *start;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
405 char *type;
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
406 } pst_item_journal;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
407
49
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
408
46
b2a7f2e0926a more fixes for 64 bit format
carl
parents: 44
diff changeset
409 typedef struct pst_item_appointment {
49
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
410 FILETIME *end;
50
fb3818370dd6 more fixes for 64 bit format
carl
parents: 49
diff changeset
411 char *location;
fb3818370dd6 more fixes for 64 bit format
carl
parents: 49
diff changeset
412 int alarm; // 1 = true, 0 = false
49
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
413 FILETIME *reminder;
50
fb3818370dd6 more fixes for 64 bit format
carl
parents: 49
diff changeset
414 int32_t alarm_minutes;
fb3818370dd6 more fixes for 64 bit format
carl
parents: 49
diff changeset
415 char *alarm_filename;
49
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
416 FILETIME *start;
50
fb3818370dd6 more fixes for 64 bit format
carl
parents: 49
diff changeset
417 char *timezonestring;
fb3818370dd6 more fixes for 64 bit format
carl
parents: 49
diff changeset
418 int32_t showas;
fb3818370dd6 more fixes for 64 bit format
carl
parents: 49
diff changeset
419 int32_t label;
fb3818370dd6 more fixes for 64 bit format
carl
parents: 49
diff changeset
420 int all_day; // 1 = true, 0 = false
fb3818370dd6 more fixes for 64 bit format
carl
parents: 49
diff changeset
421 char *recurrence;
fb3818370dd6 more fixes for 64 bit format
carl
parents: 49
diff changeset
422 int32_t recurrence_type;
fb3818370dd6 more fixes for 64 bit format
carl
parents: 49
diff changeset
423 FILETIME *recurrence_start;
fb3818370dd6 more fixes for 64 bit format
carl
parents: 49
diff changeset
424 FILETIME *recurrence_end;
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
425 } pst_item_appointment;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
426
49
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
427
46
b2a7f2e0926a more fixes for 64 bit format
carl
parents: 44
diff changeset
428 typedef struct pst_item {
49
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
429 struct pst_item_email *email; // data reffering to email
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
430 struct pst_item_folder *folder; // data reffering to folder
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
431 struct pst_item_contact *contact; // data reffering to contact
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
432 struct pst_item_attach *attach; // linked list of attachments
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
433 struct pst_item_message_store *message_store; // data referring to the message store
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
434 struct pst_item_extra_field *extra_fields; // linked list of extra headers and such
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
435 struct pst_item_journal *journal; // data reffering to a journal entry
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
436 struct pst_item_appointment *appointment; // data reffering to a calendar entry
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
437 int type;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
438 char *ascii_type;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
439 char *file_as;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
440 char *comment;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
441 int32_t message_size;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
442 char *outlook_version;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
443 char *record_key; // probably 16 bytes long.
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
444 size_t record_key_size;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
445 int response_requested; // 1 = true, 0 = false
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
446 FILETIME *create_date;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
447 FILETIME *modify_date;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
448 int private_member; // 1 = true, 0 = false
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
449 } pst_item;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
450
49
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
451
46
b2a7f2e0926a more fixes for 64 bit format
carl
parents: 44
diff changeset
452 typedef struct pst_x_attrib_ll {
49
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
453 uint32_t type;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
454 uint32_t mytype;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
455 uint32_t map;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
456 void *data;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
457 struct pst_x_attrib_ll *next;
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
458 } pst_x_attrib_ll;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
459
49
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
460
52
034641c26ab9 code cleanup
carl
parents: 51
diff changeset
461 typedef struct pst_block_recorder {
034641c26ab9 code cleanup
carl
parents: 51
diff changeset
462 struct pst_block_recorder *next;
123
ab2a11e72250 more cleanup of #include files.
Carl Byington <carl@five-ten-sg.com>
parents: 122
diff changeset
463 uint64_t offset;
52
034641c26ab9 code cleanup
carl
parents: 51
diff changeset
464 size_t size;
034641c26ab9 code cleanup
carl
parents: 51
diff changeset
465 int readcount;
034641c26ab9 code cleanup
carl
parents: 51
diff changeset
466 } pst_block_recorder;
034641c26ab9 code cleanup
carl
parents: 51
diff changeset
467
034641c26ab9 code cleanup
carl
parents: 51
diff changeset
468
46
b2a7f2e0926a more fixes for 64 bit format
carl
parents: 44
diff changeset
469 typedef struct pst_file {
49
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
470 pst_index_ll *i_head, *i_tail;
52
034641c26ab9 code cleanup
carl
parents: 51
diff changeset
471 pst_desc_ll *d_head, *d_tail;
49
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
472 pst_x_attrib_ll *x_head;
52
034641c26ab9 code cleanup
carl
parents: 51
diff changeset
473 pst_block_recorder *block_head;
46
b2a7f2e0926a more fixes for 64 bit format
carl
parents: 44
diff changeset
474
49
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
475 //set this to 0 to read 32-bit pst files (pre Outlook 2003)
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
476 //set this to 1 to read 64-bit pst files (Outlook 2003 and later)
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
477 int do_read64;
46
b2a7f2e0926a more fixes for 64 bit format
carl
parents: 44
diff changeset
478
49
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
479 uint64_t index1;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
480 uint64_t index1_back;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
481 uint64_t index2;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
482 uint64_t index2_back;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
483 FILE * fp; // file pointer to opened PST file
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
484 uint64_t size; // pst file size
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
485 unsigned char encryption; // pst encryption setting
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
486 unsigned char ind_type; // pst index type
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
487 } pst_file;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
488
49
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
489
46
b2a7f2e0926a more fixes for 64 bit format
carl
parents: 44
diff changeset
490 typedef struct pst_block_offset {
49
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
491 int16_t from;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
492 int16_t to;
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
493 } pst_block_offset;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
494
49
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
495
46
b2a7f2e0926a more fixes for 64 bit format
carl
parents: 44
diff changeset
496 typedef struct pst_block_offset_pointer {
52
034641c26ab9 code cleanup
carl
parents: 51
diff changeset
497 char *from;
034641c26ab9 code cleanup
carl
parents: 51
diff changeset
498 char *to;
034641c26ab9 code cleanup
carl
parents: 51
diff changeset
499 int needfree;
35
b2f247463b83 better decoding of 7c blocks
carl
parents: 34
diff changeset
500 } pst_block_offset_pointer;
b2f247463b83 better decoding of 7c blocks
carl
parents: 34
diff changeset
501
49
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
502
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
503 typedef struct pst_num_item {
52
034641c26ab9 code cleanup
carl
parents: 51
diff changeset
504 uint32_t id; // not an id1 or id2, this is actually some sort of type code
034641c26ab9 code cleanup
carl
parents: 51
diff changeset
505 char *data;
034641c26ab9 code cleanup
carl
parents: 51
diff changeset
506 uint32_t type;
034641c26ab9 code cleanup
carl
parents: 51
diff changeset
507 size_t size;
034641c26ab9 code cleanup
carl
parents: 51
diff changeset
508 char *extra;
49
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
509 } pst_num_item;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
510
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
511
46
b2a7f2e0926a more fixes for 64 bit format
carl
parents: 44
diff changeset
512 typedef struct pst_num_array {
49
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
513 int32_t count_item;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
514 int32_t orig_count;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
515 int32_t count_array;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
516 struct pst_num_item ** items;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
517 struct pst_num_array *next;
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
518 } pst_num_array;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
519
49
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
520
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
521 typedef struct pst_holder {
94
997cf1373f9e fix base64 encoding that could create long lines
Carl Byington <carl@five-ten-sg.com>
parents: 90
diff changeset
522 char **buf;
997cf1373f9e fix base64 encoding that could create long lines
Carl Byington <carl@five-ten-sg.com>
parents: 90
diff changeset
523 FILE *fp;
997cf1373f9e fix base64 encoding that could create long lines
Carl Byington <carl@five-ten-sg.com>
parents: 90
diff changeset
524 int base64;
49
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
525 } pst_holder;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
526
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
527
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
528 typedef struct pst_subblock {
52
034641c26ab9 code cleanup
carl
parents: 51
diff changeset
529 char *buf;
034641c26ab9 code cleanup
carl
parents: 51
diff changeset
530 size_t read_size;
034641c26ab9 code cleanup
carl
parents: 51
diff changeset
531 size_t i_offset;
49
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
532 } pst_subblock;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
533
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
534
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
535 typedef struct pst_subblocks {
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
536 size_t subblock_count;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
537 pst_subblock *subs;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
538 } pst_subblocks;
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
539
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
540
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
541 // prototypes
59
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 52
diff changeset
542 int pst_open(pst_file *pf, char *name);
46
b2a7f2e0926a more fixes for 64 bit format
carl
parents: 44
diff changeset
543 int pst_close(pst_file *pf);
b2a7f2e0926a more fixes for 64 bit format
carl
parents: 44
diff changeset
544 pst_desc_ll * pst_getTopOfFolders(pst_file *pf, pst_item *root);
52
034641c26ab9 code cleanup
carl
parents: 51
diff changeset
545 size_t pst_attach_to_mem(pst_file *pf, pst_item_attach *attach, char **b);
46
b2a7f2e0926a more fixes for 64 bit format
carl
parents: 44
diff changeset
546 size_t pst_attach_to_file(pst_file *pf, pst_item_attach *attach, FILE* fp);
b2a7f2e0926a more fixes for 64 bit format
carl
parents: 44
diff changeset
547 size_t pst_attach_to_file_base64(pst_file *pf, pst_item_attach *attach, FILE* fp);
b2a7f2e0926a more fixes for 64 bit format
carl
parents: 44
diff changeset
548 int pst_load_index (pst_file *pf);
b2a7f2e0926a more fixes for 64 bit format
carl
parents: 44
diff changeset
549 pst_desc_ll* pst_getNextDptr(pst_desc_ll* d);
b2a7f2e0926a more fixes for 64 bit format
carl
parents: 44
diff changeset
550 int pst_load_extended_attributes(pst_file *pf);
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
551
123
ab2a11e72250 more cleanup of #include files.
Carl Byington <carl@five-ten-sg.com>
parents: 122
diff changeset
552 int pst_build_id_ptr(pst_file *pf, uint64_t offset, int32_t depth, uint64_t linku1, uint64_t start_val, uint64_t end_val);
ab2a11e72250 more cleanup of #include files.
Carl Byington <carl@five-ten-sg.com>
parents: 122
diff changeset
553 int pst_build_desc_ptr(pst_file *pf, uint64_t offset, int32_t depth, uint64_t linku1, uint64_t start_val, uint64_t end_val);
46
b2a7f2e0926a more fixes for 64 bit format
carl
parents: 44
diff changeset
554 pst_item* pst_getItem(pst_file *pf, pst_desc_ll *d_ptr);
b2a7f2e0926a more fixes for 64 bit format
carl
parents: 44
diff changeset
555 pst_item* pst_parse_item (pst_file *pf, pst_desc_ll *d_ptr);
48
f66078abed38 more fixes for 64 bit format
carl
parents: 47
diff changeset
556 pst_num_array* pst_parse_block(pst_file *pf, uint64_t block_id, pst_index2_ll *i2_head, pst_num_array *na_head);
46
b2a7f2e0926a more fixes for 64 bit format
carl
parents: 44
diff changeset
557 int pst_process(pst_num_array *list, pst_item *item, pst_item_attach *attach);
b2a7f2e0926a more fixes for 64 bit format
carl
parents: 44
diff changeset
558 void pst_free_list(pst_num_array *list);
b2a7f2e0926a more fixes for 64 bit format
carl
parents: 44
diff changeset
559 void pst_freeItem(pst_item *item);
b2a7f2e0926a more fixes for 64 bit format
carl
parents: 44
diff changeset
560 void pst_free_id2(pst_index2_ll * head);
b2a7f2e0926a more fixes for 64 bit format
carl
parents: 44
diff changeset
561 void pst_free_id (pst_index_ll *head);
b2a7f2e0926a more fixes for 64 bit format
carl
parents: 44
diff changeset
562 void pst_free_desc (pst_desc_ll *head);
b2a7f2e0926a more fixes for 64 bit format
carl
parents: 44
diff changeset
563 void pst_free_xattrib(pst_x_attrib_ll *x);
49
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
564 int pst_getBlockOffsetPointer(pst_file *pf, pst_index2_ll *i2_head, pst_subblocks *subblocks, uint32_t offset, pst_block_offset_pointer *p);
52
034641c26ab9 code cleanup
carl
parents: 51
diff changeset
565 int pst_getBlockOffset(char *buf, size_t read_size, uint32_t i_offset, uint32_t offset, pst_block_offset *p);
46
b2a7f2e0926a more fixes for 64 bit format
carl
parents: 44
diff changeset
566 pst_index2_ll* pst_build_id2(pst_file *pf, pst_index_ll* list, pst_index2_ll* head_ptr);
b2a7f2e0926a more fixes for 64 bit format
carl
parents: 44
diff changeset
567 pst_index_ll* pst_getID(pst_file* pf, uint64_t id);
b2a7f2e0926a more fixes for 64 bit format
carl
parents: 44
diff changeset
568 pst_index_ll* pst_getID2(pst_index2_ll * ptr, uint64_t id);
b2a7f2e0926a more fixes for 64 bit format
carl
parents: 44
diff changeset
569 pst_desc_ll* pst_getDptr(pst_file *pf, uint64_t id);
123
ab2a11e72250 more cleanup of #include files.
Carl Byington <carl@five-ten-sg.com>
parents: 122
diff changeset
570 size_t pst_read_block_size(pst_file *pf, uint64_t offset, size_t size, char **buf);
79
56fa05fd5271 Patch from Robert Simpson for encryption type 2.
Carl Byington <carl@five-ten-sg.com>
parents: 75
diff changeset
571 int pst_decrypt(uint64_t id, char *buf, size_t size, unsigned char type);
46
b2a7f2e0926a more fixes for 64 bit format
carl
parents: 44
diff changeset
572 uint64_t pst_getIntAt(pst_file *pf, char *buf);
123
ab2a11e72250 more cleanup of #include files.
Carl Byington <carl@five-ten-sg.com>
parents: 122
diff changeset
573 uint64_t pst_getIntAtPos(pst_file *pf, uint64_t pos);
ab2a11e72250 more cleanup of #include files.
Carl Byington <carl@five-ten-sg.com>
parents: 122
diff changeset
574 size_t pst_getAtPos(pst_file *pf, uint64_t pos, void* buf, size_t size);
52
034641c26ab9 code cleanup
carl
parents: 51
diff changeset
575 size_t pst_ff_getIDblock_dec(pst_file *pf, uint64_t id, char **b);
034641c26ab9 code cleanup
carl
parents: 51
diff changeset
576 size_t pst_ff_getIDblock(pst_file *pf, uint64_t id, char** b);
034641c26ab9 code cleanup
carl
parents: 51
diff changeset
577 size_t pst_ff_getID2block(pst_file *pf, uint64_t id2, pst_index2_ll *id2_head, char** buf);
49
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
578 size_t pst_ff_getID2data(pst_file *pf, pst_index_ll *ptr, pst_holder *h);
17654fbdf76b more fixes for 64 bit format
carl
parents: 48
diff changeset
579 size_t pst_ff_compile_ID(pst_file *pf, uint64_t id, pst_holder *h, size_t size);
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
580
46
b2a7f2e0926a more fixes for 64 bit format
carl
parents: 44
diff changeset
581 int pst_strincmp(char *a, char *b, size_t x);
b2a7f2e0926a more fixes for 64 bit format
carl
parents: 44
diff changeset
582 int pst_stricmp(char *a, char *b);
b2a7f2e0926a more fixes for 64 bit format
carl
parents: 44
diff changeset
583 size_t pst_fwrite(const void*ptr, size_t size, size_t nmemb, FILE*stream);
47
5fb8d997feed more fixes for 64 bit format
carl
parents: 46
diff changeset
584 char * pst_wide_to_single(char *wt, size_t size);
43
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
585
46
b2a7f2e0926a more fixes for 64 bit format
carl
parents: 44
diff changeset
586 char * pst_rfc2426_escape(char *str);
b2a7f2e0926a more fixes for 64 bit format
carl
parents: 44
diff changeset
587 int pst_chr_count(char *str, char x);
b2a7f2e0926a more fixes for 64 bit format
carl
parents: 44
diff changeset
588 char * pst_rfc2425_datetime_format(FILETIME *ft);
b2a7f2e0926a more fixes for 64 bit format
carl
parents: 44
diff changeset
589 char * pst_rfc2445_datetime_format(FILETIME *ft);
43
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
590
51
06c0262ad689 code cleanup
carl
parents: 50
diff changeset
591 void pst_printDptr(pst_file *pf, pst_desc_ll *ptr);
06c0262ad689 code cleanup
carl
parents: 50
diff changeset
592 void pst_printIDptr(pst_file* pf);
06c0262ad689 code cleanup
carl
parents: 50
diff changeset
593 void pst_printID2ptr(pst_index2_ll *ptr);
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
594
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
595 #endif // defined LIBPST_H