5 // Atsushi Enomoto <atsushi@ximian.com>
7 // Copyright (C) 2009 Novell, Inc. http://www.novell.com
9 // Permission is hereby granted, free of charge, to any person obtaining
10 // a copy of this software and associated documentation files (the
11 // "Software"), to deal in the Software without restriction, including
12 // without limitation the rights to use, copy, modify, merge, publish,
13 // distribute, sublicense, and/or sell copies of the Software, and to
14 // permit persons to whom the Software is furnished to do so, subject to
15 // the following conditions:
17 // The above copyright notice and this permission notice shall be
18 // included in all copies or substantial portions of the Software.
20 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
24 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
25 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29 using System.ComponentModel;
32 using System.Runtime.InteropServices;
33 using System.Security.AccessControl;
34 using System.Security.Permissions;
35 using System.Security.Principal;
37 using Microsoft.Win32;
38 using Microsoft.Win32.SafeHandles;
40 namespace System.IO.Pipes
42 abstract class UnixAnonymousPipe : IPipe
44 protected UnixAnonymousPipe ()
48 public abstract SafePipeHandle Handle { get; }
50 public void WaitForPipeDrain ()
52 throw new NotImplementedException ();
56 class UnixAnonymousPipeClient : UnixAnonymousPipe, IAnonymousPipeClient
58 // AnonymousPipeClientStream owner;
60 public UnixAnonymousPipeClient (AnonymousPipeClientStream owner, SafePipeHandle handle)
62 // this.owner = owner;
67 SafePipeHandle handle;
69 public override SafePipeHandle Handle {
70 get { return handle; }
74 class UnixAnonymousPipeServer : UnixAnonymousPipe, IAnonymousPipeServer
76 // AnonymousPipeServerStream owner;
78 public UnixAnonymousPipeServer (AnonymousPipeServerStream owner, PipeDirection direction, HandleInheritability inheritability, int bufferSize)
80 // this.owner = owner;
82 throw new NotImplementedException ();
85 public UnixAnonymousPipeServer (AnonymousPipeServerStream owner, SafePipeHandle serverHandle, SafePipeHandle clientHandle)
87 // this.owner = owner;
89 this.server_handle = serverHandle;
90 this.client_handle = clientHandle;
92 throw new NotImplementedException ();
95 SafePipeHandle server_handle, client_handle;
97 public override SafePipeHandle Handle {
98 get { return server_handle; }
101 public SafePipeHandle ClientHandle {
102 get { return client_handle; }
105 public void DisposeLocalCopyOfClientHandle ()
107 throw new NotImplementedException ();
111 abstract class UnixNamedPipe : IPipe
113 public abstract SafePipeHandle Handle { get; }
115 public void WaitForPipeDrain ()
117 throw new NotImplementedException ();
121 class UnixNamedPipeClient : UnixNamedPipe, INamedPipeClient
123 // .ctor with existing handle
124 public UnixNamedPipeClient (NamedPipeClientStream owner, SafePipeHandle safePipeHandle)
126 throw new NotImplementedException ();
129 // .ctor without handle - create new
130 public UnixNamedPipeClient (NamedPipeClientStream owner, string serverName, string pipeName, PipeAccessRights desiredAccessRights, PipeOptions options, HandleInheritability inheritability)
132 throw new NotImplementedException ();
136 SafePipeHandle handle;
138 public override SafePipeHandle Handle {
139 get { return handle; }
142 public void Connect ()
144 throw new NotImplementedException ();
147 public void Connect (int timeout)
149 throw new NotImplementedException ();
152 public bool IsAsync {
153 get { return is_async; }
156 public int NumberOfServerInstances {
157 get { throw new NotImplementedException (); }
161 class UnixNamedPipeServer : UnixNamedPipe, INamedPipeServer
163 //NamedPipeServerStream owner;
165 // .ctor with existing handle
166 public UnixNamedPipeServer (NamedPipeServerStream owner, SafePipeHandle safePipeHandle)
168 this.handle = safePipeHandle;
169 //this.owner = owner;
172 // .ctor without handle - create new
173 public UnixNamedPipeServer (NamedPipeServerStream owner, string pipeName, int maxNumberOfServerInstances, PipeTransmissionMode transmissionMode, PipeAccessRights rights, PipeOptions options, int inBufferSize, int outBufferSize, HandleInheritability inheritability)
175 throw new NotImplementedException ();
178 SafePipeHandle handle;
180 public override SafePipeHandle Handle {
181 get { return handle; }
184 public void Disconnect ()
186 throw new NotImplementedException ();
189 public void WaitForConnection ()
191 throw new NotImplementedException ();