2002-05-06 Lawrence Pit <loz@cable.a2000.nl>
authorLawrence Pit <lawrence@mono-cvs.ximian.com>
Sun, 5 May 2002 18:37:57 +0000 (18:37 -0000)
committerLawrence Pit <lawrence@mono-cvs.ximian.com>
Sun, 5 May 2002 18:37:57 +0000 (18:37 -0000)
* WebRequest.cs: added
* WebResponse.cs: implemented
* WebException.cs: implemented
* WebHeaderCollection.cs: added
* HttpVersion.cs: implemented
* HttpContinueDelegate.cs: added
* IWebProxy.cs: added
* IWebRequestCreate.cs: added
* ICertificatePolicy.cs: added
* ServicePoint.cs: stubbed
* ServicePointManager.cs: stubbed
* CookieContainer.cs: added
* Authorization.cs: implemented

svn path=/trunk/mcs/; revision=4315

14 files changed:
mcs/class/System/System.Net/Authorization.cs
mcs/class/System/System.Net/ChangeLog
mcs/class/System/System.Net/CookieContainer.cs [new file with mode: 0644]
mcs/class/System/System.Net/HttpContinueDelegate.cs [new file with mode: 0644]
mcs/class/System/System.Net/HttpVersion.cs [new file with mode: 0644]
mcs/class/System/System.Net/ICertificatePolicy.cs [new file with mode: 0644]
mcs/class/System/System.Net/IWebProxy.cs [new file with mode: 0644]
mcs/class/System/System.Net/IWebRequestCreate.cs [new file with mode: 0644]
mcs/class/System/System.Net/ServicePoint.cs [new file with mode: 0644]
mcs/class/System/System.Net/ServicePointManager.cs [new file with mode: 0644]
mcs/class/System/System.Net/WebException.cs [new file with mode: 0644]
mcs/class/System/System.Net/WebHeaderCollection.cs [new file with mode: 0644]
mcs/class/System/System.Net/WebRequest.cs [new file with mode: 0644]
mcs/class/System/System.Net/WebResponse.cs [new file with mode: 0644]

index 60e8c889f22374afc6fe4ad6da0d7ce214c9d112..1c21c85f0bc4103fca857cc301b9348905f6e92d 100755 (executable)
@@ -3,6 +3,7 @@
 //
 // Author:
 //   Miguel de Icaza (miguel@ximian.com)
+//   Lawrence Pit (loz@cable.a2000.nl)
 //
 // (C) Ximian, Inc.  http://www.ximian.com
 //
@@ -12,25 +13,40 @@ namespace System.Net {
        public class Authorization {
                string token;
                bool complete;
+               string connectionGroupId;
+               string [] protectionRealm;
                
-               public Authorization (string token)
+               public Authorization (string token) : this (token, true)
                {
-                       this.complete = true;
-                       this.token = token;
                }
 
-               public Authorization (string token, bool complete)
+               public Authorization (string token, bool complete) 
+                       : this (token, complete, null)
+               {
+               }
+               
+               public Authorization (string token, bool complete, string connectionGroupId)
                {
-                       this.complete = complete;
                        this.token = token;
+                       this.complete = complete;
+                       this.connectionGroupId = connectionGroupId;
+               }
+
+               public string Message {
+                       get { return token; }
                }
 
                public bool Complete {
-                       get {
-                               return complete;
-                       }
+                       get { return complete; }
                }
 
+               public string ConnectionGroupId {
+                       get { return connectionGroupId; }
+               }       
                
+               public string[] ProtectionRealm {
+                       get { return protectionRealm; }
+                       set { protectionRealm = value; }
+               }               
        }
 }
