Fix the build.
[castle.git] / MonoRail / Castle.MonoRail.Framework / IRequest.cs
blobdb4800a28588ab1904fdd4c735e4e6abebbdcf02
1 // Copyright 2004-2007 Castle Project - http://www.castleproject.org/
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
15 namespace Castle.MonoRail.Framework
17 using System;
18 using System.Collections;
19 using System.Collections.Specialized;
20 using System.Web;
22 /// <summary>
23 /// Represents the request data
24 /// </summary>
25 public interface IRequest
27 /// <summary>
28 /// Gets the Http headers.
29 /// </summary>
30 /// <value>The Http headers.</value>
31 NameValueCollection Headers { get; }
33 /// <summary>
34 /// Gets the <see cref="HttpPostedFile"/> per key.
35 /// </summary>
36 IDictionary Files { get; }
38 /// <summary>
39 /// Gets the params which accumulates headers, post, querystring and cookies.
40 /// </summary>
41 /// <value>The params.</value>
42 NameValueCollection Params { get; }
44 /// <summary>
45 /// Gets a value indicating whether this requeest is from a local address.
46 /// </summary>
47 /// <value><c>true</c> if this instance is local; otherwise, <c>false</c>.</value>
48 bool IsLocal { get; }
50 /// <summary>
51 /// Gets additional path information for
52 /// a resource with a URL extension.
53 /// </summary>
54 /// <value>The path info.</value>
55 String PathInfo { get; }
57 /// <summary>
58 /// Gets the raw URL.
59 /// </summary>
60 /// <value>The raw URL.</value>
61 String RawUrl { get; }
63 /// <summary>
64 /// Gets the URI.
65 /// </summary>
66 /// <value>The URI.</value>
67 Uri Uri { get; }
69 /// <summary>
70 /// Gets the HTTP method.
71 /// </summary>
72 /// <value>The HTTP method.</value>
73 String HttpMethod { get; }
75 /// <summary>
76 /// Gets the file path.
77 /// </summary>
78 /// <value>The file path.</value>
79 String FilePath { get; }
81 /// <summary>
82 /// Reads the request data as a byte array.
83 /// </summary>
84 /// <param name="count">How many bytes.</param>
85 /// <returns></returns>
86 byte[] BinaryRead(int count);
88 /// <summary>
89 /// Gets the param with the specified key.
90 /// </summary>
91 /// <value></value>
92 String this [String key] { get; }
94 /// <summary>
95 /// Reads the cookie.
96 /// </summary>
97 /// <param name="name">The cookie name.</param>
98 /// <returns></returns>
99 String ReadCookie( String name );
101 /// <summary>
102 /// Gets the query string.
103 /// </summary>
104 /// <value>The query string.</value>
105 NameValueCollection QueryString { get; }
107 /// <summary>
108 /// Gets the form.
109 /// </summary>
110 /// <value>The form.</value>
111 NameValueCollection Form { get; }
113 /// <summary>
114 /// Gets the user languages.
115 /// </summary>
116 /// <value>The user languages.</value>
117 String[] UserLanguages { get; }
119 /// <summary>
120 /// Gets the IP host address of the remote client.
121 /// </summary>
122 /// <value>The IP address of the remote client.</value>
123 string UserHostAddress { get; }
125 /// <summary>
126 /// Validates the input.
127 /// </summary>
128 void ValidateInput();