[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: pnetlib/System/Net AuthenticationManager.cs,
From: |
Rhys Weatherley <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: pnetlib/System/Net AuthenticationManager.cs, NONE, 1.1 Cookie.cs, NONE, 1.1 ICertificatePolicy.cs, NONE, 1.1 SecurityPrototypeType.cs, NONE, 1.1 Authorization.cs, 1.3, 1.4 HttpContinueDelegate.cs, 1.1, 1.2 HttpStatusCode.cs, 1.1, 1.2 IAuthenticationModule.cs, 1.1, 1.2 ICredentials.cs, 1.1, 1.2 IWebProxy.cs, 1.1, 1.2 IWebRequestCreate.cs, 1.1, 1.2 NetworkAccess.cs, 1.1, 1.2 TransportType.cs, 1.1, 1.2 WebExceptionStatus.cs, 1.2, 1.3 |
Date: |
Wed, 27 Aug 2003 20:25:15 -0400 |
Update of /cvsroot/dotgnu-pnet/pnetlib/System/Net
In directory subversions:/tmp/cvs-serv5556/System/Net
Modified Files:
Authorization.cs HttpContinueDelegate.cs HttpStatusCode.cs
IAuthenticationModule.cs ICredentials.cs IWebProxy.cs
IWebRequestCreate.cs NetworkAccess.cs TransportType.cs
WebExceptionStatus.cs
Added Files:
AuthenticationManager.cs Cookie.cs ICertificatePolicy.cs
SecurityPrototypeType.cs
Log Message:
Clean up various classes in "System.Net" and add some missing ones.
--- NEW FILE ---
/*
* AuthenticationManager.cs - Implementation of the
* "System.Net.AuthenticationManager" class.
*
* Copyright (C) 2003 Southern Storm Software, Pty Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
namespace System.Net
{
using System.Collections;
public class AuthenticationManager
{
// Internal state.
private static ArrayList modules;
// Cannot instantiate this class.
private AuthenticationManager() {}
// Get the module list.
private static ArrayList ModuleList
{
get
{
if(modules == null)
{
modules = new ArrayList();
}
return modules;
}
}
// Get a list of all authentication modules that are
// registered with the authentication manager.
public static IEnumerator RegisteredModules
{
get
{
lock(typeof(AuthenticationManager))
{
return
ModuleList.GetEnumerator();
}
}
}
// Call each authentication module until one responds.
public static Authorization Authenticate
(String challenge, WebRequest request,
ICredentials credentials)
{
if(challenge == null)
{
throw new
ArgumentNullException("challenge");
}
if(request == null)
{
throw new
ArgumentNullException("request");
}
if(credentials == null)
{
throw new
ArgumentNullException("credentials");
}
lock(typeof(AuthenticationManager))
{
Authorization auth;
foreach(IAuthenticationModule module in
ModuleList)
{
auth = module.Authenticate
(challenge, request,
credentials);
if(auth != null)
{
return auth;
}
}
}
return null;
}
// Find an authentication module for a particular type.
private static IAuthenticationModule FindModuleByType(String type)
{
foreach(IAuthenticationModule module in
ModuleList)
{
if(module.AuthenticationType == type)
{
return module;
}
}
return null;
}
// Pre-authenticate a request.
[TODO]
public static Authorization PreAuthenticate
(WebRequest request, ICredentials credentials)
{
if(request == null)
{
throw new
ArgumentNullException("request");
}
if(credentials == null)
{
return null;
}
// TODO
return null;
}
// Register an authentication module with the authentication manager.
public static void Register(IAuthenticationModule authenticationModule)
{
if(authenticationModule == null)
{
throw new
ArgumentNullException("authenticationModule");
}
lock(typeof(AuthenticationManager))
{
IAuthenticationModule module;
module = FindModuleByType
(authenticationModule.AuthenticationType);
if(module != null)
{
ModuleList.Remove(module);
}
ModuleList.Add(authenticationModule);
}
}
// Unregister an authentication module from the authentication manager.
public static void Unregister(IAuthenticationModule
authenticationModule)
{
if(authenticationModule == null)
{
throw new
ArgumentNullException("authenticationModule");
}
lock(typeof(AuthenticationManager))
{
if(!ModuleList.Contains(authenticationModule))
{
throw new
InvalidOperationException
(S._("Invalid_AuthModuleNotRegistered"));
}
ModuleList.Remove(authenticationModule);
}
}
// Unregister an authentication module for a particular scheme.
public static void Unregister(String authenticationScheme)
{
if(authenticationScheme == null)
{
throw new
ArgumentNullException("authenticationScheme");
}
lock(typeof(AuthenticationManager))
{
IAuthenticationModule module;
module =
FindModuleByType(authenticationScheme);
if(module != null)
{
ModuleList.Remove(module);
}
else
{
throw new
InvalidOperationException
(S._("Invalid_AuthModuleNotRegistered"));
}
}
}
}; // class AuthenticationManager
}; // namespace System.Net
--- NEW FILE ---
/*
* Cookie.cs - Implementation of the "System.Net.Cookie" class.
*
* Copyright (C) 2003 Southern Storm Software, Pty Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
namespace System.Net
{
using System.Globalization;
using System.Text;
#if !ECMA_COMPAT
[Serializable]
#endif
public sealed class Cookie
{
// Internal state.
private String name;
private String value;
private String path;
private String domain;
private String comment;
private Uri commentUri;
private bool discard;
private bool expired;
private bool secure;
private bool domainImplicit;
private bool portImplicit;
private DateTime expires;
private String port;
private DateTime timeStamp;
private int version;
// Constructors.
public Cookie()
: this(null, null, null, null) {}
public Cookie(String name, String value)
: this(name, value, null, null) {}
public Cookie(String name, String value, String path)
{
if(name != null)
{
this.name = name;
}
else
{
this.name = String.Empty;
}
if(value != null)
{
this.value = value;
}
else
{
this.value = String.Empty;
}
if(path != null)
{
this.path = path;
}
else
{
this.path = String.Empty;
}
this.comment = String.Empty;
this.port = String.Empty;
this.domainImplicit = true;
this.portImplicit = true;
}
public Cookie(String name, String value, String path, String domain)
: this(name, value, path)
{
Domain = domain;
}
// Get or set this object's properties.
public String Comment
{
get
{
return comment;
}
set
{
if(value != null)
{
comment = value;
}
else
{
comment = String.Empty;
}
}
}
public Uri CommentUri
{
get
{
return commentUri;
}
set
{
commentUri = value;
}
}
public bool Discard
{
get
{
return discard;
}
set
{
discard = value;
}
}
public String Domain
{
get
{
return domain;
}
set
{
domainImplicit = false;
if(value != null)
{
domain = value;
}
else
{
domain = String.Empty;
}
}
}
public bool Expired
{
get
{
return expired;
}
set
{
expired = value;
}
}
public DateTime Expires
{
get
{
return expires;
}
set
{
expires = value;
}
}
public String Name
{
get
{
return name;
}
set
{
if(value != null)
{
name = value;
}
else
{
name = String.Empty;
}
}
}
public String Path
{
get
{
return path;
}
set
{
if(value != null)
{
path = value;
}
else
{
path = String.Empty;
}
}
}
public String Port
{
get
{
return port;
}
set
{
portImplicit = false;
if(value != null)
{
port = value;
}
else
{
port = String.Empty;
}
}
}
public bool Secure
{
get
{
return secure;
}
set
{
secure = value;
}
}
public DateTime TimeStamp
{
get
{
return timeStamp;
}
}
public String Value
{
get
{
return name;
}
set
{
if(value != null)
{
this.value = value;
}
else
{
this.value = String.Empty;
}
}
}
public int Version
{
get
{
return version;
}
set
{
version = value;
}
}
// Determine if two objects are equal.
public override bool Equals(Object comparand)
{
Cookie other = (comparand as Cookie);
if(other != null)
{
if(String.Compare(name, other.name,
true,
CultureInfo.InvariantCulture) != 0)
{
return false;
}
if(value != other.value)
{
return false;
}
if(path != other.path)
{
return false;
}
if(String.Compare(domain, other.domain,
true,
CultureInfo.InvariantCulture) != 0)
{
return false;
}
return (version == other.version);
}
else
{
return false;
}
}
// Get a hash code for this object.
public override int GetHashCode()
{
return ToString().GetHashCode();
}
// Special non-token characters.
private static char[] specials =
{'(', ')', '<', '>', '@', ',', ';', ':', '\\', '\"',
'/', '[', ']', '?', '=', '{', '}', ' ', '\t'};
// Quote a string and write it to a builder.
private static void QuoteString(StringBuilder builder, String value)
{
int posn;
char ch;
// If the value contains token characters, then
don't quote.
for(posn = 0; posn < value.Length; ++posn)
{
ch = value[posn];
if(ch < 0x20 || ch >= 0x7F)
{
break;
}
}
if(posn >= value.Length &&
value.IndexOfAny(specials) == -1)
{
builder.Append(value);
return;
}
// Quote the string.
builder.Append('"');
for(posn = 0; posn < value.Length; ++posn)
{
ch = value[posn];
if(ch == '"')
{
builder.Append('\\');
builder.Append('"');
}
else if(ch == '\\')
{
builder.Append('\\');
builder.Append('\\');
}
else
{
builder.Append(ch);
}
}
builder.Append('"');
}
// Convert this object into a string.
public override String ToString()
{
if(name.Length == 0 && value.Length == 0)
{
return String.Empty;
}
StringBuilder builder = new StringBuilder();
if(version != 0)
{
builder.Append("$Version=");
builder.Append(version.ToString());
builder.Append("; ");
}
builder.Append(name);
builder.Append('=');
builder.Append(value);
if(path.Length != 0)
{
builder.Append("; $Path=");
QuoteString(builder, path);
}
if(!domainImplicit && domain.Length != 0)
{
builder.Append("; $Domain=");
QuoteString(builder, domain);
}
if(!portImplicit && port.Length != 0)
{
builder.Append("; $Port=");
QuoteString(builder, port);
}
return builder.ToString();
}
}; // class Cookie
}; // namespace System.Net
--- NEW FILE ---
/*
* ICertificatePolicy.cs - Implementation of the
* "System.Net.ICertificatePolicy" class.
*
* Copyright (C) 2003 Southern Storm Software, Pty Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
namespace System.Net
{
#if CONFIG_X509_CERTIFICATES
using System.Security.Cryptography.X509Certificates;
public interface ICertificatePolicy
{
// Validate a server certificate.
bool CheckValidationResult
(ServicePoint srvPoint, X509Certificate certificate,
WebRequest request, int certificateProblem);
}; // interface ICertificatePolicy
#endif // CONFIG_X509_CERTIFICATES
}; // namespace System.Net
--- NEW FILE ---
/*
* SecurityProtocolType.cs - Implementation of the
* "System.Net.SecurityProtocolType" class.
*
* Copyright (C) 2003 Southern Storm Software, Pty Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
namespace System.Net
{
[Flags]
public enum SecurityProtocolType
{
Ssl3 = 0x0030,
Tls = 0x00C0
}; // enum SecurityProtocolType
}; // namespace System.Net
Index: Authorization.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/System/Net/Authorization.cs,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** Authorization.cs 25 May 2002 10:31:18 -0000 1.3
--- Authorization.cs 28 Aug 2003 00:25:13 -0000 1.4
***************
*** 2,6 ****
* Authorization.cs - Implementation of the "System.Net.Authorization" class.
*
! * Copyright (C) 2002 Southern Storm Software, Pty Ltd.
*
* This program is free software; you can redistribute it and/or modify
--- 2,6 ----
* Authorization.cs - Implementation of the "System.Net.Authorization" class.
*
! * Copyright (C) 2003 Southern Storm Software, Pty Ltd.
*
* This program is free software; you can redistribute it and/or modify
***************
*** 22,105 ****
{
- using System;
-
public class Authorization
{
! private bool complete;
! private String connectiongroupid;
! private String message;
! private String[] protectionrealm;
!
! public Authorization(string token)
! {
! if (token == null || token == "")
! message = null;
!
! message = token;
! complete = true;
! connectiongroupid = null;
! }
!
! public Authorization(string token, bool finished)
! {
! if (token == null || token == "")
! message = null;
!
! message = token;
! complete = finished;
! connectiongroupid = null;
! }
!
! public Authorization(string token, bool finished, string
connectionGroupId)
! {
! if (token == null || token == "")
! message = null;
!
! if (connectionGroupId == null || connectionGroupId == "")
! connectiongroupid = null;
!
! message = token;
! complete = finished;
! connectiongroupid = connectionGroupId;
! }
!
! public bool Complete
! {
! get
! {
! return complete;
! }
! }
!
! public String ConnectionGroupId
! {
! get
! {
! return connectiongroupid;
! }
! }
!
! public String Message
! {
! get
! {
! return message;
! }
! }
!
! public String[] ProtectionRealm
! {
! get
! {
! return protectionrealm;
! }
! set
! {
! protectionrealm = value;
! }
! }
!
! }; //class Authorization
! }; //namespace System.Net
--- 22,89 ----
{
public class Authorization
{
! // Internal state.
! private String token;
! private bool finished;
! private String connectionGroupId;
! private String[] protectionRealm;
!
! // Constructors.
! public Authorization(String token) : this(token, true, null) {}
! public Authorization(String token, bool finished)
! : this(token, finished, null) {}
! public Authorization(String token, bool finished,
! String connectionGroupId)
! {
! this.token = (token == String.Empty ? null :
token);
! this.finished = finished;
! this.connectionGroupId =
! (connectionGroupId == String.Empty
! ? null : connectionGroupId);
! }
!
! // Get this object's properties.
! public bool Complete
! {
! get
! {
! return finished;
! }
! }
! public String ConnectionGroupId
! {
! get
! {
! return connectionGroupId;
! }
! }
! public String Message
! {
! get
! {
! return token;
! }
! }
! public String[] ProtectionRealm
! {
! get
! {
! return protectionRealm;
! }
! set
! {
! if(value != null && value.Length == 0)
! {
! protectionRealm = null;
! }
! else
! {
! protectionRealm = value;
! }
! }
! }
! }; // class Authorization
+ }; // namespace System.Net
Index: HttpContinueDelegate.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/System/Net/HttpContinueDelegate.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** HttpContinueDelegate.cs 7 Apr 2002 09:19:46 -0000 1.1
--- HttpContinueDelegate.cs 28 Aug 2003 00:25:13 -0000 1.2
***************
*** 1,6 ****
/*
! * HttpContinueDelegate.cs - Implementation of the
"System.Net.HttpContinueDelegate" class.
*
! * Copyright (C) 2002 Southern Storm Software, Pty Ltd.
*
* This program is free software; you can redistribute it and/or modify
--- 1,7 ----
/*
! * HttpContinueDelegate.cs - Implementation of the
! * "System.Net.HttpContinueDelegate" class.
*
! * Copyright (C) 2003 Southern Storm Software, Pty Ltd.
*
* This program is free software; you can redistribute it and/or modify
***************
*** 22,26 ****
{
! public delegate void HttpContinueDelegate(int StatusCode, WebHeaderCollection
httpHeaders);
! }; //namespace System.Net
\ No newline at end of file
--- 23,28 ----
{
! public delegate void HttpContinueDelegate
! (int StatusCode, WebHeaderCollection httpHeaders);
! }; //namespace System.Net
Index: HttpStatusCode.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/System/Net/HttpStatusCode.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** HttpStatusCode.cs 4 Mar 2002 01:58:24 -0000 1.1
--- HttpStatusCode.cs 28 Aug 2003 00:25:13 -0000 1.2
***************
*** 1,7 ****
/*
! * HttpStatusCode.cs - Implementation of the "System.Net.HttpStatusCode"
class.
*
- * Copyright (C) 2002 Southern Storm Software, Pty Ltd.
- *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- 1,8 ----
/*
! * HttpStatusCode.cs - Implementation of the
! * "System.Net.HttpStatusCode" class.
! *
! * Copyright (C) 2003 Southern Storm Software, Pty Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
***************
*** 24,73 ****
public enum HttpStatusCode
{
! Accepted = 202,
! Ambiguous = 300,
! BadGateway = 502,
! BadRequest = 400,
! Conflict = 409,
! Continue = 100,
! Created = 201,
! ExpectationFailed = 417,
! Forbidden = 403,
! Found = 302,
! GatewayTimeout = 504,
! Gone = 410,
! HttpVersionNotSupported = 505,
! InternalServerError = 500,
! LengthRequired = 411,
! MethodNotAllowed = 405,
! Moved = 301,
! MovedPermanently = 301,
! MultipleChoices = 300,
! NoContent = 204,
! NonAuthoritativeInformation = 203,
! NotAcceptable = 406,
! NotFound = 404,
! NotImplemented = 501,
! NotModified = 304,
! OK = 200,
! PartialContent = 206,
! PaymentRequired = 402,
! PreconditionFailed = 412,
! ProxyAuthenticationRequired = 407,
! Redirect = 302,
! RedirectKeepVerb = 307,
! RedirectMethod = 303,
! RequestEntityTooLarge = 413,
! RequestTimeout = 408,
! RequestUriTooLong = 414,
! RequestedRangeNotSatisfiable = 416,
! ResetContent = 205,
! SeeOther = 303,
! ServiceUnavailable = 503,
! SwitchingProtocols = 101,
! TemporaryRedirect = 307,
! Unauthorized = 401,
! UnsupportedMediaType = 415,
! Unused = 306,
! UseProxy = 305
}; // enum HttpStatusCode
--- 25,75 ----
public enum HttpStatusCode
{
! Continue = 100,
! SwitchingProtocols = 101,
! OK = 200,
! Created = 201,
! Accepted = 202,
! NonAuthoritativeInformation = 203,
! NoContent = 204,
! ResetContent = 205,
! PartialContent = 206,
! Ambiguous = 300,
! MultipleChoices = 300,
! Moved = 301,
! MovedPermanently = 301,
! Found = 302,
! Redirect = 302,
! RedirectMethod = 303,
! SeeOther = 303,
! NotModified = 304,
! UseProxy = 305,
! Unused = 306,
! RedirectKeepVerb = 307,
! TemporaryRedirect = 307,
! BadRequest = 400,
! Unauthorized = 401,
! PaymentRequired = 402,
! Forbidden = 403,
! NotFound = 404,
! MethodNotAllowed = 405,
! NotAcceptable = 406,
! ProxyAuthenticationRequired = 407,
! RequestTimeout = 408,
! Conflict = 409,
! Gone = 410,
! LengthRequired = 411,
! PreconditionFailed = 412,
! RequestEntityTooLarge = 413,
! RequestUriTooLong = 414,
! UnsupportedMediaType = 415,
! RequestedRangeNotSatisfiable = 416,
! ExpectationFailed = 417,
! InternalServerError = 500,
! NotImplemented = 501,
! BadGateway = 502,
! ServiceUnavailable = 503,
! GatewayTimeout = 504,
! HttpVersionNotSupported = 505
!
}; // enum HttpStatusCode
Index: IAuthenticationModule.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/System/Net/IAuthenticationModule.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** IAuthenticationModule.cs 4 Mar 2002 01:58:24 -0000 1.1
--- IAuthenticationModule.cs 28 Aug 2003 00:25:13 -0000 1.2
***************
*** 1,7 ****
/*
! * IAuthenticationModule.cs - Implementation of the
"System.Net.IAuthenticationModule" class.
*
- * Copyright (C) 2002 Southern Storm Software, Pty Ltd.
- *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- 1,8 ----
/*
! * IAuthenticationModule.cs - Implementation of the
! * "System.Net.IAuthenticationModule" class.
! *
! * Copyright (C) 2003 Southern Storm Software, Pty Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
***************
*** 26,33 ****
public interface IAuthenticationModule
{
! Authorization Authenticate(String challenge, WebRequest request,
ICredentials credentials);
! Authorization PreAuthenticate(WebRequest request, ICredentials
credentials);
String AuthenticationType { get; }
bool CanPreAuthenticate { get; }
}; // interface IAuthenticationModule
--- 27,44 ----
public interface IAuthenticationModule
{
! // Get the authentiation type supported by this module.
String AuthenticationType { get; }
+
+ // Determine if this module supports pre-authentication.
bool CanPreAuthenticate { get; }
+
+ // Authenticate a challenge from the server.
+ Authorization Authenticate
+ (String challenge, WebRequest request, ICredentials
credentials);
+
+ // Pre-authenticate a request.
+ Authorization PreAuthenticate
+ (WebRequest request, ICredentials credentials);
+
}; // interface IAuthenticationModule
Index: ICredentials.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/System/Net/ICredentials.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** ICredentials.cs 4 Mar 2002 01:58:24 -0000 1.1
--- ICredentials.cs 28 Aug 2003 00:25:13 -0000 1.2
***************
*** 2,7 ****
* ICredentials.cs - Implementation of the "System.Net.ICredentials" class.
*
! * Copyright (C) 2002 Southern Storm Software, Pty Ltd.
! *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- 2,7 ----
* ICredentials.cs - Implementation of the "System.Net.ICredentials" class.
*
! * Copyright (C) 2003 Southern Storm Software, Pty Ltd.
! *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
***************
*** 26,32 ****
public interface ICredentials
{
! NetworkCredential GetCredential(Uri uri, string authType);
}; // interface ICredentials
}; // namespace System.Net
-
--- 26,33 ----
public interface ICredentials
{
! // Get a credential object for a specific uri and authentication type.
! NetworkCredential GetCredential(Uri uri, String authType);
!
}; // interface ICredentials
}; // namespace System.Net
Index: IWebProxy.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/System/Net/IWebProxy.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** IWebProxy.cs 4 Mar 2002 01:58:24 -0000 1.1
--- IWebProxy.cs 28 Aug 2003 00:25:13 -0000 1.2
***************
*** 2,7 ****
* IWebProxy.cs - Implementation of the "System.Net.IWebProxy" class.
*
! * Copyright (C) 2002 Southern Storm Software, Pty Ltd.
! *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- 2,7 ----
* IWebProxy.cs - Implementation of the "System.Net.IWebProxy" class.
*
! * Copyright (C) 2003 Southern Storm Software, Pty Ltd.
! *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
***************
*** 26,32 ****
public interface IWebProxy
{
Uri GetProxy(Uri destination);
bool IsBypassed(Uri host);
! ICredentials Credentials { get; set; }
}; // interface IWebProxy
--- 26,38 ----
public interface IWebProxy
{
+ // Get or set the credentials to submit to the proxy server.
+ ICredentials Credentials { get; set; }
+
+ // Get the URI of a proxy for a specific destination.
Uri GetProxy(Uri destination);
+
+ // Determine if a URI should be bypassed for proxy use.
bool IsBypassed(Uri host);
!
}; // interface IWebProxy
Index: IWebRequestCreate.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/System/Net/IWebRequestCreate.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** IWebRequestCreate.cs 4 Mar 2002 01:58:24 -0000 1.1
--- IWebRequestCreate.cs 28 Aug 2003 00:25:13 -0000 1.2
***************
*** 1,7 ****
/*
! * IWebRequestCreate.cs - Implementation of the
"System.Net.IWebRequestCreate" class.
*
- * Copyright (C) 2002 Southern Storm Software, Pty Ltd.
- *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- 1,8 ----
/*
! * IWebRequestCreate.cs - Implementation of the
! * "System.Net.IWebRequestCreate" class.
! *
! * Copyright (C) 2003 Southern Storm Software, Pty Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
***************
*** 26,32 ****
public interface IWebRequestCreate
{
WebRequest Create(Uri uri);
}; // interface IWebRequestCreate
}; // namespace System.Net
-
--- 27,34 ----
public interface IWebRequestCreate
{
+ // Create a web requestor for a specific URI.
WebRequest Create(Uri uri);
+
}; // interface IWebRequestCreate
}; // namespace System.Net
Index: NetworkAccess.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/System/Net/NetworkAccess.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** NetworkAccess.cs 4 Mar 2002 01:58:24 -0000 1.1
--- NetworkAccess.cs 28 Aug 2003 00:25:13 -0000 1.2
***************
*** 2,7 ****
* NetworkAccess.cs - Implementation of the "System.Net.NetworkAccess" class.
*
! * Copyright (C) 2002 Southern Storm Software, Pty Ltd.
! *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- 2,7 ----
* NetworkAccess.cs - Implementation of the "System.Net.NetworkAccess" class.
*
! * Copyright (C) 2003 Southern Storm Software, Pty Ltd.
! *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
***************
*** 24,31 ****
public enum NetworkAccess
{
! Accept = 128,
! Connect = 64
}; // enum NetworkAccess
}; // namespace System.Net
-
--- 24,31 ----
public enum NetworkAccess
{
! Connect = 0x0040,
! Accept = 0x0080
!
}; // enum NetworkAccess
}; // namespace System.Net
Index: TransportType.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/System/Net/TransportType.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** TransportType.cs 4 Mar 2002 01:58:24 -0000 1.1
--- TransportType.cs 28 Aug 2003 00:25:13 -0000 1.2
***************
*** 2,7 ****
* TransportType.cs - Implementation of the "System.Net.TransportType" class.
*
! * Copyright (C) 2002 Southern Storm Software, Pty Ltd.
! *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- 2,7 ----
* TransportType.cs - Implementation of the "System.Net.TransportType" class.
*
! * Copyright (C) 2003 Southern Storm Software, Pty Ltd.
! *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
***************
*** 24,34 ****
public enum TransportType
{
! All = 3,
! ConnectionOriented = 2,
! Connectionless = 1,
! Tcp = 2,
! Udp = 1
}; // enum TransportType
}; // namespace System.Net
-
--- 24,34 ----
public enum TransportType
{
! Udp = 1,
! Tcp = 2,
! All = 3,
! ConnectionOriented = Tcp,
! Connectionless = Udp
!
}; // enum TransportType
}; // namespace System.Net
Index: WebExceptionStatus.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/System/Net/WebExceptionStatus.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** WebExceptionStatus.cs 21 Apr 2002 03:24:53 -0000 1.2
--- WebExceptionStatus.cs 28 Aug 2003 00:25:13 -0000 1.3
***************
*** 1,7 ****
/*
! * WebExceptionStatus.cs - Implementation of the
"System.Net.Sockets.WebExceptionStatus" class.
*
- * Copyright (C) 2002 Southern Storm Software, Pty Ltd.
- *
* This program is free software, you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- 1,8 ----
/*
! * WebExceptionStatus.cs - Implementation of the
! * "System.Net.Sockets.WebExceptionStatus" class.
! *
! * Copyright (C) 2003 Southern Storm Software, Pty Ltd.
*
* This program is free software, you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
***************
*** 24,45 ****
public enum WebExceptionStatus
{
! ConnectFailure = 2,
! ConnectionClosed = 8,
! KeepAliveFailure = 12,
! NameResolutionFailure = 1,
! Pending = 13,
! PipelineFailure = 5,
! ProtocolError = 7,
! ProxyNameResolutionFailure = 15,
! ReceiveFailure = 3,
! RequestCanceled = 6,
! SecureChannelFailure = 10,
! SendFailure = 4,
! ServerProtocolViolation = 11,
! Success = 0,
! Timeout = 14,
! TrustFailure = 9
}; // enum WebExceptionStatus
}; // namespace System.Net
-
--- 25,48 ----
public enum WebExceptionStatus
{
! Success = 0,
! NameResolutionFailure = 1,
! ConnectFailure = 2,
! ReceiveFailure = 3,
! SendFailure = 4,
! PipelineFailure = 5,
! RequestCanceled = 6,
! ProtocolError = 7,
! ConnectionClosed = 8,
! TrustFailure = 9,
! SecureChannelFailure = 10,
! ServerProtocolViolation = 11,
! KeepAliveFailure = 12,
! Pending = 13,
! Timeout = 14,
! ProxyNameResolutionFailure = 15,
! UnknownError = 16,
! MessageLengthLimitExceeded = 17,
!
}; // enum WebExceptionStatus
}; // namespace System.Net
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnetlib/System/Net AuthenticationManager.cs, NONE, 1.1 Cookie.cs, NONE, 1.1 ICertificatePolicy.cs, NONE, 1.1 SecurityPrototypeType.cs, NONE, 1.1 Authorization.cs, 1.3, 1.4 HttpContinueDelegate.cs, 1.1, 1.2 HttpStatusCode.cs, 1.1, 1.2 IAuthenticationModule.cs, 1.1, 1.2 ICredentials.cs, 1.1, 1.2 IWebProxy.cs, 1.1, 1.2 IWebRequestCreate.cs, 1.1, 1.2 NetworkAccess.cs, 1.1, 1.2 TransportType.cs, 1.1, 1.2 WebExceptionStatus.cs, 1.2, 1.3,
Rhys Weatherley <address@hidden> <=