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