New test.
[mono.git] / mcs / class / System / System.Net.Security / NegotiateStream.cs
1 //
2 // System.Net.Security.NegotiateStream.cs
3 //
4 // Authors:
5 //      Tim Coleman (tim@timcoleman.com)
6 //
7 // Copyright (C) Tim Coleman, 2004
8 // (c) 2004 Novell, Inc. (http://www.novell.com)
9 //
10
11 //
12 // Permission is hereby granted, free of charge, to any person obtaining
13 // a copy of this software and associated documentation files (the
14 // "Software"), to deal in the Software without restriction, including
15 // without limitation the rights to use, copy, modify, merge, publish,
16 // distribute, sublicense, and/or sell copies of the Software, and to
17 // permit persons to whom the Software is furnished to do so, subject to
18 // the following conditions:
19 // 
20 // The above copyright notice and this permission notice shall be
21 // included in all copies or substantial portions of the Software.
22 // 
23 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
24 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
25 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
26 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
27 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
28 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
29 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
30 //
31
32 #if NET_2_0 
33
34 using System;
35 using System.IO;
36 using System.Net;
37 using System.Security.Principal;
38
39 namespace System.Net.Security 
40 {
41         public class NegotiateStream : AuthenticatedStream
42         {
43                 #region Fields
44
45                 int readTimeout;
46                 int writeTimeout;
47
48                 #endregion // Fields
49
50                 #region Constructors
51
52                 [MonoTODO]
53                 public NegotiateStream (Stream innerStream)
54                         : base (innerStream, false)
55                 {
56                 }
57
58                 [MonoTODO]
59                 public NegotiateStream (Stream innerStream, bool leaveStreamOpen)
60                         : base (innerStream, leaveStreamOpen)
61                 {
62                 }
63
64                 #endregion // Constructors
65
66                 #region Properties
67
68                 public override bool CanRead {
69                         get { return InnerStream.CanRead; }
70                 }
71
72                 public override bool CanSeek {
73                         get { return InnerStream.CanSeek; }
74                 }
75
76                 [MonoTODO]
77                 public override bool CanTimeout {
78                         get { throw new NotImplementedException (); }
79                 }
80
81                 public override bool CanWrite {
82                         get { return InnerStream.CanWrite; }
83                 }
84
85                 [MonoTODO]
86                 public virtual TokenImpersonationLevel ImpersonationLevel {
87                         get { throw new NotImplementedException (); }
88                 }
89
90                 [MonoTODO]
91                 public override bool IsAuthenticated { 
92                         get { throw new NotImplementedException (); }
93                 }
94
95                 [MonoTODO]
96                 public override bool IsEncrypted { 
97                         get { throw new NotImplementedException (); }
98                 }
99
100                 [MonoTODO]
101                 public override bool IsMutuallyAuthenticated { 
102                         get { throw new NotImplementedException (); }
103                 }
104
105                 [MonoTODO]
106                 public override bool IsServer { 
107                         get { throw new NotImplementedException (); }
108                 }
109
110                 [MonoTODO]
111                 public override bool IsSigned { 
112                         get { throw new NotImplementedException (); }
113                 }
114
115                 public override long Length {
116                         get { return InnerStream.Length; }
117                 }
118
119                 public override long Position {
120                         get { return InnerStream.Position; }
121                         set { InnerStream.Position = value; }
122                 }
123
124                 public override int ReadTimeout {
125                         get { return readTimeout; }
126                         set { readTimeout = value; }
127                 }
128
129                 [MonoTODO]      
130                 public virtual IIdentity RemoteIdentity {
131                         get { throw new NotImplementedException (); }
132                 }
133
134                 public override int WriteTimeout {
135                         get { return writeTimeout; }
136                         set { writeTimeout = value; }
137                 }
138
139                 #endregion // Properties
140
141                 #region Methods
142
143                 [MonoTODO]
144                 public virtual IAsyncResult BeginAuthenticateAsClient (AsyncCallback callback, object asyncState)
145                 {
146                         throw new NotImplementedException ();
147                 }
148
149                 [MonoTODO]
150                 public virtual IAsyncResult BeginAuthenticateAsClient (NetworkCredential credential, string targetName, AsyncCallback asyncCallback, object asyncState)
151                 {
152                         throw new NotImplementedException ();
153                 }
154
155                 [MonoTODO]
156                 public virtual IAsyncResult BeginAuthenticateAsClient (NetworkCredential credential, string targetName, ProtectionLevel requiredProtectionLevel, TokenImpersonationLevel allowedImpersonationLevel, AsyncCallback asyncCallback, object asyncState)
157                 {
158                         throw new NotImplementedException ();
159                 }
160
161                 [MonoTODO]
162                 public override IAsyncResult BeginRead (byte[] buffer, int offset, int count, AsyncCallback asyncCallback, object asyncState)
163                 {
164                         throw new NotImplementedException ();
165                 }
166
167                 [MonoTODO]
168                 public virtual IAsyncResult BeginAuthenticateAsServer (AsyncCallback callback, object asyncState)
169                 {
170                         throw new NotImplementedException ();
171                 }
172
173                 [MonoTODO]
174                 public virtual IAsyncResult BeginAuthenticateAsServer (NetworkCredential credential, ProtectionLevel requiredProtectionLevel, TokenImpersonationLevel requiredImpersonationLevel, AsyncCallback asyncCallback, object asyncState)
175                 {
176                         throw new NotImplementedException ();
177                 }
178
179                 [MonoTODO]
180                 public override IAsyncResult BeginWrite (byte[] buffer, int offset, int count, AsyncCallback asyncCallback, object asyncState)
181                 {
182                         throw new NotImplementedException ();
183                 }
184
185                 [MonoTODO]
186                 public virtual void AuthenticateAsClient ()
187                 {
188                         throw new NotImplementedException ();
189                 }
190
191                 [MonoTODO]
192                 public virtual void AuthenticateAsClient (NetworkCredential credential, string targetName)
193                 {
194                         throw new NotImplementedException ();
195                 }
196
197                 [MonoTODO]
198                 public virtual void AuthenticateAsClient (NetworkCredential credential, string targetName, ProtectionLevel requiredProtectionLevel, TokenImpersonationLevel requiredImpersonationLevel)
199                 {
200                         throw new NotImplementedException ();
201                 }
202
203                 [MonoTODO]
204                 public virtual void AuthenticateAsServer ()
205                 {
206                         throw new NotImplementedException ();
207                 }
208
209                 [MonoTODO]
210                 public virtual void AuthenticateAsServer (NetworkCredential credential, ProtectionLevel requiredProtectionLevel, TokenImpersonationLevel requiredImpersonationLevel)
211                 {
212                         throw new NotImplementedException ();
213                 }
214                 
215                 [MonoTODO]
216                 protected override void Dispose (bool disposing)
217                 {
218                         if (disposing){
219                                 // TODO
220                         }
221                 }
222
223                 [MonoTODO]
224                 public virtual void EndAuthenticateAsClient (IAsyncResult asyncResult)
225                 {
226                         throw new NotImplementedException ();
227                 }
228
229                 [MonoTODO]
230                 public override int EndRead (IAsyncResult asyncResult)
231                 {
232                         throw new NotImplementedException ();
233                 }
234
235                 [MonoTODO]
236                 public virtual void EndAuthenticateAsServer (IAsyncResult asyncResult)
237                 {
238                         throw new NotImplementedException ();
239                 }
240
241                 [MonoTODO]
242                 public override void EndWrite (IAsyncResult asyncResult)
243                 {
244                         throw new NotImplementedException ();
245                 }
246
247                 [MonoTODO]
248                 public override void Flush ()
249                 {
250                         InnerStream.Flush ();
251                 }
252
253                 [MonoTODO]
254                 public override int Read (byte[] buffer, int offset, int count)
255                 {
256                         throw new NotImplementedException ();
257                 }
258
259                 [MonoTODO]
260                 public override long Seek (long offset, SeekOrigin origin)
261                 {
262                         throw new NotImplementedException ();
263                 }
264
265                 [MonoTODO]
266                 public override void SetLength (long value)
267                 {
268                         throw new NotImplementedException ();
269                 }
270
271                 [MonoTODO]
272                 public override void Write (byte[] buffer, int offset, int count)
273                 {
274                         throw new NotImplementedException ();
275                 }
276
277                 #endregion // Methods
278         }
279 }
280
281 #endif