-
Notifications
You must be signed in to change notification settings - Fork 21
/
tnef-types.h
134 lines (122 loc) · 3.08 KB
/
tnef-types.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
/*
* Yerase's TNEF Stream Reader Library
* Copyright (C) 2003 Randall E. Hand
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* You can contact me at randall.hand@gmail.com for questions or assistance
*/
#ifndef _TNEF_TYPES_H_
#define _TNEF_TYPES_H_
#define BYTE unsigned char
#define WORD unsigned short int
#define DWORD unsigned int
#define ULONG unsigned int
#define DDWORD unsigned long long
typedef struct {
WORD atyp;
ULONG ulPosition;
WORD dxWidth;
WORD dyHeight;
DWORD dwFlags;
} renddata;
/* ----------------------------------- */
/* TNEF Down-level Date/Time Structure */
/* ----------------------------------- */
typedef struct {
WORD wYear;
WORD wMonth;
WORD wDay;
WORD wHour;
WORD wMinute;
WORD wSecond;
WORD wDayOfWeek;
} dtr;
typedef struct {
BYTE *data;
int size;
} variableLength;
typedef struct {
DWORD custom;
BYTE guid[16];
DWORD id;
ULONG count;
int namedproperty;
variableLength *propnames;
variableLength *data;
} MAPIProperty;
typedef struct MAPIProps {
DWORD count;
MAPIProperty *properties;
} MAPIProps;
typedef struct Attachment {
dtr Date;
variableLength Title;
variableLength MetaFile;
dtr CreateDate;
dtr ModifyDate;
variableLength TransportFilename;
renddata RenderData;
MAPIProps MAPI;
struct Attachment *next;
variableLength FileData;
variableLength IconData;
} Attachment;
typedef struct _TNEFIOStruct {
int (*InitProc)(struct _TNEFIOStruct *IO);
int (*ReadProc)(struct _TNEFIOStruct *IO, int size, int count, void *dest);
int (*CloseProc)(struct _TNEFIOStruct *IO);
void *data;
} TNEFIOStruct;
typedef struct {
char *filename;
FILE *fptr;
int Debug;
} TNEFFileInfo;
typedef struct {
BYTE *dataStart;
BYTE *ptr;
long size;
int Debug;
} TNEFMemInfo;
typedef struct {
char version[16];
variableLength from;
variableLength subject;
dtr dateSent;
dtr dateReceived;
char messageStatus[10];
char messageClass[50];
char messageID[50];
char parentID[50];
char conversationID[50];
variableLength body;
char priority[10];
Attachment starting_attach;
dtr dateModified;
MAPIProps MapiProperties;
variableLength CodePage;
variableLength OriginalMessageClass;
variableLength Owner;
variableLength SentFor;
variableLength Delegate;
dtr DateStart;
dtr DateEnd;
variableLength AidOwner;
int RequestRes;
int Debug;
TNEFIOStruct IO;
} TNEFStruct;
#endif