]> gitweb.michael.orlitzky.com - dead/htnef.git/blob - src/tnef/object_name.hs
Initial commit.
[dead/htnef.git] / src / tnef / object_name.hs
1 --
2 -- Copyright Michael Orlitzky
3 --
4 -- http://michael.orlitzky.com/
5 --
6 -- This program is free software: you can redistribute it and/or modify
7 -- it under the terms of the GNU General Public License as published by
8 -- the Free Software Foundation, either version 3 of the License, or
9 -- (at your option) any later version.
10 --
11 -- This program is distributed in the hope that it will be useful,
12 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
13 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 -- GNU General Public License for more details.
15 --
16 -- http://www.fsf.org/licensing/licenses/gpl.html
17 --
18
19 module Tnef.ObjectName where
20
21 import Data.Word
22
23 -- These are the "names" for TNEF objects. They more or less specify
24 -- what type of object you've got, so I'm not sure what the "type"
25 -- field is for as a result.
26 data TnefObjectName = TnefObjectName { code :: Integer,
27 desc :: String }
28 instance Show TnefObjectName where
29 show = desc
30
31
32 tnef_object_names :: [TnefObjectName]
33 tnef_object_names = [ TnefObjectName 0x0000 "Owner",
34 TnefObjectName 0x0001 "Sent For",
35 TnefObjectName 0x0002 "Delegate",
36 TnefObjectName 0x0006 "Date Start",
37 TnefObjectName 0x0007 "Date End",
38 TnefObjectName 0x0008 "Owner Appointment ID",
39 TnefObjectName 0x0009 "Response Requested",
40 TnefObjectName 0x8000 "From",
41 TnefObjectName 0x8004 "Subject",
42 TnefObjectName 0x8005 "Date Sent",
43 TnefObjectName 0x8006 "Date Received",
44 TnefObjectName 0x8007 "Message Status",
45 TnefObjectName 0x8008 "Message Class",
46 TnefObjectName 0x8009 "Message ID",
47 TnefObjectName 0x800a "Parent ID",
48 TnefObjectName 0x800b "Conversation ID",
49 TnefObjectName 0x800c "Body",
50 TnefObjectName 0x800d "Priority",
51 TnefObjectName 0x800f "Attachment Data",
52 TnefObjectName 0x8010 "Attachment File Name",
53 TnefObjectName 0x8011 "Attachment Meta File",
54 TnefObjectName 0x8012 "Attachment Creation Date",
55 TnefObjectName 0x8013 "Attachment Modification Date",
56 TnefObjectName 0x8020 "Date Modified",
57 TnefObjectName 0x9001 "Attachment Transport Filename",
58 TnefObjectName 0x9002 "Attachment Rendering Data",
59 TnefObjectName 0x9003 "MAPI Properties",
60 TnefObjectName 0x9004 "Recipients",
61 TnefObjectName 0x9005 "Attachment",
62 TnefObjectName 0x9006 "TNEF Version",
63 TnefObjectName 0x9007 "OEM Codepage",
64 TnefObjectName 0x9008 "Original Message Class" ]
65
66
67 word_to_name :: Word16 -> TnefObjectName
68 word_to_name c = head [ x | x <- tnef_object_names, (code x) == read (show c)]