Browse code

- mime types for SIMPLE protocol (contributed by Jamey Hicks)

Bogdan-Andrei Iancu authored on 18/02/2005 21:09:41
Showing 2 changed files
... ...
@@ -74,7 +74,7 @@ static type_node_t type_tree[] = {
74 74
 					{'a',TYPE_UNKNOWN,1,-1},
75 75
 						{'g',TYPE_UNKNOWN,1,-1},
76 76
 							{'e',TYPE_MESSAGE,0,-1},
77
-	{'a',TYPE_UNKNOWN,1,-1},
77
+	{'a',TYPE_UNKNOWN,1,22},
78 78
 		{'p',TYPE_UNKNOWN,1,-1},
79 79
 			{'p',TYPE_UNKNOWN,1,-1},
80 80
 				{'l',TYPE_UNKNOWN,1,-1},
... ...
@@ -84,27 +84,107 @@ static type_node_t type_tree[] = {
84 84
 								{'t',TYPE_UNKNOWN,1,-1},
85 85
 									{'i',TYPE_UNKNOWN,1,-1},
86 86
 										{'o',TYPE_UNKNOWN,1,-1},
87
-											{'n',TYPE_APPLICATION,0,-1}
87
+											{'n',TYPE_APPLICATION,0,-1},
88
+	{'m',TYPE_UNKNOWN,1,-1},
89
+		{'u',TYPE_UNKNOWN,1,-1},
90
+			{'l',TYPE_UNKNOWN,1,-1},
91
+				{'t',TYPE_UNKNOWN,1,-1},
92
+					{'i',TYPE_UNKNOWN,1,-1},
93
+						{'p',TYPE_UNKNOWN,1,-1},
94
+							{'a',TYPE_UNKNOWN,1,-1},
95
+								{'r',TYPE_UNKNOWN,1,-1},
96
+									{'t',TYPE_MULTIPART,0,-1},
88 97
 	};
89 98
 
90 99
 static type_node_t subtype_tree[] = {
91
-		{'p',SUBTYPE_UNKNOWN,1,5},
92
-			{'l',SUBTYPE_UNKNOWN,1,-1},
93
-				{'a',SUBTYPE_UNKNOWN,1,-1},
100
+	{'p',SUBTYPE_UNKNOWN,2,13},
101
+		{'l',SUBTYPE_UNKNOWN,1,5},
102
+			{'a',SUBTYPE_UNKNOWN,1,-1},
103
+				{'i',SUBTYPE_UNKNOWN,1,-1},
104
+					{'n',SUBTYPE_PLAIN,0,-1},
105
+		{'i',SUBTYPE_UNKNOWN,1,-1},
106
+			{'d',SUBTYPE_UNKNOWN,1,-1},
107
+				{'f',SUBTYPE_UNKNOWN,1,-1},
94 108
 					{'i',SUBTYPE_UNKNOWN,1,-1},
95
-						{'n',SUBTYPE_PLAIN,0,-1},
96
-		{'c',SUBTYPE_UNKNOWN,1,10},
97
-			{'p',SUBTYPE_UNKNOWN,2,-1},
98
-				{'i',SUBTYPE_UNKNOWN,1,9},
99
-					{'m',SUBTYPE_CPIM,0,-1},
100
-				{'l',SUBTYPE_UNKNOWN,1,-1},
109
+						{'+',TYPE_UNKNOWN,1,-1},
110
+							{'x',TYPE_UNKNOWN,1,-1},
111
+								{'m',TYPE_UNKNOWN,1,-1},
112
+									{'l',SUBTYPE_PIDFXML,0,-1},
113
+	{'s',SUBTYPE_UNKNOWN,1,16},
114
+		{'d',SUBTYPE_UNKNOWN,1,-1},
115
+			{'p',SUBTYPE_SDP,0,-1},
116
+	{'c',SUBTYPE_UNKNOWN,1,25},
117
+		{'p',SUBTYPE_UNKNOWN,2,-1},
118
+			{'i',SUBTYPE_UNKNOWN,1,29},
119
+				{'m',SUBTYPE_CPIM,0,-1},
120
+			{'l',SUBTYPE_UNKNOWN,1,-1},
121
+				{'+',TYPE_UNKNOWN,1,-1},
122
+					{'x',TYPE_UNKNOWN,1,-1},
123
+						{'m',TYPE_UNKNOWN,1,-1},
124
+							{'l',SUBTYPE_CPLXML,0,-1},
125
+	{'r',SUBTYPE_UNKNOWN,2,39},
126
+		{'l',SUBTYPE_UNKNOWN,1,42},
127
+			{'m',SUBTYPE_UNKNOWN,1,-1},
128
+				{'i',SUBTYPE_UNKNOWN,1,-1},
101 129
 					{'+',TYPE_UNKNOWN,1,-1},
102 130
 						{'x',TYPE_UNKNOWN,1,-1},
103 131
 							{'m',TYPE_UNKNOWN,1,-1},
104
-								{'l',SUBTYPE_CPLXML,0,-1},
105
-		{'s',SUBTYPE_UNKNOWN,1,-1},
106
-			{'d',SUBTYPE_UNKNOWN,1,-1},
107
-				{'p',SUBTYPE_SDP,0,-1},
132
+								{'l',SUBTYPE_RLMIXML,0,-1},
133
+		{'e',SUBTYPE_UNKNOWN,1,-1},
134
+			{'l',SUBTYPE_UNKNOWN,1,-1},
135
+				{'a',SUBTYPE_UNKNOWN,1,-1},
136
+					{'t',SUBTYPE_UNKNOWN,1,-1},
137
+						{'e',SUBTYPE_UNKNOWN,1,-1},
138
+							{'d',SUBTYPE_RELATED,0,-1},
139
+	{'l',SUBTYPE_UNKNOWN,1,49},
140
+		{'p',SUBTYPE_UNKNOWN,1,-1},
141
+			{'i',SUBTYPE_UNKNOWN,1,-1},
142
+				{'d',SUBTYPE_UNKNOWN,1,-1},
143
+					{'f',SUBTYPE_UNKNOWN,1,-1},
144
+						{'i',SUBTYPE_UNKNOWN,1,-1},
145
+							{'+',TYPE_UNKNOWN,1,-1},
146
+								{'x',TYPE_UNKNOWN,1,-1},
147
+									{'m',TYPE_UNKNOWN,1,-1},
148
+										{'l',SUBTYPE_LPIDFXML,0,-1},
149
+	{'w',SUBTYPE_UNKNOWN,1,64},
150
+		{'a',SUBTYPE_UNKNOWN,1,-1},
151
+			{'t',SUBTYPE_UNKNOWN,1,-1},
152
+				{'c',SUBTYPE_UNKNOWN,1,-1},
153
+					{'h',SUBTYPE_UNKNOWN,1,-1},
154
+						{'e',SUBTYPE_UNKNOWN,1,-1},
155
+							{'r',SUBTYPE_UNKNOWN,1,-1},
156
+								{'i',TYPE_UNKNOWN,1,-1},
157
+									{'n',TYPE_UNKNOWN,1,-1},
158
+										{'f',TYPE_UNKNOWN,1,-1},
159
+											{'o',TYPE_UNKNOWN,1,-1},
160
+												{'+',TYPE_UNKNOWN,1,-1},
161
+													{'x',TYPE_UNKNOWN,1,-1},
162
+														{'m',TYPE_UNKNOWN,1,-1},
163
+															{'l',SUBTYPE_WATCHERINFOXML,0,-1},
164
+	{'x',SUBTYPE_UNKNOWN,1,74},
165
+		{'p',SUBTYPE_UNKNOWN,1,-1},
166
+			{'i',SUBTYPE_UNKNOWN,1,-1},
167
+				{'d',SUBTYPE_UNKNOWN,1,-1},
168
+					{'f',SUBTYPE_UNKNOWN,1,-1},
169
+						{'i',SUBTYPE_UNKNOWN,1,-1},
170
+							{'+',TYPE_UNKNOWN,1,-1},
171
+								{'x',TYPE_UNKNOWN,1,-1},
172
+									{'m',TYPE_UNKNOWN,1,-1},
173
+										{'l',SUBTYPE_XPIDFXML,0,-1},
174
+	{'e',SUBTYPE_UNKNOWN,1,-1},
175
+		{'x',SUBTYPE_UNKNOWN,1,-1},
176
+			{'t',SUBTYPE_UNKNOWN,1,-1},
177
+				{'e',SUBTYPE_UNKNOWN,1,-1},
178
+					{'r',SUBTYPE_UNKNOWN,1,-1},
179
+						{'n',SUBTYPE_UNKNOWN,1,-1},
180
+							{'a',TYPE_UNKNOWN,1,-1},
181
+								{'l',TYPE_UNKNOWN,1,-1},
182
+									{'-',TYPE_UNKNOWN,1,-1},
183
+										{'b',SUBTYPE_LPIDFXML,0,-1},
184
+											{'o',TYPE_UNKNOWN,1,-1},
185
+												{'d',TYPE_UNKNOWN,1,-1},
186
+													{'y',SUBTYPE_EXTERNAL_BODY,1,-1},
187
+
108 188
 	};
109 189
 
110 190
 
... ...
@@ -45,6 +45,7 @@ struct mime_type {
45 45
 #define TYPE_TEXT            1
46 46
 #define TYPE_MESSAGE         2
47 47
 #define TYPE_APPLICATION     3
48
+#define TYPE_MULTIPART       4
48 49
 #define TYPE_ALL             0xfe
49 50
 #define TYPE_UNKNOWN         0xff
50 51
 
... ...
@@ -52,6 +53,13 @@ struct mime_type {
52 52
 #define SUBTYPE_CPIM         2
53 53
 #define SUBTYPE_SDP          3
54 54
 #define SUBTYPE_CPLXML       4
55
+#define SUBTYPE_PIDFXML      5
56
+#define SUBTYPE_RLMIXML      6
57
+#define SUBTYPE_RELATED      7
58
+#define SUBTYPE_LPIDFXML     8
59
+#define SUBTYPE_XPIDFXML     9
60
+#define SUBTYPE_WATCHERINFOXML     10
61
+#define SUBTYPE_EXTERNAL_BODY      11
55 62
 #define SUBTYPE_ALL          0xfe
56 63
 #define SUBTYPE_UNKNOWN      0xff
57 64