annotate src/libpst.h @ 44:d4606d460daf

more fixes for 64 bit format
author carl
date Tue, 08 Jan 2008 16:19:26 -0800
parents f6db1f060a95
children b2a7f2e0926a
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
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
5 * dave.s@earthcorp.com
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
43
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
13 #include <stdint.h>
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
14
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
15 #ifndef _MSC_VER
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
17 #ifndef FILETIME_DEFINED
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
18 #define FILETIME_DEFINED
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
19 //Win32 Filetime struct - copied from WINE
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
20 typedef struct {
43
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
21 uint32_t dwLowDateTime;
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
22 uint32_t dwHighDateTime;
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
23 } FILETIME;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
24 #endif //ifndef FILETIME_DEFINED
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
25 #endif //ifndef _MSC_VER
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
26
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
27 // According to Jan Wolter, sys/param.h is the most portable source of endian
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
28 // information on UNIX systems. see http://www.unixpapa.com/incnote/byteorder.html
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
29 #ifdef _MSC_VER
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
30 #define BYTE_ORDER LITTLE_ENDIAN
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
31 #else
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
32 #include <sys/param.h>
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
33 #endif // defined _MSC_VER
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
34
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
35 #if BYTE_ORDER == BIG_ENDIAN
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
36 # define LE64_CPU(x) \
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
37 x = ((((x) & 0xff00000000000000) >> 56) | \
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
38 (((x) & 0x00ff000000000000) >> 40) | \
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
39 (((x) & 0x0000ff0000000000) >> 24) | \
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
40 (((x) & 0x000000ff00000000) >> 8 ) | \
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
41 (((x) & 0x00000000ff000000) << 8 ) | \
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
42 (((x) & 0x0000000000ff0000) << 24) | \
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
43 (((x) & 0x000000000000ff00) << 40) | \
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
44 (((x) & 0x00000000000000ff) << 56));
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
45 # define LE32_CPU(x) \
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
46 x = ((((x) & 0xff000000) >> 24) | \
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
47 (((x) & 0x00ff0000) >> 8 ) | \
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
48 (((x) & 0x0000ff00) << 8 ) | \
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
49 (((x) & 0x000000ff) << 24));
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
50 # define LE16_CPU(x) \
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
51 x = ((((x) & 0xff00) >> 8) | \
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
52 (((x) & 0x00ff) << 8));
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
53 #elif BYTE_ORDER == LITTLE_ENDIAN
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
54 # define LE64_CPU(x) {}
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
55 # define LE32_CPU(x) {}
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
56 # define LE16_CPU(x) {}
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
57 #else
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
58 # error "Byte order not supported by this library"
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
59 #endif // BYTE_ORDER
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
60
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
61
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
62 #ifdef _MSC_VER
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
63 #include "windows.h"
44
d4606d460daf more fixes for 64 bit format
carl
parents: 43
diff changeset
64 #define int32_t int
43
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
65 #define uint32_t unsigned int
44
d4606d460daf more fixes for 64 bit format
carl
parents: 43
diff changeset
66 #define int16_t short int
43
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
67 #define uint16_t unsigned short int
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
68 #endif // _MSC_VER
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
69
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
70 #define PST_TYPE_NOTE 1
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
71 #define PST_TYPE_APPOINTMENT 8
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
72 #define PST_TYPE_CONTACT 9
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
73 #define PST_TYPE_JOURNAL 10
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
74 #define PST_TYPE_STICKYNOTE 11
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
75 #define PST_TYPE_TASK 12
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
76 #define PST_TYPE_OTHER 13
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
77 #define PST_TYPE_REPORT 14
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
78
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
79 // defines whether decryption is done on this bit of data
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
80 #define PST_NO_ENC 0
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
81 #define PST_ENC 1
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
82
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
83 // defines types of possible encryption
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
84 #define PST_NO_ENCRYPT 0
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
85 #define PST_COMP_ENCRYPT 1
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
86 #define PST_ENCRYPT 2
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
87
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
88 // defines different types of mappings
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
89 #define PST_MAP_ATTRIB 1
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
90 #define PST_MAP_HEADER 2
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
91
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
92 // define my custom email attributes.
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
93 #define PST_ATTRIB_HEADER -1
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
94
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
95 // defines types of free/busy values for appointment->showas
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
96 #define PST_FREEBUSY_FREE 0
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
97 #define PST_FREEBUSY_TENTATIVE 1
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
98 #define PST_FREEBUSY_BUSY 2
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
99 #define PST_FREEBUSY_OUT_OF_OFFICE 3
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
100
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
101 // defines labels for appointment->label
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
102 #define PST_APP_LABEL_NONE 0 // None
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
103 #define PST_APP_LABEL_IMPORTANT 1 // Important
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
104 #define PST_APP_LABEL_BUSINESS 2 // Business
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
105 #define PST_APP_LABEL_PERSONAL 3 // Personal
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
106 #define PST_APP_LABEL_VACATION 4 // Vacation
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
107 #define PST_APP_LABEL_MUST_ATTEND 5 // Must Attend
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
108 #define PST_APP_LABEL_TRAVEL_REQ 6 // Travel Required
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
109 #define PST_APP_LABEL_NEEDS_PREP 7 // Needs Preparation
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
110 #define PST_APP_LABEL_BIRTHDAY 8 // Birthday
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
111 #define PST_APP_LABEL_ANNIVERSARY 9 // Anniversary
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
112 #define PST_APP_LABEL_PHONE_CALL 10// Phone Call
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
113
43
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
114 extern int do_read64;
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
115
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
116 typedef struct _pst_misc_6_struct {
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
117 int32_t i1;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
118 int32_t i2;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
119 int32_t i3;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
120 int32_t i4;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
121 int32_t i5;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
122 int32_t i6;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
123 } pst_misc_6;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
124
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
125 typedef struct _pst_entryid_struct {
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
126 int32_t u1;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
127 char entryid[16];
43
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
128 uint32_t id;
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
129 } pst_entryid;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
130
43
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
131 typedef struct _pst_desc_struct32 {
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
132 uint32_t d_id;
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
133 uint32_t desc_id;
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
134 uint32_t list_id;
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
135 uint32_t parent_id;
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
136 } pst_desc32;
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
137
43
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
138 typedef struct _pst_desc_structn {
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
139 uint64_t d_id;
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
140 uint64_t desc_id;
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
141 uint64_t list_id;
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
142 uint32_t parent_id; // not 64 bit ??
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
143 uint32_t u1; // padding
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
144 } pst_descn;
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
145
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
146 typedef struct _pst_index_struct32 {
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
147 uint32_t id;
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
148 int32_t offset;
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
149 uint16_t size;
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
150 int16_t u1;
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
151 } pst_index32;
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
152
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
153 typedef struct _pst_index_struct {
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
154 uint64_t id;
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
155 int64_t offset;
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
156 uint16_t size;
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
157 int16_t u0;
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
158 int32_t u1;
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
159 } pst_index;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
160
43
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
161 typedef struct _pst_index_tree32 {
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
162 uint32_t id;
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
163 int32_t offset;
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
164 int32_t size;
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
165 int32_t u1;
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
166 struct _pst_index_tree * next;
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
167 } pst_index_ll32;
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
168
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
169 typedef struct _pst_index_tree {
43
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
170 uint64_t id;
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
171 int64_t offset;
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
172 int64_t size;
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
173 int64_t u1;
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
174 struct _pst_index_tree * next;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
175 } pst_index_ll;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
176
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
177 typedef struct _pst_index2_tree {
43
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
178 uint32_t id2;
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
179 pst_index_ll *id;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
180 struct _pst_index2_tree * next;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
181 } pst_index2_ll;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
182
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
183 typedef struct _pst_desc_tree {
43
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
184 uint32_t id;
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
185 pst_index_ll * list_index;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
186 pst_index_ll * desc;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
187 int32_t no_child;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
188 struct _pst_desc_tree * prev;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
189 struct _pst_desc_tree * next;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
190 struct _pst_desc_tree * parent;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
191 struct _pst_desc_tree * child;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
192 struct _pst_desc_tree * child_tail;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
193 } pst_desc_ll;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
194
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
195 typedef struct _pst_item_email_subject {
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
196 int32_t off1;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
197 int32_t off2;
43
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
198 char *subj;
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
199 } pst_item_email_subject;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
200
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
201 typedef struct _pst_item_email {
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
202 FILETIME *arrival_date;
41
183ae993b9ad security fix for potential buffer overrun in lz decompress
carl
parents: 39
diff changeset
203 int32_t autoforward; // 1 = true, 0 = not set, -1 = false
183ae993b9ad security fix for potential buffer overrun in lz decompress
carl
parents: 39
diff changeset
204 char *body;
183ae993b9ad security fix for potential buffer overrun in lz decompress
carl
parents: 39
diff changeset
205 char *cc_address;
183ae993b9ad security fix for potential buffer overrun in lz decompress
carl
parents: 39
diff changeset
206 char *common_name;
183ae993b9ad security fix for potential buffer overrun in lz decompress
carl
parents: 39
diff changeset
207 int32_t conv_index;
183ae993b9ad security fix for potential buffer overrun in lz decompress
carl
parents: 39
diff changeset
208 int32_t conversion_prohib;
183ae993b9ad security fix for potential buffer overrun in lz decompress
carl
parents: 39
diff changeset
209 int32_t delete_after_submit; // 1 = true, 0 = false
183ae993b9ad security fix for potential buffer overrun in lz decompress
carl
parents: 39
diff changeset
210 int32_t delivery_report; // 1 = true, 0 = false
183ae993b9ad security fix for potential buffer overrun in lz decompress
carl
parents: 39
diff changeset
211 char *encrypted_body;
183ae993b9ad security fix for potential buffer overrun in lz decompress
carl
parents: 39
diff changeset
212 int32_t encrypted_body_size;
183ae993b9ad security fix for potential buffer overrun in lz decompress
carl
parents: 39
diff changeset
213 char *encrypted_htmlbody;
183ae993b9ad security fix for potential buffer overrun in lz decompress
carl
parents: 39
diff changeset
214 int32_t encrypted_htmlbody_size;
183ae993b9ad security fix for potential buffer overrun in lz decompress
carl
parents: 39
diff changeset
215 int32_t flag;
183ae993b9ad security fix for potential buffer overrun in lz decompress
carl
parents: 39
diff changeset
216 char *header;
183ae993b9ad security fix for potential buffer overrun in lz decompress
carl
parents: 39
diff changeset
217 char *htmlbody;
183ae993b9ad security fix for potential buffer overrun in lz decompress
carl
parents: 39
diff changeset
218 int32_t importance;
183ae993b9ad security fix for potential buffer overrun in lz decompress
carl
parents: 39
diff changeset
219 char *in_reply_to;
183ae993b9ad security fix for potential buffer overrun in lz decompress
carl
parents: 39
diff changeset
220 int32_t message_cc_me; // 1 = true, 0 = false
183ae993b9ad security fix for potential buffer overrun in lz decompress
carl
parents: 39
diff changeset
221 int32_t message_recip_me; // 1 = true, 0 = false
183ae993b9ad security fix for potential buffer overrun in lz decompress
carl
parents: 39
diff changeset
222 int32_t message_to_me; // 1 = true, 0 = false
183ae993b9ad security fix for potential buffer overrun in lz decompress
carl
parents: 39
diff changeset
223 char *messageid;
183ae993b9ad security fix for potential buffer overrun in lz decompress
carl
parents: 39
diff changeset
224 int32_t orig_sensitivity;
183ae993b9ad security fix for potential buffer overrun in lz decompress
carl
parents: 39
diff changeset
225 char *outlook_recipient;
183ae993b9ad security fix for potential buffer overrun in lz decompress
carl
parents: 39
diff changeset
226 char *outlook_recipient2;
183ae993b9ad security fix for potential buffer overrun in lz decompress
carl
parents: 39
diff changeset
227 char *outlook_sender;
183ae993b9ad security fix for potential buffer overrun in lz decompress
carl
parents: 39
diff changeset
228 char *outlook_sender_name;
183ae993b9ad security fix for potential buffer overrun in lz decompress
carl
parents: 39
diff changeset
229 char *outlook_sender2;
183ae993b9ad security fix for potential buffer overrun in lz decompress
carl
parents: 39
diff changeset
230 int32_t priority;
183ae993b9ad security fix for potential buffer overrun in lz decompress
carl
parents: 39
diff changeset
231 char *proc_subject;
183ae993b9ad security fix for potential buffer overrun in lz decompress
carl
parents: 39
diff changeset
232 int32_t read_receipt;
183ae993b9ad security fix for potential buffer overrun in lz decompress
carl
parents: 39
diff changeset
233 char *recip_access;
183ae993b9ad security fix for potential buffer overrun in lz decompress
carl
parents: 39
diff changeset
234 char *recip_address;
183ae993b9ad security fix for potential buffer overrun in lz decompress
carl
parents: 39
diff changeset
235 char *recip2_access;
183ae993b9ad security fix for potential buffer overrun in lz decompress
carl
parents: 39
diff changeset
236 char *recip2_address;
183ae993b9ad security fix for potential buffer overrun in lz decompress
carl
parents: 39
diff changeset
237 int32_t reply_requested;
183ae993b9ad security fix for potential buffer overrun in lz decompress
carl
parents: 39
diff changeset
238 char *reply_to;
183ae993b9ad security fix for potential buffer overrun in lz decompress
carl
parents: 39
diff changeset
239 char *return_path_address;
183ae993b9ad security fix for potential buffer overrun in lz decompress
carl
parents: 39
diff changeset
240 int32_t rtf_body_char_count;
183ae993b9ad security fix for potential buffer overrun in lz decompress
carl
parents: 39
diff changeset
241 int32_t rtf_body_crc;
183ae993b9ad security fix for potential buffer overrun in lz decompress
carl
parents: 39
diff changeset
242 char *rtf_body_tag;
183ae993b9ad security fix for potential buffer overrun in lz decompress
carl
parents: 39
diff changeset
243 char *rtf_compressed;
43
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
244 uint32_t rtf_compressed_size;
41
183ae993b9ad security fix for potential buffer overrun in lz decompress
carl
parents: 39
diff changeset
245 int32_t rtf_in_sync; // 1 = true, 0 = doesn't exist, -1 = false
183ae993b9ad security fix for potential buffer overrun in lz decompress
carl
parents: 39
diff changeset
246 int32_t rtf_ws_prefix_count;
183ae993b9ad security fix for potential buffer overrun in lz decompress
carl
parents: 39
diff changeset
247 int32_t rtf_ws_trailing_count;
183ae993b9ad security fix for potential buffer overrun in lz decompress
carl
parents: 39
diff changeset
248 char *sender_access;
183ae993b9ad security fix for potential buffer overrun in lz decompress
carl
parents: 39
diff changeset
249 char *sender_address;
183ae993b9ad security fix for potential buffer overrun in lz decompress
carl
parents: 39
diff changeset
250 char *sender2_access;
183ae993b9ad security fix for potential buffer overrun in lz decompress
carl
parents: 39
diff changeset
251 char *sender2_address;
183ae993b9ad security fix for potential buffer overrun in lz decompress
carl
parents: 39
diff changeset
252 int32_t sensitivity;
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
253 FILETIME *sent_date;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
254 pst_entryid *sentmail_folder;
41
183ae993b9ad security fix for potential buffer overrun in lz decompress
carl
parents: 39
diff changeset
255 char *sentto_address;
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
256 pst_item_email_subject *subject;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
257 } pst_item_email;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
258
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
259 typedef struct _pst_item_folder {
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
260 int32_t email_count;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
261 int32_t unseen_email_count;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
262 int32_t assoc_count;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
263 char subfolder;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
264 } pst_item_folder;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
265
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
266 typedef struct _pst_item_message_store {
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
267 pst_entryid *deleted_items_folder;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
268 pst_entryid *search_root_folder;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
269 pst_entryid *top_of_personal_folder;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
270 pst_entryid *top_of_folder;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
271 int32_t valid_mask; // what folders the message store contains
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
272 int32_t pwd_chksum;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
273 } pst_item_message_store;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
274
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
275 typedef struct _pst_item_contact {
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
276 char *access_method;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
277 char *account_name;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
278 char *address1;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
279 char *address1a;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
280 char *address1_desc;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
281 char *address1_transport;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
282 char *address2;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
283 char *address2a;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
284 char *address2_desc;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
285 char *address2_transport;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
286 char *address3;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
287 char *address3a;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
288 char *address3_desc;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
289 char *address3_transport;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
290 char *assistant_name;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
291 char *assistant_phone;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
292 char *billing_information;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
293 FILETIME *birthday;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
294 char *business_address;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
295 char *business_city;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
296 char *business_country;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
297 char *business_fax;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
298 char *business_homepage;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
299 char *business_phone;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
300 char *business_phone2;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
301 char *business_po_box;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
302 char *business_postal_code;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
303 char *business_state;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
304 char *business_street;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
305 char *callback_phone;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
306 char *car_phone;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
307 char *company_main_phone;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
308 char *company_name;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
309 char *computer_name;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
310 char *customer_id;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
311 char *def_postal_address;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
312 char *department;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
313 char *display_name_prefix;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
314 char *first_name;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
315 char *followup;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
316 char *free_busy_address;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
317 char *ftp_site;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
318 char *fullname;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
319 int32_t gender;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
320 char *gov_id;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
321 char *hobbies;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
322 char *home_address;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
323 char *home_city;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
324 char *home_country;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
325 char *home_fax;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
326 char *home_phone;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
327 char *home_phone2;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
328 char *home_po_box;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
329 char *home_postal_code;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
330 char *home_state;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
331 char *home_street;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
332 char *initials;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
333 char *isdn_phone;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
334 char *job_title;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
335 char *keyword;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
336 char *language;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
337 char *location;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
338 int32_t mail_permission;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
339 char *manager_name;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
340 char *middle_name;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
341 char *mileage;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
342 char *mobile_phone;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
343 char *nickname;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
344 char *office_loc;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
345 char *org_id;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
346 char *other_address;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
347 char *other_city;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
348 char *other_country;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
349 char *other_phone;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
350 char *other_po_box;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
351 char *other_postal_code;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
352 char *other_state;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
353 char *other_street;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
354 char *pager_phone;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
355 char *personal_homepage;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
356 char *pref_name;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
357 char *primary_fax;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
358 char *primary_phone;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
359 char *profession;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
360 char *radio_phone;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
361 int32_t rich_text;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
362 char *spouse_name;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
363 char *suffix;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
364 char *surname;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
365 char *telex;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
366 char *transmittable_display_name;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
367 char *ttytdd_phone;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
368 FILETIME *wedding_anniversary;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
369 } pst_item_contact;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
370
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
371 typedef struct _pst_item_attach {
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
372 char *filename1;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
373 char *filename2;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
374 char *mimetype;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
375 char *data;
36
6fe121a971c9 valgrind fixes
carl
parents: 35
diff changeset
376 size_t size;
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
377 int32_t id2_val;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
378 int32_t id_val; // calculated from id2_val during creation of record
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
379 int32_t method;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
380 int32_t position;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
381 int32_t sequence;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
382 struct _pst_item_attach *next;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
383 } pst_item_attach;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
384
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
385 typedef struct _pst_item_extra_field {
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
386 char *field_name;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
387 char *value;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
388 struct _pst_item_extra_field *next;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
389 } pst_item_extra_field;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
390
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
391 typedef struct _pst_item_journal {
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
392 FILETIME *end;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
393 FILETIME *start;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
394 char *type;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
395 } pst_item_journal;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
396
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
397 typedef struct _pst_item_appointment {
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
398 FILETIME *end;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
399 char *location;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
400 FILETIME *reminder;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
401 FILETIME *start;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
402 char *timezonestring;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
403 int32_t showas;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
404 int32_t label;
31
b88ceb81dba2 mege changes from Joe Nahmias
carl
parents: 28
diff changeset
405 int32_t all_day;
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
406 } pst_item_appointment;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
407
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
408 typedef struct _pst_item {
43
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
409 struct _pst_item_email *email; // data reffering to email
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
410 struct _pst_item_folder *folder; // data reffering to folder
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
411 struct _pst_item_contact *contact; // data reffering to contact
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
412 struct _pst_item_attach *attach; // linked list of attachments
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
413 struct _pst_item_message_store *message_store; // data referring to the message store
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
414 struct _pst_item_extra_field *extra_fields; // linked list of extra headers and such
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
415 struct _pst_item_journal *journal; // data reffering to a journal entry
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
416 struct _pst_item_appointment *appointment; // data reffering to a calendar entry
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
417 int32_t type;
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
418 char *ascii_type;
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
419 char *file_as;
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
420 char *comment;
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
421 int32_t message_size;
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
422 char *outlook_version;
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
423 char *record_key; // probably 16 bytes long.
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
424 size_t record_key_size;
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
425 int32_t response_requested;
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
426 FILETIME *create_date;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
427 FILETIME *modify_date;
43
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
428 int32_t private_member;
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
429 } pst_item;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
430
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
431 typedef struct _pst_x_attrib_ll {
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
432 int32_t type;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
433 int32_t mytype;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
434 int32_t map;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
435 void *data;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
436 struct _pst_x_attrib_ll *next;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
437 } pst_x_attrib_ll;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
438
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
439 typedef struct _pst_file {
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
440 pst_index_ll *i_head, *i_tail;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
441 pst_index2_ll *i2_head;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
442 pst_desc_ll *d_head, *d_tail;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
443 pst_x_attrib_ll *x_head;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
444 int32_t index1;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
445 int32_t index1_count;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
446 int32_t index2;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
447 int32_t index2_count;
43
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
448 int64_t index1_64;
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
449 int64_t index1_count_64;
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
450 int64_t index2_64;
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
451 int64_t index2_count_64;
31
b88ceb81dba2 mege changes from Joe Nahmias
carl
parents: 28
diff changeset
452 FILE * fp; // file pointer to opened PST file
b88ceb81dba2 mege changes from Joe Nahmias
carl
parents: 28
diff changeset
453 size_t size; // pst file size
b88ceb81dba2 mege changes from Joe Nahmias
carl
parents: 28
diff changeset
454 unsigned char encryption; // pst encryption setting
b88ceb81dba2 mege changes from Joe Nahmias
carl
parents: 28
diff changeset
455 unsigned char ind_type; // pst index type
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
456 } pst_file;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
457
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
458 typedef struct _pst_block_offset {
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
459 int16_t from;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
460 int16_t to;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
461 } pst_block_offset;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
462
35
b2f247463b83 better decoding of 7c blocks
carl
parents: 34
diff changeset
463 typedef struct _pst_block_offset_pointer {
b2f247463b83 better decoding of 7c blocks
carl
parents: 34
diff changeset
464 unsigned char *from;
b2f247463b83 better decoding of 7c blocks
carl
parents: 34
diff changeset
465 unsigned char *to;
b2f247463b83 better decoding of 7c blocks
carl
parents: 34
diff changeset
466 int needfree;
b2f247463b83 better decoding of 7c blocks
carl
parents: 34
diff changeset
467 } pst_block_offset_pointer;
b2f247463b83 better decoding of 7c blocks
carl
parents: 34
diff changeset
468
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
469 struct _pst_num_item {
43
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
470 uint32_t id;
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
471 unsigned char *data;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
472 int32_t type;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
473 size_t size;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
474 char *extra;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
475 };
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
476
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
477 typedef struct _pst_num_array {
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
478 int32_t count_item;
39
2ad7ef0a3c4f more valgrind fixes
carl
parents: 36
diff changeset
479 int32_t orig_count;
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
480 int32_t count_array;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
481 struct _pst_num_item ** items;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
482 struct _pst_num_array *next;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
483 } pst_num_array;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
484
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
485 struct holder {
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
486 unsigned char **buf;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
487 FILE * fp;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
488 int32_t base64;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
489 char base64_extra_chars[3];
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
490 int32_t base64_extra;
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
491 };
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
492
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
493 // prototypes
43
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
494 void set_read64();
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
495 int32_t pst_open(pst_file *pf, char *name, char *mode);
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
496 int32_t pst_close(pst_file *pf);
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
497 pst_desc_ll * pst_getTopOfFolders(pst_file *pf, pst_item *root);
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
498 int32_t pst_attach_to_mem(pst_file *pf, pst_item_attach *attach, unsigned char **b);
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
499 int32_t pst_attach_to_file(pst_file *pf, pst_item_attach *attach, FILE* fp);
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
500 int32_t pst_attach_to_file_base64(pst_file *pf, pst_item_attach *attach, FILE* fp);
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
501 int32_t pst_load_index (pst_file *pf);
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
502 pst_desc_ll* pst_getNextDptr(pst_desc_ll* d);
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
503 int32_t pst_load_extended_attributes(pst_file *pf);
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
504
43
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
505 int32_t _pst_build_id_ptr(pst_file *pf, off_t offset, int32_t depth, int64_t linku1, uint64_t start_val, uint64_t end_val);
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
506 int32_t _pst_build_desc_ptr (pst_file *pf, off_t offset, int32_t depth, int64_t linku1, uint64_t *high_id, uint64_t start_id, uint64_t end_val);
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
507 pst_item* _pst_getItem(pst_file *pf, pst_desc_ll *d_ptr);
44
d4606d460daf more fixes for 64 bit format
carl
parents: 43
diff changeset
508 pst_item* _pst_parse_item (pst_file *pf, pst_desc_ll *d_ptr);
43
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
509 pst_num_array * _pst_parse_block(pst_file *pf, uint32_t block_id, pst_index2_ll *i2_head);
39
2ad7ef0a3c4f more valgrind fixes
carl
parents: 36
diff changeset
510 int32_t _pst_process(pst_num_array *list, pst_item *item, pst_item_attach *attach);
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
511 int32_t _pst_free_list(pst_num_array *list);
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
512 void _pst_freeItem(pst_item *item);
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
513 int32_t _pst_free_id2(pst_index2_ll * head);
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
514 int32_t _pst_free_id (pst_index_ll *head);
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
515 int32_t _pst_free_desc (pst_desc_ll *head);
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
516 int32_t _pst_free_xattrib(pst_x_attrib_ll *x);
35
b2f247463b83 better decoding of 7c blocks
carl
parents: 34
diff changeset
517 int32_t _pst_getBlockOffsetPointer(pst_file *pf, pst_index2_ll *i2_head, unsigned char *buf, int32_t read_size, int32_t i_offset, int32_t offset, pst_block_offset_pointer *p);
31
b88ceb81dba2 mege changes from Joe Nahmias
carl
parents: 28
diff changeset
518 int32_t _pst_getBlockOffset(unsigned char *buf, int32_t read_size, int32_t i_offset, int32_t offset, pst_block_offset *p);
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
519 pst_index2_ll * _pst_build_id2(pst_file *pf, pst_index_ll* list, pst_index2_ll* head_ptr);
43
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
520 pst_index_ll * _pst_getID(pst_file* pf, uint64_t id);
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
521 pst_index_ll * _pst_getID2(pst_index2_ll * ptr, uint32_t id);
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
522 pst_desc_ll * _pst_getDptr(pst_file *pf, uint32_t id);
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
523 size_t _pst_read_block_size(pst_file *pf, off_t offset, size_t size, char **buf, int32_t do_enc, unsigned char is_index);
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
524 int32_t _pst_decrypt(unsigned char *buf, size_t size, int32_t type);
43
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
525 int64_t _getIntAt(char *buf);
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
526 int64_t _pst_getIntAtPos(FILE *fp, off_t pos);
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
527 int32_t _pst_getAtPos(FILE *fp, off_t pos, void* buf, uint32_t size);
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
528 int32_t _pst_get (FILE *fp, void *buf, uint32_t size);
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
529 size_t _pst_ff_getIDblock_dec(pst_file *pf, uint32_t id, unsigned char **b);
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
530 size_t _pst_ff_getIDblock(pst_file *pf, uint32_t id, unsigned char** b);
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
531 size_t _pst_ff_getID2block(pst_file *pf, uint32_t id2, pst_index2_ll *id2_head, unsigned char** buf);
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
532 size_t _pst_ff_getID2data(pst_file *pf, pst_index_ll *ptr, struct holder *h);
43
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
533 size_t _pst_ff_compile_ID(pst_file *pf, uint32_t id, struct holder *h, int32_t size);
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
534
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
535 int32_t pst_strincmp(char *a, char *b, int32_t x);
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
536 int32_t pst_stricmp(char *a, char *b);
43
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
537 size_t pst_fwrite(const void*ptr, size_t size, size_t nmemb, FILE*stream);
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
538 char * _pst_wide_to_single(char *wt, int32_t size);
43
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
539
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
540 char *pst_rfc2426_escape(char *str);
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
541 int pst_chr_count(char *str, char x);
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
542 char *pst_rfc2425_datetime_format(FILETIME *ft);
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
543 char *pst_rfc2445_datetime_format(FILETIME *ft);
f6db1f060a95 start on outlook 2003 64 bit format
carl
parents: 41
diff changeset
544
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
545 // DEBUG functions
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
546 int32_t _pst_printDptr(pst_file *pf);
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
547 int32_t _pst_printIDptr(pst_file* pf);
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
548 int32_t _pst_printID2ptr(pst_index2_ll *ptr);
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
549 void * xmalloc(size_t size);
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
550
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
551 #endif // defined LIBPST_H