From 0d0f61ab9f890fcb2d1be05a6fba6df5eb7bad32 Mon Sep 17 00:00:00 2001 From: Sebastien Pouliot Date: Thu, 9 Apr 2009 15:22:34 +0000 Subject: [PATCH] Remove classes that are not in the final SL2 release. Add some SL2 short-versions of FX enums. svn path=/trunk/mcs/; revision=131394 --- mcs/class/System.Net/ChangeLog | 5 ++ ...PolicyCheckCallback.cs => AddressFamily_2_1.cs} | 17 ++--- mcs/class/System.Net/System.Net.Sockets/ChangeLog | 12 +++ ...nSocketPolicyManager.cs => ProtocolType_2_1.cs} | 37 ++-------- ...olicyManager.cs => SocketAsyncOperation_2_1.cs} | 34 +++------ .../System.Net.Sockets/SocketPolicyAsyncResult.cs | 86 ---------------------- .../{SocketSecurityState.cs => SocketType_2_1.cs} | 43 ++--------- mcs/class/System.Net/System.Net.dll.sources | 5 -- 8 files changed, 46 insertions(+), 193 deletions(-) rename mcs/class/System.Net/System.Net.Sockets/{SocketPolicyCheckCallback.cs => AddressFamily_2_1.cs} (81%) rename mcs/class/System.Net/System.Net.Sockets/{CrossDomainSocketPolicyManager.cs => ProtocolType_2_1.cs} (60%) rename mcs/class/System.Net/System.Net.Sockets/{ISocketPolicyManager.cs => SocketAsyncOperation_2_1.cs} (66%) delete mode 100644 mcs/class/System.Net/System.Net.Sockets/SocketPolicyAsyncResult.cs rename mcs/class/System.Net/System.Net.Sockets/{SocketSecurityState.cs => SocketType_2_1.cs} (57%) diff --git a/mcs/class/System.Net/ChangeLog b/mcs/class/System.Net/ChangeLog index f013c7b33cf..ed228984547 100644 --- a/mcs/class/System.Net/ChangeLog +++ b/mcs/class/System.Net/ChangeLog @@ -1,3 +1,8 @@ +2009-04-09 Sebastien Pouliot + + * System.Net.dll.sources: Remove classes that are not in the + final SL2 release + 2009-03-04 Rolf Bjarne Kvinge * System.Net.dll.sources: Added WriteStreamClosedEventArgs_2_1.cs diff --git a/mcs/class/System.Net/System.Net.Sockets/SocketPolicyCheckCallback.cs b/mcs/class/System.Net/System.Net.Sockets/AddressFamily_2_1.cs similarity index 81% rename from mcs/class/System.Net/System.Net.Sockets/SocketPolicyCheckCallback.cs rename to mcs/class/System.Net/System.Net.Sockets/AddressFamily_2_1.cs index 05ddf396f50..0b9bb2b479d 100644 --- a/mcs/class/System.Net/System.Net.Sockets/SocketPolicyCheckCallback.cs +++ b/mcs/class/System.Net/System.Net.Sockets/AddressFamily_2_1.cs @@ -1,10 +1,4 @@ -// -// System.Net.Sockets.SocketPolicyCheckCallback -// -// Author: -// Sebastien Pouliot -// -// Copyright (C) 2008 Novell, Inc (http://www.novell.com) +// AddressFamily.cs (Silverlight specific) // // Permission is hereby granted, free of charge, to any person obtaining // a copy of this software and associated documentation files (the @@ -30,8 +24,13 @@ namespace System.Net.Sockets { - public delegate void SocketPolicyCheckCallback (SocketPolicyAsyncResult result); - + public enum AddressFamily { + Unknown = -1, + Unspecified = 0, + InterNetwork = 2, + InterNetworkV6 = 23, + } } #endif + diff --git a/mcs/class/System.Net/System.Net.Sockets/ChangeLog b/mcs/class/System.Net/System.Net.Sockets/ChangeLog index fec54df71c0..905df39dec6 100644 --- a/mcs/class/System.Net/System.Net.Sockets/ChangeLog +++ b/mcs/class/System.Net/System.Net.Sockets/ChangeLog @@ -1,3 +1,15 @@ +2009-04-09 Sebastien Pouliot + + * AddressFamily_2_1.cs: New. SL2 (short) version of the enum + * ProtocolType_2_1.cs: New. SL2 (short) version of the enum + * CrossDomainSocketPolicyManager.cs: Removed (from SL2) + * ISocketPolicyManager.cs: Removed (from SL2) + * SocketAsyncOperation_2_1.cs:New. SL2 (short) version of the enum + * SocketPolicyAsyncResult.cs: Removed (from SL2) + * SocketPolicyCheckCallback.cs: Removed (from SL2) + * SocketSecurityState.cs: Removed (from SL2) + * SocketType_2_1.cs: New. SL2 (short) version of the enum + 2008-09-16 Sebastien Pouliot * CrossDomainSocketPolicyManager.cs: New. diff --git a/mcs/class/System.Net/System.Net.Sockets/CrossDomainSocketPolicyManager.cs b/mcs/class/System.Net/System.Net.Sockets/ProtocolType_2_1.cs similarity index 60% rename from mcs/class/System.Net/System.Net.Sockets/CrossDomainSocketPolicyManager.cs rename to mcs/class/System.Net/System.Net.Sockets/ProtocolType_2_1.cs index 297f3c8324a..d806f723671 100644 --- a/mcs/class/System.Net/System.Net.Sockets/CrossDomainSocketPolicyManager.cs +++ b/mcs/class/System.Net/System.Net.Sockets/ProtocolType_2_1.cs @@ -1,10 +1,4 @@ -// -// System.Net.Sockets.CrossDomainSocketPolicyManager -// -// Author: -// Sebastien Pouliot -// -// Copyright (C) 2008 Novell, Inc (http://www.novell.com) +// ProtocolType.cs (Silverlight specific) // // Permission is hereby granted, free of charge, to any person obtaining // a copy of this software and associated documentation files (the @@ -28,34 +22,15 @@ #if NET_2_1 -using System.Security; - namespace System.Net.Sockets { - [MonoTODO] - [SecurityCritical] - public class CrossDomainSocketPolicyManager : ISocketPolicyManager { - - public CrossDomainSocketPolicyManager () - { - } + public enum ProtocolType { - public CrossDomainSocketPolicyManager (Uri applicationUri) - { - } - - - public override SocketPolicyAsyncResult BeginPolicyCheck (ProtocolType protocol, IPEndPoint endPoint, - SocketPolicyCheckCallback callback, object userToken) - { - return new SocketPolicyAsyncResult (protocol, endPoint, callback, userToken); - } - - - static public void DoPolicyCheck (SocketPolicyAsyncResult result) - { - } + Unknown = -1, + Unspecified = 0, + Tcp = 6 } } #endif + diff --git a/mcs/class/System.Net/System.Net.Sockets/ISocketPolicyManager.cs b/mcs/class/System.Net/System.Net.Sockets/SocketAsyncOperation_2_1.cs similarity index 66% rename from mcs/class/System.Net/System.Net.Sockets/ISocketPolicyManager.cs rename to mcs/class/System.Net/System.Net.Sockets/SocketAsyncOperation_2_1.cs index f1d21779bb7..1260c7add6c 100644 --- a/mcs/class/System.Net/System.Net.Sockets/ISocketPolicyManager.cs +++ b/mcs/class/System.Net/System.Net.Sockets/SocketAsyncOperation_2_1.cs @@ -1,10 +1,11 @@ +// System.Net.Sockets.SocketAsyncOperation.cs (Silverlight specific) // -// System.Net.Sockets.ISocketPolicyManager +// Authors: +// Marek Habersack (mhabersack@novell.com) // -// Author: -// Sebastien Pouliot +// Copyright (c) 2008 Novell, Inc. (http://www.novell.com) // -// Copyright (C) 2008 Novell, Inc (http://www.novell.com) + // // Permission is hereby granted, free of charge, to any person obtaining // a copy of this software and associated documentation files (the @@ -27,27 +28,12 @@ // #if NET_2_1 - -using System.Security; - namespace System.Net.Sockets { - - [MonoTODO] - [SecurityCritical] - // LAME: this is NOT an interface - public abstract class ISocketPolicyManager { - - protected ISocketPolicyManager () - { - } - - public static ISocketPolicyManager Instance { - get { return null; } - } - - public abstract SocketPolicyAsyncResult BeginPolicyCheck (ProtocolType protocol, IPEndPoint endPoint, - SocketPolicyCheckCallback callback, object userToken); + public enum SocketAsyncOperation { + None, + Connect = 2, + Receive = 4, + Send = 7, } } - #endif diff --git a/mcs/class/System.Net/System.Net.Sockets/SocketPolicyAsyncResult.cs b/mcs/class/System.Net/System.Net.Sockets/SocketPolicyAsyncResult.cs deleted file mode 100644 index 0465a24de62..00000000000 --- a/mcs/class/System.Net/System.Net.Sockets/SocketPolicyAsyncResult.cs +++ /dev/null @@ -1,86 +0,0 @@ -// -// System.Net.Sockets.SocketPolicyAsyncResult -// -// Author: -// Sebastien Pouliot -// -// Copyright (C) 2008 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -#if NET_2_1 - -using System.Security; - -namespace System.Net.Sockets { - - [MonoTODO] - [SecurityCritical] - public class SocketPolicyAsyncResult { - - // more m_* fields - protected SocketPolicyCheckCallback m_Callback; - protected object m_UserToken; - - private IPEndPoint endpoint; - private ProtocolType protocol; - - - public SocketPolicyAsyncResult (ProtocolType protocol, IPEndPoint endpoint, SocketPolicyCheckCallback callback, - object userToken) - { - this.protocol = protocol; - this.endpoint = endpoint; - // safe bet - m_Callback = callback; - m_UserToken = userToken; - } - - public bool Aborted { get; set; } - - public bool Allowed { get; set; } - - public bool CompletedSynchronously { get; set; } - - public IPEndPoint EndPoint { - get { return endpoint; } - } - - public ProtocolType Protocol { - get { return protocol; } - } - - public object UserToken { - get { return m_UserToken; } - } - - - public virtual void Abort () - { - } - - public void Complete () - { - } - } -} - -#endif diff --git a/mcs/class/System.Net/System.Net.Sockets/SocketSecurityState.cs b/mcs/class/System.Net/System.Net.Sockets/SocketType_2_1.cs similarity index 57% rename from mcs/class/System.Net/System.Net.Sockets/SocketSecurityState.cs rename to mcs/class/System.Net/System.Net.Sockets/SocketType_2_1.cs index 7eae93dbde7..5e76dd9f61c 100644 --- a/mcs/class/System.Net/System.Net.Sockets/SocketSecurityState.cs +++ b/mcs/class/System.Net/System.Net.Sockets/SocketType_2_1.cs @@ -1,10 +1,4 @@ -// -// System.Net.Sockets.SocketSecurityState -// -// Author: -// Sebastien Pouliot -// -// Copyright (C) 2008 Novell, Inc (http://www.novell.com) +// SocketType.cs (Silverlight specific) // // Permission is hereby granted, free of charge, to any person obtaining // a copy of this software and associated documentation files (the @@ -28,40 +22,13 @@ #if NET_2_1 -using System.Security; - namespace System.Net.Sockets { - [MonoTODO] - [SecurityCritical] - public class SocketSecurityState : SecurityState { - - // somehow I think (or hope) the fields will be removed - // but since it's [SecurityCritical] it should not matter much (usage wise) - public bool m_CreateManager; - public Uri m_OriginHost; // note: not static - public ISocketPolicyManager m_SocketPolicyManager; // note: not static - - - protected SocketSecurityState () - { - } - - - public static string OriginHost { - get { return String.Empty; } - } - - public static ISocketPolicyManager SocketPolicyManager { - get { return null; } - } - - - public override void EnsureState () - { - throw new NotImplementedException (); - } + public enum SocketType { + Unknown = -1, + Stream = 1, } } #endif + diff --git a/mcs/class/System.Net/System.Net.dll.sources b/mcs/class/System.Net/System.Net.dll.sources index 86ccc20df38..ff2a3bbe4a6 100644 --- a/mcs/class/System.Net/System.Net.dll.sources +++ b/mcs/class/System.Net/System.Net.dll.sources @@ -16,11 +16,6 @@ System.Net/WebResponse_2_1.cs System.Net/WriteStreamClosedEventArgs_2_1.cs System.Net/WriteStreamClosedEventHandler_2_1.cs System.Net.Sockets/SocketException_2_1.cs -System.Net.Sockets/CrossDomainSocketPolicyManager.cs -System.Net.Sockets/ISocketPolicyManager.cs -System.Net.Sockets/SocketPolicyAsyncResult.cs -System.Net.Sockets/SocketPolicyCheckCallback.cs -System.Net.Sockets/SocketSecurityState.cs ../System/Assembly/AssemblyInfo.cs ../System/System.Net/AuthenticationSchemes.cs ../System/System.Net/AuthenticationSchemeSelector.cs -- 2.11.4.GIT