index 0d9c333bdd87429053d21533a435ab4816c8e4b6..521bdaafb99dbe094ed846c3bfa3df6709283b75 100644 (file)
@@ -1,3 +1,19 @@
+2002-05-06  Lawrence Pit <loz@cable.a2000.nl>
+
+       * WebRequest.cs: added
+       * WebResponse.cs: implemented
+       * WebException.cs: implemented
+       * WebHeaderCollection.cs: added
+       * HttpVersion.cs: implemented
+       * HttpContinueDelegate.cs: added
+       * IWebProxy.cs: added
+       * IWebRequestCreate.cs: added
+       * ICertificatePolicy.cs: added
+       * ServicePoint.cs: stubbed
+       * ServicePointManager.cs: stubbed
+       * CookieContainer.cs: added
+       * Authorization.cs: implemented
+
 2002-05-05  Lawrence Pit <loz@cable.a2000.nl>
 
        * CredentialCache.cs: implemented
diff --git a/mcs/class/System/System.Net/CookieContainer.cs b/mcs/class/System/System.Net/CookieContainer.cs
new file mode 100644 (file)
index 0000000..4058b9f
--- /dev/null
@@ -0,0 +1,130 @@
+//\r
+// System.Net.CookieContainer\r
+//\r
+// Author:\r
+//   Lawrence Pit (loz@cable.a2000.nl)\r
+//\r
+\r
+using System;\r
+using System.Collections;\r
+using System.Runtime.Serialization;\r
+\r
+namespace System.Net \r
+{\r
+       [Serializable]\r
+       public class CookieContainer\r
+       {               \r
+               private int count;\r
+               private int capacity;\r
+               private int perDomainCapacity;\r
+               private int maxCookieSize;\r
+                               \r
+               // ctors\r
+               public CookieContainer () : this (DefaultCookieLimit) \r
+               { \r
+               } \r
+       \r
+               public CookieContainer (int capacity) : \r
+                       this (capacity, DefaultPerDomainCookieLimit, DefaultCookieLengthLimit) \r
+               { \r
+               }\r
+               \r
+               public CookieContainer (int capacity, int perDomainCapacity, int maxCookieSize)\r
+               {\r
+                       this.capacity = capacity;\r
+                       this.perDomainCapacity = perDomainCapacity;\r
+                       this.maxCookieSize = maxCookieSize;\r
+                       this.count = 0;\r
+               }\r
+\r
+               // fields               \r
+               \r
+               public const int DefaultCookieLengthLimit = 4096;\r
+               public const int DefaultCookieLimit = 300;\r
+               public const int DefaultPerDomainCookieLimit = 20;\r
+               \r
+               // properties\r
+               \r
+               public int Count { \r
+                       get { return count; }\r
+               }\r
+               \r
+               public int Capacity {\r
+                       get { return capacity; }\r
+                       set { \r
+                               if ((value <= 0) ||\r
+                                   (value < perDomainCapacity && perDomainCapacity != Int32.MaxValue))\r
+                                       throw new ArgumentOutOfRangeException ("value");\r
+                               if (value < maxCookieSize)\r
+                                       maxCookieSize = value;\r
+                               capacity = value;                                                       \r
+                       }\r
+               }\r
+               \r
+               public int MaxCookieSize {\r
+                       get { return maxCookieSize; }\r
+                       set {\r
+                               if (value <= 0)\r
+                                       throw new ArgumentOutOfRangeException ("value");                                \r
+                               maxCookieSize = value;\r
+                       }\r
+               }\r
+               \r
+               public int PerDomainCapacity {\r
+                       get { return perDomainCapacity; }\r
+                       set {\r
+                               if ((value <= 0) ||\r
+                                   (value > DefaultCookieLimit && value != Int32.MaxValue))\r
+                                       throw new ArgumentOutOfRangeException ("value");                                        \r
+                               if (value < perDomainCapacity)\r
+                                       perDomainCapacity = value;\r
+                               perDomainCapacity = value;\r
+                       }\r
+               }\r
+               \r
+               [MonoTODO]\r
+               public void Add (Cookie cookie) \r
+               {\r
+                       throw new NotImplementedException ();\r
+               }\r
+\r
+               [MonoTODO]\r
+               public void Add (CookieCollection cookies)\r
+               {\r
+                       throw new NotImplementedException ();\r
+               }\r
+\r
+               [MonoTODO]\r
+               public void Add (Uri uri, Cookie cookie)\r
+               {\r
+                       throw new NotImplementedException ();\r
+               }\r
+\r
+               [MonoTODO]\r
+               public void Add (Uri uri, CookieCollection cookies)\r
+               {\r
+                       throw new NotImplementedException ();\r
+               }               \r
+\r
+               [MonoTODO]\r
+               public string GetCookieHeader (Uri uri)\r
+               {\r
+                       throw new NotImplementedException ();\r
+               }\r
+\r
+               [MonoTODO]\r
+               public CookieCollection GetCookies (Uri uri)\r
+               {\r
+                       throw new NotImplementedException ();                           \r
+               }\r
+\r
+               [MonoTODO]\r
+               public void SetCookies (Uri uri, string cookieHeader)\r
+               {\r
+                       throw new NotImplementedException ();                   \r
+               }\r
+\r
+       } // CookieContainer\r
+\r
+} // System.Net\r
+\r
diff --git a/mcs/class/System/System.Net/HttpContinueDelegate.cs b/mcs/class/System/System.Net/HttpContinueDelegate.cs
new file mode 100644 (file)
index 0000000..a8f4d1f
--- /dev/null
@@ -0,0 +1,13 @@
+//\r
+// System.Net.HttpContinueDelegate.cs\r
+//\r
+// Author:\r
+//   Lawrence Pit (loz@cable.a2000.nl)\r
+//\r
+\r
+namespace System.Net\r
+{\r
+       public delegate void HttpContinueDelegate (\r
+                       int StatusCode,\r
+                       WebHeaderCollection httpHeaders);\r
+}\r
diff --git a/mcs/class/System/System.Net/HttpVersion.cs b/mcs/class/System/System.Net/HttpVersion.cs
new file mode 100644 (file)
index 0000000..7172fbc
--- /dev/null
@@ -0,0 +1,22 @@
+//\r
+// System.Net.HttpVersion.cs\r
+//\r
+// Author:\r
+//   Lawrence Pit (loz@cable.a2000.nl)\r
+//\r
+\r
+using System;\r
+\r
+namespace System.Net {\r
+\r
+       // <remarks>\r
+       // </remarks>\r
+       public class HttpVersion {\r
+               \r
+               public static readonly Version Version10 = new Version (1, 0);\r
+               public static readonly Version Version11 = new Version (1, 1);\r
+               \r
+               // pretty useless..\r
+               public HttpVersion () {}\r
+       }\r
+}\r
diff --git a/mcs/class/System/System.Net/ICertificatePolicy.cs b/mcs/class/System/System.Net/ICertificatePolicy.cs
new file mode 100644 (file)
index 0000000..37d2405
--- /dev/null
@@ -0,0 +1,22 @@
+//
+// System.Net.ICertificatePolicy.cs
+//
+// Author:
+//   Lawrence Pit (loz@cable.a2000.nl)
+//
+
+using System.Security.Cryptography.X509Certificates;
+
+namespace System.Net {
+
+       // <remarks>
+       // </remarks>
+       public interface ICertificatePolicy {
+               bool CheckValidationResult (
+                               ServicePoint srvPoint,
+                               X509Certificate certificate,
+                               WebRequest request,
+                               int certificateProblem
+               );              
+       }
+}
diff --git a/mcs/class/System/System.Net/IWebProxy.cs b/mcs/class/System/System.Net/IWebProxy.cs
new file mode 100644 (file)
index 0000000..00f10e3
--- /dev/null
@@ -0,0 +1,24 @@
+//
+// System.Net.IWebProxy.cs
+//
+// Author:
+//   Lawrence Pit (loz@cable.a2000.nl)
+//
+
+using System;
+
+namespace System.Net {
+
+       // <remarks>
+       // </remarks>
+       public interface IWebProxy {
+               ICredentials Credentials {
+                       get; 
+                       set;
+               }
+
+               Uri GetProxy (Uri destination);
+               
+               bool IsBypassed (Uri host);
+       }
+}
diff --git a/mcs/class/System/System.Net/IWebRequestCreate.cs b/mcs/class/System/System.Net/IWebRequestCreate.cs
new file mode 100644 (file)
index 0000000..85eb452
--- /dev/null
@@ -0,0 +1,15 @@
+//
+// System.Net.IWebRequestCreate.cs
+//
+// Author:
+//   Lawrence Pit (loz@cable.a2000.nl)
+//
+
+namespace System.Net {
+
+       // <remarks>
+       // </remarks>
+       public interface IWebRequestCreate {
+               WebRequest Create (Uri uri);            
+       }
+}
diff --git a/mcs/class/System/System.Net/ServicePoint.cs b/mcs/class/System/System.Net/ServicePoint.cs
new file mode 100644 (file)
index 0000000..40134fe
--- /dev/null
@@ -0,0 +1,93 @@
+//\r
+// System.Net.ServicePoint\r
+//\r
+// Author:\r
+//   Lawrence Pit (loz@cable.a2000.nl)\r
+//\r
+\r
+using System;\r
+using System.Security.Cryptography.X509Certificates;\r
+\r
+namespace System.Net \r
+{\r
+       public class ServicePoint\r
+       {\r
+               private Uri uri;\r
+               private int connectionLimit;\r
+               private int maxIdleTime;\r
+               \r
+               // Constructors\r
+               internal ServicePoint (Uri uri, int connectionLimit, int maxIdleTime)\r
+               {\r
+                       this.uri = uri;\r
+                       this.connectionLimit = connectionLimit;\r
+                       this.maxIdleTime = maxIdleTime;\r
+               }\r
+       \r
+               \r
+               // Properties\r
+               \r
+               public Uri Address {\r
+                       get { return this.uri; }\r
+               }\r
+               \r
+               [MonoTODO]\r
+               public X509Certificate Certificate {\r
+                       get { throw new NotImplementedException (); }\r
+               }\r
+               \r
+               [MonoTODO]\r
+               public X509Certificate ClientCertificate {\r
+                       get { throw new NotImplementedException (); }\r
+               }\r
+               \r
+               [MonoTODO]\r
+               public int ConnectionLimit {\r
+                       get { return connectionLimit; }\r
+                       set {\r
+                               if (value <= 0)\r
+                                       throw new ArgumentOutOfRangeException ();\r
+                               connectionLimit = value;\r
+                       }\r
+               }\r
+               \r
+               [MonoTODO]\r
+               public string ConnectionName {\r
+                       get { throw new NotImplementedException (); }\r
+               }\r
+\r
+               [MonoTODO]\r
+               public int CurrentConnections {\r
+                       get { throw new NotImplementedException (); }\r
+               }\r
+\r
+               [MonoTODO]              \r
+               public DateTime IdleSince {\r
+                       get { throw new NotImplementedException (); }\r
+               }\r
+\r
+               [MonoTODO]\r
+               public int MaxIdleTime {\r
+                       get { return maxIdleTime; }\r
+                       set { this.maxIdleTime = value; }\r
+               }\r
+               \r
+               [MonoTODO]\r
+               public virtual Version ProtocolVersion {\r
+                       get { throw new NotImplementedException (); }\r
+               }\r
+               \r
+               [MonoTODO]\r
+               public bool SupportsPipelining {\r
+                       get { throw new NotImplementedException (); }\r
+               }\r
+               \r
+               // Methods\r
+               \r
+               [MonoTODO]\r
+               public override int GetHashCode() \r
+               {\r
+                       throw new NotImplementedException ();\r
+               }\r
+       }\r
+}
\ No newline at end of file
diff --git a/mcs/class/System/System.Net/ServicePointManager.cs b/mcs/class/System/System.Net/ServicePointManager.cs
new file mode 100644 (file)
index 0000000..6f2776e
--- /dev/null
@@ -0,0 +1,72 @@
+//\r
+// System.Net.ServicePointManager\r
+//\r
+// Author:\r
+//   Lawrence Pit (loz@cable.a2000.nl)\r
+//\r
+\r
+using System;\r
+using System.Security.Cryptography.X509Certificates;\r
+\r
+namespace System.Net \r
+{\r
+       public class ServicePointManager\r
+       {\r
+               \r
+               // Fields\r
+               \r
+               public const int DefaultNonPersistentConnectionLimit = 4;\r
+               public const int DefaultPersistentConnectionLimit = 2;\r
+               \r
+               // Constructors\r
+               private ServicePointManager ()\r
+               {\r
+               }               \r
+               \r
+               // Properties\r
+               \r
+               [MonoTODO]\r
+               public static ICertificatePolicy CertificatePolicy {\r
+                       get { throw new NotImplementedException (); }\r
+                       set { throw new NotImplementedException (); }\r
+               }\r
+               \r
+               [MonoTODO]\r
+               public static int DefaultConnectionLimit {\r
+                       get { throw new NotImplementedException (); }\r
+                       set { throw new NotImplementedException (); }\r
+               }\r
+               \r
+               [MonoTODO]\r
+               public static int MaxServicePointIdleTime {\r
+                       get { throw new NotImplementedException (); }\r
+                       set { throw new NotImplementedException (); }\r
+               }\r
+               \r
+               [MonoTODO]\r
+               public static int MaxServicePoints {\r
+                       get { throw new NotImplementedException (); }\r
+                       set { throw new NotImplementedException (); }\r
+               }\r
+               \r
+               // Methods\r
+               \r
+               [MonoTODO]\r
+               public static ServicePoint FindServicePoint (Uri address) \r
+               {\r
+                       throw new NotImplementedException ();\r
+               }\r
+               \r
+               [MonoTODO]\r
+               public static ServicePoint FindServicePoint (string uriString, IWebProxy proxy)\r
+               {\r
+                       throw new NotImplementedException ();\r
+               }\r
+               \r
+               [MonoTODO]\r
+               public static ServicePoint FindServicePoint (Uri address, IWebProxy proxy)\r
+               {\r
+                       throw new NotImplementedException ();\r
+               }\r
+       }\r
+}
\ No newline at end of file
diff --git a/mcs/class/System/System.Net/WebException.cs b/mcs/class/System/System.Net/WebException.cs
new file mode 100644 (file)
index 0000000..e3607a1
--- /dev/null
@@ -0,0 +1,74 @@
+//\r
+// System.Net.WebException.cs\r
+//\r
+// Author:\r
+//   Lawrence Pit (loz@cable.a2000.nl)\r
+//\r
+\r
+using System.Runtime.Serialization;\r
+\r
+namespace System.Net \r
+{\r
+       [Serializable]\r
+       public class WebException : InvalidOperationException, ISerializable\r
+       {\r
+               private WebResponse response;\r
+               private WebExceptionStatus status;\r
+               \r
+\r
+               // Constructors\r
+               \r
+               public WebException () : base ()\r
+               {\r
+               }\r
+               \r
+               public WebException (string message) : base (message)\r
+               {\r
+               }\r
+\r
+               protected WebException (SerializationInfo serializationInfo,\r
+                                       StreamingContext streamingContext)\r
+                       : base (serializationInfo, streamingContext)\r
+               {\r
+               }\r
+\r
+               public WebException (string message, Exception innerException)\r
+                       : base (message, innerException)\r
+               {\r
+               }\r
+\r
+               public WebException (string message, WebExceptionStatus status)\r
+                       : base (message)\r
+               {\r
+                       this.status = status;\r
+               }\r
+\r
+               public WebException(string message, \r
+                                   Exception innerException,\r
+                                   WebExceptionStatus status, \r
+                                   WebResponse response)\r
+                       : base (message, innerException)                                    \r
+               {\r
+                       this.status = status;\r
+                       this.response = response;\r
+               }\r
+               \r
+               // Properties\r
+               \r
+               public WebResponse Response {\r
+                       get { return this.response; }\r
+               }\r
+               \r
+               public WebExceptionStatus Status {\r
+                       get { return this.status; }\r
+               }\r
+               \r
+               // Methods\r
+               \r
+               void ISerializable.GetObjectData (SerializationInfo info, StreamingContext context)\r
+               {\r
+                       base.GetObjectData (info, context);\r
+               }\r
+       }\r
+}\r
+       \r
diff --git a/mcs/class/System/System.Net/WebHeaderCollection.cs b/mcs/class/System/System.Net/WebHeaderCollection.cs
new file mode 100644 (file)
index 0000000..e3e35e8
--- /dev/null
@@ -0,0 +1,109 @@
+//\r
+// System.Net.WebHeaderCollection\r
+//\r
+// Author:\r
+//   Lawrence Pit (loz@cable.a2000.nl)\r
+//\r
+\r
+using System;\r
+using System.Collections.Specialized;\r
+using System.Runtime.InteropServices;\r
+using System.Runtime.Serialization;\r
+\r
+namespace System.Net \r
+{\r
+       [Serializable]\r
+       [ComVisible(true)]\r
+       public class WebHeaderCollection : NameValueCollection, ISerializable\r
+       {\r
+               // Constructors\r
+               \r
+               public WebHeaderCollection ()\r
+                       : base () \r
+               {\r
+               }\r
+               \r
+               [MonoTODO]\r
+               protected WebHeaderCollection (SerializationInfo serializationInfo, \r
+                                              StreamingContext streamingContext)\r
+               {\r
+                       throw new NotImplementedException ();\r
+               }\r
+               \r
+               // Properties\r
+               \r
+               public virtual long ContentLength {             \r
+                       get { throw new NotSupportedException (); }\r
+                       set { throw new NotSupportedException (); }\r
+               }\r
+\r
+               // Methods\r
+               \r
+               [MonoTODO]\r
+               public void Add (string header)\r
+               {\r
+                       throw new NotImplementedException ();\r
+               }\r
+               \r
+               [MonoTODO]\r
+               public override void Add (string name, string value)\r
+               {\r
+                       throw new NotImplementedException ();\r
+               }\r
+\r
+               [MonoTODO]\r
+               protected void AddWithoutValidate (string headerName, string headerValue)\r
+               {\r
+                       throw new NotImplementedException ();\r
+               }\r
+               \r
+               [MonoTODO]\r
+               public override string [] GetValues (string header)\r
+               {\r
+                       throw new NotImplementedException ();\r
+               }\r
+\r
+               [MonoTODO]\r
+               public static bool IsRestricted (string headerName)\r
+               {\r
+                       throw new NotImplementedException ();\r
+               }\r
+\r
+               [MonoTODO]\r
+               public override void OnDeserialization (object sender)\r
+               {\r
+                       throw new NotImplementedException ();\r
+               }\r
+\r
+               [MonoTODO]\r
+               public override void Remove (string name)\r
+               {\r
+                       throw new NotImplementedException ();\r
+               }\r
+\r
+               [MonoTODO]\r
+               public override void Set (string name, string value)\r
+               {\r
+                       throw new NotImplementedException ();\r
+               }\r
+\r
+               [MonoTODO]\r
+               public byte[] ToByteArray ()\r
+               {\r
+                       throw new NotImplementedException ();\r
+               }\r
+\r
+               [MonoTODO]\r
+               public override string ToString ()\r
+               {\r
+                       throw new NotImplementedException ();\r
+               }\r
+               \r
+               [MonoTODO]\r
+               void ISerializable.GetObjectData (SerializationInfo serializationInfo,\r
+                                                 StreamingContext streamingContext)\r
+               {\r
+                       throw new NotImplementedException ();\r
+               }               \r
+       }\r
+}
\ No newline at end of file
diff --git a/mcs/class/System/System.Net/WebRequest.cs b/mcs/class/System/System.Net/WebRequest.cs
new file mode 100644 (file)
index 0000000..defbd23
--- /dev/null
@@ -0,0 +1,150 @@
+//\r
+// System.Net.WebRequest\r
+//\r
+// Author:\r
+//   Lawrence Pit (loz@cable.a2000.nl)\r
+//\r
+\r
+using System;\r
+using System.IO;\r
+using System.Runtime.Serialization;\r
+\r
+namespace System.Net \r
+{\r
+       [Serializable]\r
+       public abstract class WebRequest : MarshalByRefObject, ISerializable\r
+       {\r
+               // Constructors\r
+               \r
+               protected WebRequest () {}              \r
+               \r
+               protected WebRequest (SerializationInfo serializationInfo, StreamingContext streamingContext)\r
+               {\r
+                       throw new NotSupportedException ();\r
+               }\r
+               \r
+               // Properties\r
+               \r
+               public virtual string ConnectionGroupName { \r
+                       get { throw new NotSupportedException (); }\r
+                       set { throw new NotSupportedException (); }\r
+               }\r
+               \r
+               public virtual long ContentLength { \r
+                       get { throw new NotSupportedException (); }\r
+                       set { throw new NotSupportedException (); }\r
+               }\r
+               \r
+               public virtual string ContentType { \r
+                       get { throw new NotSupportedException (); }\r
+                       set { throw new NotSupportedException (); }\r
+               }\r
+               \r
+               public virtual ICredentials Credentials { \r
+                       get { throw new NotSupportedException (); }\r
+                       set { throw new NotSupportedException (); }\r
+               }\r
+               \r
+               public virtual WebHeaderCollection Headers { \r
+                       get { throw new NotSupportedException (); }\r
+                       set { throw new NotSupportedException (); }\r
+               }\r
+               \r
+               public virtual string Method { \r
+                       get { throw new NotSupportedException (); }\r
+                       set { throw new NotSupportedException (); }\r
+               }\r
+               \r
+               public virtual bool PreAuthenticate { \r
+                       get { throw new NotSupportedException (); }\r
+                       set { throw new NotSupportedException (); }\r
+               }\r
+               \r
+               public virtual IWebProxy Proxy { \r
+                       get { throw new NotSupportedException (); }\r
+                       set { throw new NotSupportedException (); }\r
+               }\r
+               \r
+               public virtual Uri RequestUri { \r
+                       get { throw new NotSupportedException (); }\r
+                       set { throw new NotSupportedException (); }\r
+               }\r
+               \r
+               public virtual int Timeout { \r
+                       get { throw new NotSupportedException (); }\r
+                       set { throw new NotSupportedException (); }\r
+               }\r
+               \r
+               // Methods\r
+               \r
+               public virtual void Abort()\r
+               {\r
+                       throw new NotSupportedException ();\r
+               }\r
+               \r
+               public virtual IAsyncResult BeginGetRequestStream (AsyncCallback callback, object state) \r
+               {\r
+                       throw new NotSupportedException ();\r
+               }\r
+               \r
+               public virtual IAsyncResult BeginGetResponse (AsyncCallback callback, object state)\r
+               {\r
+                       throw new NotSupportedException ();\r
+               }\r
+\r
+               public static WebRequest Create (string requestUriString) \r
+               {\r
+                       if (requestUriString == null)\r
+                               throw new ArgumentNullException ("requestUriString");\r
+                       return Create (new Uri (requestUriString));\r
+               }\r
+                               \r
+               [MonoTODO]\r
+               public static WebRequest Create (Uri requestUri) \r
+               {\r
+                       if (requestUri == null)\r
+                               throw new ArgumentNullException ("requestUri");\r
+                       throw new NotImplementedException ();\r
+               }\r
+               \r
+               [MonoTODO]\r
+               public static WebRequest CreateDefault (Uri requestUri)\r
+               {\r
+                       if (requestUri == null)\r
+                               throw new ArgumentNullException ("requestUri");\r
+                       throw new NotImplementedException ();                   \r
+               }\r
+\r
+               public virtual Stream EndGetRequestStream (IAsyncResult asyncResult)\r
+               {\r
+                       throw new NotSupportedException ();\r
+               }\r
+               \r
+               public virtual WebResponse EndGetResponse (IAsyncResult asyncResult)\r
+               {\r
+                       throw new NotSupportedException ();\r
+               }\r
+               \r
+               public virtual Stream GetRequestStream()\r
+               {\r
+                       throw new NotSupportedException ();\r
+               }\r
+               \r
+               public virtual WebResponse GetResponse()\r
+               {\r
+                       throw new NotSupportedException ();\r
+               }\r
+               \r
+               void ISerializable.GetObjectData (SerializationInfo serializationInfo,\r
+                                                 StreamingContext streamingContext)\r
+               {\r
+                       throw new NotSupportedException ();\r
+               }\r
+\r
+               [MonoTODO]              \r
+               public static bool RegisterPrefix (string prefix, IWebRequestCreate creator)\r
+               {\r
+                       throw new NotImplementedException ();                   \r
+               }\r
+       }\r
+}
\ No newline at end of file
diff --git a/mcs/class/System/System.Net/WebResponse.cs b/mcs/class/System/System.Net/WebResponse.cs
new file mode 100644 (file)
index 0000000..01b25ba
--- /dev/null
@@ -0,0 +1,72 @@
+//\r
+// System.Net.WebResponse\r
+//\r
+// Author:\r
+//   Lawrence Pit (loz@cable.a2000.nl)\r
+//\r
+\r
+using System;\r
+using System.IO;\r
+using System.Runtime.Serialization;\r
+\r
+namespace System.Net \r
+{\r
+       [Serializable]\r
+       public abstract class WebResponse : MarshalByRefObject, ISerializable, IDisposable\r
+       {\r
+               // Constructors\r
+               \r
+               protected WebResponse ()\r
+               {\r
+                       throw new NotSupportedException ();\r
+               }\r
+               \r
+               protected WebResponse (SerializationInfo serializationInfo, StreamingContext streamingContext)\r
+               {\r
+                       throw new NotSupportedException ();\r
+               }\r
+               \r
+               // Properties\r
+               \r
+               public virtual long ContentLength {             \r
+                       get { throw new NotSupportedException (); }\r
+                       set { throw new NotSupportedException (); }\r
+               }\r
+               \r
+               public virtual string ContentType {             \r
+                       get { throw new NotSupportedException (); }\r
+                       set { throw new NotSupportedException (); }\r
+               }\r
+               \r
+               public virtual WebHeaderCollection Headers {            \r
+                       get { throw new NotSupportedException (); }\r
+               }\r
+               \r
+               public virtual Uri ResponseUri {                \r
+                       get { throw new NotSupportedException (); }\r
+               }               \r
+\r
+               // Methods\r
+               \r
+               public virtual void Close()\r
+               {\r
+                       throw new NotSupportedException ();\r
+               }\r
+               \r
+               public virtual Stream GetResponseStream()\r
+               {\r
+                       throw new NotSupportedException ();\r
+               }\r
+               \r
+               void IDisposable.Dispose()\r
+               {\r
+                       Close ();\r
+               }\r
+               \r
+               void ISerializable.GetObjectData (SerializationInfo serializationInfo,\r
+                                                 StreamingContext streamingContext)\r
+               {\r
+                       throw new NotSupportedException ();\r
+               }               \r
+       }\r
+}
\ No newline at end of file