Add licensing info
[mono.git] / mcs / class / System.Web / System.Web.Mail / MailHeader.cs
1 //
2 // System.Web.Mail.MailHeader.cs
3 //
4 // Author(s):
5 //   Per Arneng <pt99par@student.bth.se>
6 //
7 //
8
9 //
10 // Permission is hereby granted, free of charge, to any person obtaining
11 // a copy of this software and associated documentation files (the
12 // "Software"), to deal in the Software without restriction, including
13 // without limitation the rights to use, copy, modify, merge, publish,
14 // distribute, sublicense, and/or sell copies of the Software, and to
15 // permit persons to whom the Software is furnished to do so, subject to
16 // the following conditions:
17 // 
18 // The above copyright notice and this permission notice shall be
19 // included in all copies or substantial portions of the Software.
20 // 
21 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
22 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
24 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
25 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
26 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
27 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28 //
29 using System;
30 using System.Collections;
31 using System.Collections.Specialized;
32
33 namespace System.Web.Mail {
34     
35     // This class represents the header of a mail with
36     // all the header fields.
37     internal class MailHeader {
38         
39         protected NameValueCollection data = new NameValueCollection();
40         
41         public string To {
42             get { return data[ "To" ]; }
43             set { data[ "To" ] = value; }
44         }
45
46         public string From {
47             get { return data[ "From" ]; }
48             set { data[ "From" ] = value; }
49         }
50
51         public string Cc {
52             get { return data[ "Cc" ]; }
53             set { data[ "Cc" ] = value; }
54         }
55         
56         public string Bcc {
57             get { return data[ "Bcc" ]; }
58             set { data[ "Bcc" ] = value; }
59         }
60         
61         public string Subject {
62             get { return data[ "Subject" ]; }
63             set { data[ "Subject" ] = value; }
64         }
65
66         public string Importance {
67             get { return data[ "Importance" ]; }
68             set { data[ "Importance" ] = value; }
69         }
70         
71         public string Priority {
72             get { return data[ "Priority" ]; }
73             set { data[ "Priority" ] = value; }
74         }
75         
76         public string MimeVersion {
77             get { return data[ "Mime-Version" ]; }
78             set { data[ "Mime-Version" ] = value; }
79         }
80
81         public string ContentType {
82             get { return data[ "Content-Type" ]; }
83             set { data[ "Content-Type" ] = value; }
84         } 
85         
86         public string ContentTransferEncoding{
87             get { return data[ "Content-Transfer-Encoding" ]; }
88             set { data[ "Content-Transfer-Encoding" ] = value; }
89         } 
90
91         public string ContentDisposition {
92             get { return data[ "Content-Disposition" ]; }
93             set { data[ "Content-Disposition" ] = value; }
94         } 
95
96         public string ContentBase {
97             get { return data[ "Content-Base" ]; }
98             set { data[ "Content-Base" ] = value; }
99         }
100         
101         public string ContentLocation {
102             get { return data[ "Content-Location" ]; }
103             set { data[ "Content-Location" ] = value; }
104         }       
105         
106         
107         public NameValueCollection Data {
108            get { return data; } 
109         }
110         
111     }
112
113 }