dotgnu-pnet-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Dotgnu-pnet-commits] CVS: pnetlib/runtime/System/Runtime/Remoting/Chan


From: Rhys Weatherley <address@hidden>
Subject: [Dotgnu-pnet-commits] CVS: pnetlib/runtime/System/Runtime/Remoting/Channels BaseChannelObjectWithProperties.cs,NONE,1.1 BaseChannelSinkWithProperties.cs,NONE,1.1 BaseChannelWithProperties.cs,NONE,1.1 ChannelDataStore.cs,NONE,1.1 ChannelServices.cs,NONE,1.1 ClientChannelSinkStack.cs,NONE,1.1 IChannel.cs,NONE,1.1 IChannelDataStore.cs,NONE,1.1 IChannelReceiver.cs,NONE,1.1 IChannelReceiverHook.cs,NONE,1.1 IChannelSender.cs,NONE,1.1 IChannelSinkBase.cs,NONE,1.1 IClientChannelSink.cs,NONE,1.1IClientChannelSinkProvider.cs,NONE,1.1 IClientChannelSinkStack.cs,NONE,1.1IClientFormatterSink.cs,NONE,1.1 IClientFormatterSinkProvider.cs,NONE,1.1 IClientResponseChannelSinkStack.cs,NONE,1.1IServerChannelSink.cs,NONE,1.1 IServerChannelSinkProvider.cs,NONE,1.1IServerChannelSinkStack.cs,NONE,1.1 IServerFormatterSinkProvider.cs,NONE,1.1 IServerResponseChannelSinkStack.cs,NONE,1.1 ITransportHeaders.cs,NONE,1.1 Makefile,NONE,1.1 ServerChannelSinkStack.cs,NONE,1.1 ServerProcessing.cs,NONE,1.1 SinkProviderData.cs,NONE,1.1 TransportHeaders.cs,NONE,1.1
Date: Thu, 17 Apr 2003 06:36:11 -0400

Update of /cvsroot/dotgnu-pnet/pnetlib/runtime/System/Runtime/Remoting/Channels
In directory 
subversions:/tmp/cvs-serv31157/runtime/System/Runtime/Remoting/Channels

Added Files:
        BaseChannelObjectWithProperties.cs 
        BaseChannelSinkWithProperties.cs BaseChannelWithProperties.cs 
        ChannelDataStore.cs ChannelServices.cs 
        ClientChannelSinkStack.cs IChannel.cs IChannelDataStore.cs 
        IChannelReceiver.cs IChannelReceiverHook.cs IChannelSender.cs 
        IChannelSinkBase.cs IClientChannelSink.cs 
        IClientChannelSinkProvider.cs IClientChannelSinkStack.cs 
        IClientFormatterSink.cs IClientFormatterSinkProvider.cs 
        IClientResponseChannelSinkStack.cs IServerChannelSink.cs 
        IServerChannelSinkProvider.cs IServerChannelSinkStack.cs 
        IServerFormatterSinkProvider.cs 
        IServerResponseChannelSinkStack.cs ITransportHeaders.cs 
        Makefile ServerChannelSinkStack.cs ServerProcessing.cs 
        SinkProviderData.cs TransportHeaders.cs 
Log Message:


Stub out a large number of classes under the "System.Runtime.Remoting"
namespace; add the "CONFIG_REMOTING" define to selection compilation of
remoting.


--- NEW FILE ---
/*
 * BaseChannelObjectWithProperties.cs - Implementation of the
 *      "System.Runtime.Remoting.Channels.BaseChannelObjectWithProperties" 
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.Runtime.Remoting.Channels
{

#if CONFIG_REMOTING

using System.Collections;

public abstract class BaseChannelObjectWithProperties
        : IDictionary, ICollection, IEnumerable
{

        // Constructor.
        public BaseChannelObjectWithProperties() {}

        // Implement the IDictionary interface.
        public virtual void Add(Object key, Object value)
                        {
                                // Normally overrridden by subclasses.
                                throw new NotSupportedException();
                        }
        public virtual void Clear()
                        {
                                // Normally overrridden by subclasses.
                                throw new NotSupportedException();
                        }
        public virtual bool Contains(Object key)
                        {
                                ICollection keys = Keys;
                                if(keys != null && key != null)
                                {
                                        foreach(Object value in keys)
                                        {
                                                if(key.Equals(value))
                                                {
                                                        return true;
                                                }
                                        }
                                        return false;
                                }
                                else
                                {
                                        return false;
                                }
                        }
        public virtual IDictionaryEnumerator GetEnumerator()
                        {
                                return new BaseObjectEnumerator(this);
                        }
        public virtual void Remove(Object key)
                        {
                                // Normally overrridden by subclasses.
                                throw new NotSupportedException();
                        }
        public virtual bool IsFixedSize
                        {
                                get
                                {
                                        return true;
                                }
                        }
        public virtual bool IsReadOnly
                        {
                                get
                                {
                                        return false;
                                }
                        }
        public virtual Object this[Object key]
                        {
                                get
                                {
                                        return null;
                                }
                                set
                                {
                                        throw new NotImplementedException();
                                }
                        }
        public virtual ICollection Keys
                        {
                                get
                                {
                                        // Normally overridden by subclasses.
                                        return null;
                                }
                        }
        public virtual ICollection Values
                        {
                                get
                                {
                                        ICollection keys = Keys;
                                        if(keys == null)
                                        {
                                                return null;
                                        }
                                        ArrayList list = new ArrayList();
                                        foreach(Object obj in keys)
                                        {
                                                list.Add(this[obj]);
                                        }
                                        return list;
                                }
                        }

        // Implement the ICollection interface.
        public virtual void CopyTo(Array array, int index)
                        {
                                // Normally overrridden by subclasses.
                                throw new NotSupportedException();
                        }
        public virtual int Count
                        {
                                get
                                {
                                        ICollection keys = Keys;
                                        if(keys != null)
                                        {
                                                return keys.Count;
                                        }
                                        else
                                        {
                                                return 0;
                                        }
                                }
                        }
        public virtual bool IsSynchronized
                        {
                                get
                                {
                                        return false;
                                }
                        }
        public virtual Object SyncRoot
                        {
                                get
                                {
                                        return this;
                                }
                        }

        // Implement the IEnumerable interface.
        IEnumerator IEnumerable.GetEnumerator()
                        {
                                return new BaseObjectEnumerator(this);
                        }

        // Get the properties associated with this object.
        public virtual IDictionary Properties
                        {
                                get
                                {
                                        return this;
                                }
                        }

        // Enumerator for this class.
        private sealed class BaseObjectEnumerator : IDictionaryEnumerator
        {
                // Internal state.
                private BaseChannelObjectWithProperties obj;
                private IEnumerator enumerator;

                // Constructor.
                public BaseObjectEnumerator(BaseChannelObjectWithProperties obj)
                                {
                                        this.obj = obj;
                                        ICollection keys = obj.Keys;
                                        if(keys != null)
                                        {
                                                enumerator = 
keys.GetEnumerator();
                                        }
                                        else
                                        {
                                                enumerator = null;
                                        }
                                }

                // Implement the IEnumerable interface.
                public bool MoveNext()
                                {
                                        if(enumerator != null)
                                        {
                                                return enumerator.MoveNext();
                                        }
                                        else
                                        {
                                                return false;
                                        }
                                }
                public void Reset()
                                {
                                        if(enumerator != null)
                                        {
                                                enumerator.Reset();
                                        }
                                }
                public Object Current
                                {
                                        get
                                        {
                                                return Entry;
                                        }
                                }

                // Implement the IDictionaryEnumerator interface.
                public DictionaryEntry Entry
                                {
                                        get
                                        {
                                                return new DictionaryEntry(Key, 
Value);
                                        }
                                }
                public Object Key
                                {
                                        get
                                        {
                                                if(enumerator != null)
                                                {
                                                        return 
enumerator.Current;
                                                }
                                                else
                                                {
                                                        throw new 
InvalidOperationException
                                                                
(_("Invalid_BadEnumeratorPosition"));
                                                }
                                        }
                                }
                public Object Value
                                {
                                        get
                                        {
                                                return obj[Key];
                                        }
                                }

        }; // class BaseObjectEnumerator

}; // class BaseChannelObjectWithProperties

#endif // CONFIG_REMOTING

}; // namespace System.Runtime.Remoting.Channels

--- NEW FILE ---
/*
 * BaseChannelSinkWithProperties.cs - Implementation of the
 *      "System.Runtime.Remoting.Channels.BaseChannelSinkWithProperties" 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.Runtime.Remoting.Channels
{

#if CONFIG_REMOTING

public abstract class BaseChannelSinkWithProperties
        : BaseChannelObjectWithProperties
{

        // Constructor.
        protected BaseChannelSinkWithProperties() {}

}; // class BaseChannelSinkWithProperties

#endif // CONFIG_REMOTING

}; // namespace System.Runtime.Remoting.Channels

--- NEW FILE ---
/*
 * BaseChannelWithProperties.cs - Implementation of the
 *      "System.Runtime.Remoting.Channels.BaseChannelWithProperties" 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.Runtime.Remoting.Channels
{

#if CONFIG_REMOTING

using System.Collections;

public abstract class BaseChannelWithProperties
        : BaseChannelObjectWithProperties
{
        // Accessible state.
        protected IChannelSinkBase SinksWithProperties;

        // Constructor.
        protected BaseChannelWithProperties() {}

        // Get the properties associated with this object.
        [TODO]
        public override IDictionary Properties
                        {
                                get
                                {
                                        // TODO
                                        return null;
                                }
                        }

}; // class BaseChannelWithProperties

#endif // CONFIG_REMOTING

}; // namespace System.Runtime.Remoting.Channels

--- NEW FILE ---
/*
 * ChannelDataStore.cs - Implementation of the
 *                      "System.Runtime.Remoting.Channels.ChannelDataStore" 
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.Runtime.Remoting.Channels
{

#if CONFIG_REMOTING

using System.Collections;

[Serializable]
public class ChannelDataStore : IChannelDataStore
{
        // Internal state.
        private String[] channelURIs;
        private Hashtable items;

        // Constructor.
        public ChannelDataStore(String[] channelURIs)
                        {
                                this.channelURIs = channelURIs;
                        }

        // Get or set the channel URI's for this data store.
        public String[] ChannelUris
                        {
                                get
                                {
                                        return channelURIs;
                                }
                                set
                                {
                                        channelURIs = value;
                                }
                        }

        // Get or set an item in this data store.
        public Object this[Object key]
                        {
                                get
                                {
                                        if(items == null)
                                        {
                                                return null;
                                        }
                                        else
                                        {
                                                return items[key];
                                        }
                                }
                                set
                                {
                                        if(items == null)
                                        {
                                                items = new Hashtable();
                                        }
                                        items[key] = value;
                                }
                        }

}; // class ChannelDataStore

#endif // CONFIG_REMOTING

}; // namespace System.Runtime.Remoting.Channels

--- NEW FILE ---
/*
 * ChannelServices.cs - Implementation of the
 *                      "System.Runtime.Remoting.Channels.ChannelServices" 
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.Runtime.Remoting.Channels
{

#if CONFIG_REMOTING

using System.Collections;
using System.Runtime.Remoting.Messaging;

public sealed class ChannelServices
{
        // This class cannot be instantiated.
        private ChannelServices() {}

        // Get the registered channels.
        [TODO]
        public static IChannel[] RegisteredChannels
                        {
                                get
                                {
                                        // TODO
                                        return null;
                                }
                        }

        // Asynchronously dispatch a message.
        [TODO]
        public static IMessageCtrl AsyncDispatchMessage
                                (IMessage msg, IMessageSink replySink)
                        {
                                if(msg == null)
                                {
                                        throw new ArgumentNullException("msg");
                                }
                                // TODO
                                return null;
                        }

        // Create a server channel sink chain.
        [TODO]
        public static IServerChannelSink CreateServerChannelSinkChain
                                (IServerChannelSinkProvider provider, 
IChannelReceiver channel)
                        {
                                // TODO
                                return null;
                        }

        // Dispatch in incoming message.
        [TODO]
        public static ServerProcessing DispatchMessage
                                (IServerChannelSinkStack sinkStack, IMessage 
msg,
                         out IMessage replyMsg)
                        {
                                if(msg == null)
                                {
                                        throw new ArgumentNullException("msg");
                                }
                                // TODO
                                replyMsg = null;
                                return ServerProcessing.Complete;
                        }

        // Get a registered channel.
        [TODO]
        public static IChannel GetChannel(String name)
                        {
                                // TODO
                                return null;
                        }

        // Get the sink properties for a channel.
        [TODO]
        public static IDictionary GetChannelSinkProperties(Object obj)
                        {
                                // TODO
                                return null;
                        }

        // Get the URL's that can be used to reach an object.
        [TODO]
        public static String[] GetUrlsForObject(MarshalByRefObject obj)
                        {
                                // TODO
                                return null;
                        }

        // Register a channel.
        [TODO]
        public static void RegisterChannel(IChannel chnl)
                        {
                                if(chnl == null)
                                {
                                        throw new ArgumentNullException("chnl");
                                }
                                // TODO
                        }

        // Synchronously dispatch a message.
        [TODO]
        public static IMessage SyncDispatchMessage(IMessage msg)
                        {
                                if(msg == null)
                                {
                                        throw new ArgumentNullException("msg");
                                }
                                // TODO
                                return null;
                        }

        // Unregister a channel.
        [TODO]
        public static void UnregisterChannel(IChannel chnl)
                        {
                                if(chnl == null)
                                {
                                        throw new ArgumentNullException("chnl");
                                }
                                // TODO
                        }

}; // class ChannelServices

#endif // CONFIG_REMOTING

}; // namespace System.Runtime.Remoting.Channels

--- NEW FILE ---
/*
 * ClientChannelSinkStack.cs - Implementation of the
 *                      
"System.Runtime.Remoting.Channels.ClientChannelSinkStack" 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.Runtime.Remoting.Channels
{

#if CONFIG_REMOTING

using System.IO;
using System.Runtime.Remoting.Messaging;

public class ClientChannelSinkStack
        : IClientChannelSinkStack, IClientResponseChannelSinkStack
{
        // Constructors.
        [TODO]
        public ClientChannelSinkStack()
                        {
                                // TODO
                        }
        [TODO]
        public ClientChannelSinkStack(IMessageSink replySink)
                        {
                                // TODO
                        }

        // Pop an item from the stack.
        [TODO]
        public Object Pop(IClientChannelSink sink)
                        {
                                // TODO
                                return null;
                        }

        // Push an item onto the stack.
        [TODO]
        public void Push(IClientChannelSink sink, Object state)
                        {
                                // TODO
                        }

        // Request asynchronous processing of a response.
        [TODO]
        public void AsyncProcessResponse(ITransportHeaders headers, Stream 
stream)
                        {
                                // TODO
                        }

        // Dispatch an exception on the reply sink.
        [TODO]
        public void DispatchException(Exception e)
                        {
                                // TODO
                        }

        // Dispatch a reply message on the reply sink.
        [TODO]
        public void DispatchReplyMessage(IMessage msg)
                        {
                                // TODO
                        }

}; // class ClientChannelSinkStack

#endif // CONFIG_REMOTING

}; // namespace System.Runtime.Remoting.Channels

--- NEW FILE ---
/*
 * IChannel.cs - Implementation of the
 *                      "System.Runtime.Remoting.Channels.IChannel" 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.Runtime.Remoting.Channels
{

#if CONFIG_REMOTING

public interface IChannel
{
        // Get the name of this channel.
        String ChannelName { get; }

        // Get the priority of this channel.
        int ChannelPriority { get; }

        // Parse a channel URI.
        String Parse(String url, out String objectURI);

}; // interface IChannel

#endif // CONFIG_REMOTING

}; // namespace System.Runtime.Remoting.Channels

--- NEW FILE ---
/*
 * IChannelDataStore.cs - Implementation of the
 *                      "System.Runtime.Remoting.Channels.IChannelDataStore" 
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.Runtime.Remoting.Channels
{

#if CONFIG_REMOTING

public interface IChannelDataStore
{
        // Get the channel URI's for this data store.
        String[] ChannelUris { get; }

        // Get or set an item in this data store.
        Object this[Object key] { get; set; }

}; // interface IChannelDataStore

#endif // CONFIG_REMOTING

}; // namespace System.Runtime.Remoting.Channels

--- NEW FILE ---
/*
 * IChannelReceiver.cs - Implementation of the
 *                      "System.Runtime.Remoting.Channels.IChannelReceiver" 
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.Runtime.Remoting.Channels
{

#if CONFIG_REMOTING

public interface IChannelReceiver : IChannel
{
        // Get the channel data.
        Object ChannelData { get; }

        // Get all URL's for a URI.
        String[] GetUrlsForUri(String objectURI);

        // Start listening.
        void StartListening(Object data);

        // Stop listening.
        void StopListening(Object data);

}; // interface IChannelReceiver

#endif // CONFIG_REMOTING

}; // namespace System.Runtime.Remoting.Channels

--- NEW FILE ---
/*
 * IChannelReceiverHook.cs - Implementation of the
 *                      "System.Runtime.Remoting.Channels.IChannelReceiverHook" 
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.Runtime.Remoting.Channels
{

#if CONFIG_REMOTING

public interface IChannelReceiverHook
{
        // Get the channel access scheme.
        String ChannelScheme { get; }

        // Get the sink chain being used by this channel.
        IServerChannelSink ChannelSinkChain { get; }

        // Determine if this hook wants to listen on the "outside".
        bool WantsToListen { get; }

        // Add a channel URI to listen to.
        void AddHookChannelUri(String channelUri);

}; // interface IChannelReceiverHook

#endif // CONFIG_REMOTING

}; // namespace System.Runtime.Remoting.Channels

--- NEW FILE ---
/*
 * IChannelSender.cs - Implementation of the
 *                      "System.Runtime.Remoting.Channels.IChannelSender" 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.Runtime.Remoting.Channels
{

#if CONFIG_REMOTING

using System.Runtime.Remoting.Messaging;

public interface IChannelSender : IChannel
{
        // Create a message sink for this sender.
        IMessageSink CreateMessageSink
                        (String url, Object remoteChannelData, out String 
objectURI);

}; // interface IChannelSender

#endif // CONFIG_REMOTING

}; // namespace System.Runtime.Remoting.Channels

--- NEW FILE ---
/*
 * IChannelSinkBase.cs - Implementation of the
 *                      "System.Runtime.Remoting.Channels.IChannelSinkBase" 
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.Runtime.Remoting.Channels
{

#if CONFIG_REMOTING

using System.Collections;

public interface IChannelSinkBase
{
        // Get the sink properties.
        IDictionary Properties { get; }

}; // interface IChannelSinkBase

#endif // CONFIG_REMOTING

}; // namespace System.Runtime.Remoting.Channels

--- NEW FILE ---
/*
 * IClientChannelSink.cs - Implementation of the
 *                      "System.Runtime.Remoting.Channels.IClientChannelSink" 
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.Runtime.Remoting.Channels
{

#if CONFIG_REMOTING

using System.IO;
using System.Runtime.Remoting.Messaging;

public interface IClientChannelSink : IChannelSinkBase
{
        // Get the next sink in the chain.
        IClientChannelSink NextChannelSink { get; }

        // Request asynchonous processing of a request.
        void AsyncProcessRequest
                        (IClientChannelSinkStack sinkStack, IMessage msg,
                         ITransportHeaders headers, Stream stream);

        // Request asynchronous processing of a response.
        void AsyncProcessResponse
                        (IClientResponseChannelSinkStack sinkStack,
                         Object state, ITransportHeaders headers, Stream 
stream);

        // Get the request stream.
        Stream GetRequestStream(IMessage msg, ITransportHeaders headers);

        // Process a message.
        void ProcessMessage
                        (IMessage msg, ITransportHeaders requestHeaders,
                         Stream requestStream, out ITransportHeaders 
responseHeaders,
                         out Stream responseStream);

}; // interface IClientChannelSink

#endif // CONFIG_REMOTING

}; // namespace System.Runtime.Remoting.Channels

--- NEW FILE ---
/*
 * IClientChannelSinkProvider.cs - Implementation of the
 *                      
"System.Runtime.Remoting.Channels.IClientChannelSinkProvider" 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.Runtime.Remoting.Channels
{

#if CONFIG_REMOTING

public interface IClientChannelSinkProvider
{
        // Get or set the next sink provider in the chain.
        IClientChannelSinkProvider Next { get; set; }

        // Create a sink.
        IClientChannelSink CreateSink
                        (IChannelSender channel, String url, Object 
remoteChannelData);

}; // interface IClientChannelSinkProvider

#endif // CONFIG_REMOTING

}; // namespace System.Runtime.Remoting.Channels

--- NEW FILE ---
/*
 * IClientChannelSinkStack.cs - Implementation of the
 *                      
"System.Runtime.Remoting.Channels.IClientChannelSinkStack" 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.Runtime.Remoting.Channels
{

#if CONFIG_REMOTING

using System.IO;
using System.Runtime.Remoting.Messaging;

public interface IClientChannelSinkStack
        : IClientResponseChannelSinkStack
{
        // Pop an item from the stack.
        Object Pop(IClientChannelSink sink);

        // Push an item onto the stack.
        void Push(IClientChannelSink sink, Object state);

}; // interface IClientChannelSinkStack

#endif // CONFIG_REMOTING

}; // namespace System.Runtime.Remoting.Channels

--- NEW FILE ---
/*
 * IClientFormatterSink.cs - Implementation of the
 *                      "System.Runtime.Remoting.Channels.IClientFormatterSink" 
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.Runtime.Remoting.Channels
{

#if CONFIG_REMOTING

using System.Runtime.Remoting.Messaging;

public interface IClientFormatterSink
        : IMessageSink, IClientChannelSink, IChannelSinkBase
{
        // Does not have any members.

}; // interface IClientFormatterSink

#endif // CONFIG_REMOTING

}; // namespace System.Runtime.Remoting.Channels

--- NEW FILE ---
/*
 * IClientFormatterSinkProvider.cs - Implementation of the
 *      "System.Runtime.Remoting.Channels.IClientFormatterSinkProvider" 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.Runtime.Remoting.Channels
{

#if CONFIG_REMOTING

public interface IClientFormatterSinkProvider
        : IClientChannelSinkProvider
{
        // Does not have any members.

}; // interface IClientFormatterSinkProvider

#endif // CONFIG_REMOTING

}; // namespace System.Runtime.Remoting.Channels

--- NEW FILE ---
/*
 * IClientResponseChannelSinkStack.cs - Implementation of the
 *      "System.Runtime.Remoting.Channels.IClientResponseChannelSinkStack" 
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.Runtime.Remoting.Channels
{

#if CONFIG_REMOTING

using System.IO;
using System.Runtime.Remoting.Messaging;

public interface IClientResponseChannelSinkStack
{
        // Request asynchronous processing of a response.
        void AsyncProcessResponse(ITransportHeaders headers, Stream stream);

        // Dispatch an exception on the reply sink.
        void DispatchException(Exception e);

        // Dispatch a reply message on the reply sink.
        void DispatchReplyMessage(IMessage msg);

}; // interface IClientResponseChannelSinkStack

#endif // CONFIG_REMOTING

}; // namespace System.Runtime.Remoting.Channels

--- NEW FILE ---
/*
 * IServerChannelSink.cs - Implementation of the
 *                      "System.Runtime.Remoting.Channels.IServerChannelSink" 
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.Runtime.Remoting.Channels
{

#if CONFIG_REMOTING

using System.IO;
using System.Runtime.Remoting.Messaging;

public interface IServerChannelSink : IChannelSinkBase
{
        // Get the next sink in the chain.
        IServerChannelSink NextChannelSink { get; }

        // Request asynchronous processing of a response.
        void AsyncProcessResponse
                        (IServerResponseChannelSinkStack sinkStack,
                         Object state, IMessage msg,
                         ITransportHeaders headers, Stream stream);

        // Get the request stream.
        Stream GetResponseStream
                        (IServerResponseChannelSinkStack sinkStack,
                         Object state, IMessage msg, ITransportHeaders headers);

        // Process a message.
        ServerProcessing ProcessMessage
                        (IServerChannelSinkStack sinkStack, IMessage requestMsg,
                         ITransportHeaders requestHeaders, Stream requestStream,
                         out IMessage responseMsg, out ITransportHeaders 
responseHeaders,
                         out Stream responseStream);

}; // interface IServerChannelSink

#endif // CONFIG_REMOTING

}; // namespace System.Runtime.Remoting.Channels

--- NEW FILE ---
/*
 * IServerChannelSinkProvider.cs - Implementation of the
 *                      
"System.Runtime.Remoting.Channels.IServerChannelSinkProvider" 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.Runtime.Remoting.Channels
{

#if CONFIG_REMOTING

public interface IServerChannelSinkProvider
{
        // Get or set the next sink provider in the chain.
        IServerChannelSinkProvider Next { get; set; }

        // Create a sink.
        IServerChannelSink CreateSink(IChannelReceiver channel);

        // Get channel data.
        void GetChannelData(IChannelDataStore channelData);

}; // interface IServerChannelSinkProvider

#endif // CONFIG_REMOTING

}; // namespace System.Runtime.Remoting.Channels

--- NEW FILE ---
/*
 * IServerChannelSinkStack.cs - Implementation of the
 *                      
"System.Runtime.Remoting.Channels.IServerChannelSinkStack" 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.Runtime.Remoting.Channels
{

#if CONFIG_REMOTING

using System.IO;
using System.Runtime.Remoting.Messaging;

public interface IServerChannelSinkStack
        : IServerResponseChannelSinkStack
{
        // Pop an item from the stack.
        Object Pop(IServerChannelSink sink);

        // Push an item onto the stack.
        void Push(IServerChannelSink sink, Object state);

}; // interface IServerChannelSinkStack

#endif // CONFIG_REMOTING

}; // namespace System.Runtime.Remoting.Channels

--- NEW FILE ---
/*
 * IServerFormatterSinkProvider.cs - Implementation of the
 *      "System.Runtime.Remoting.Channels.IServerFormatterSinkProvider" 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.Runtime.Remoting.Channels
{

#if CONFIG_REMOTING

public interface IServerFormatterSinkProvider
        : IServerChannelSinkProvider
{
        // Does not have any members.

}; // interface IServerFormatterSinkProvider

#endif // CONFIG_REMOTING

}; // namespace System.Runtime.Remoting.Channels

--- NEW FILE ---
/*
 * IServerResponseChannelSinkStack.cs - Implementation of the
 *      "System.Runtime.Remoting.Channels.IServerResponseChannelSinkStack" 
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.Runtime.Remoting.Channels
{

#if CONFIG_REMOTING

using System.IO;
using System.Runtime.Remoting.Messaging;

public interface IServerResponseChannelSinkStack
{
        // Get the response stream.
        Stream GetResponseStream(IMessage msg, ITransportHeaders headers);

}; // interface IServerResponseChannelSinkStack

#endif // CONFIG_REMOTING

}; // namespace System.Runtime.Remoting.Channels

--- NEW FILE ---
/*
 * ITransportHeaders.cs - Implementation of the
 *                      "System.Runtime.Remoting.Channels.ITransportHeaders" 
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.Runtime.Remoting.Channels
{

#if CONFIG_REMOTING

using System.Collections;

public interface ITransportHeaders
{
        // Get or set a header value.
        Object this[Object key] { get; set; }

        // Get an enumerator for the header list.
        IEnumerator GetEnumerator();

}; // interface ITransportHeaders

#endif // CONFIG_REMOTING

}; // namespace System.Runtime.Remoting.Channels

--- NEW FILE ---

# The build is done in "runtime", so cd up and use that Makefile.

all:
        (cd ../../../..;make)

--- NEW FILE ---
/*
 * ServerChannelSinkStack.cs - Implementation of the
 *                      
"System.Runtime.Remoting.Channels.ServerChannelSinkStack" 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.Runtime.Remoting.Channels
{

#if CONFIG_REMOTING

using System.IO;
using System.Runtime.Remoting.Messaging;

public class ServerChannelSinkStack
        : IServerChannelSinkStack, IServerResponseChannelSinkStack
{
        // Constructors.
        [TODO]
        public ServerChannelSinkStack()
                        {
                                // TODO
                        }

        // Get the response stream.
        [TODO]
        public Stream GetResponseStream(IMessage msg, ITransportHeaders headers)
                        {
                                // TODO
                                return null;
                        }

        // Pop an item from the stack.
        [TODO]
        public Object Pop(IServerChannelSink sink)
                        {
                                // TODO
                                return null;
                        }

        // Push an item onto the stack.
        [TODO]
        public void Push(IServerChannelSink sink, Object state)
                        {
                                // TODO
                        }

}; // class ServerChannelSinkStack

#endif // CONFIG_REMOTING

}; // namespace System.Runtime.Remoting.Channels

--- NEW FILE ---
/*
 * ServerProcessing.cs - Implementation of the
 *                      "System.Runtime.Remoting.Channels.ServerProcessing" 
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.Runtime.Remoting.Channels
{

#if CONFIG_REMOTING

[Serializable]
public enum ServerProcessing
{
        Complete        = 0,
        OneWay          = 1,
        Async           = 2

}; // enum ServerProcessing

#endif // CONFIG_REMOTING

}; // namespace System.Runtime.Remoting.Channels

--- NEW FILE ---
/*
 * SinkProviderData.cs - Implementation of the
 *                      "System.Runtime.Remoting.Channels.SinkProviderData" 
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.Runtime.Remoting.Channels
{

#if CONFIG_REMOTING

using System.Collections;

public class SinkProviderData
{
        // Internal state.
        private String name;
        private ArrayList children;
        private Hashtable properties;

        // Constructor.
        public SinkProviderData(String name)
                        {
                                this.name = name;
                                this.children = new ArrayList();
                                this.properties = new Hashtable();
                        }

        // Get a list of children.
        public IList Children
                        {
                                get
                                {
                                        return children;
                                }
                        }

        // Get the name of this sink provider data object.
        public String Name
                        {
                                get
                                {
                                        return name;
                                }
                        }

        // Get the properties on this sink provider data object.
        public IDictionary Properties
                        {
                                get
                                {
                                        return properties;
                                }
                        }

}; // class SinkProviderData

#endif // CONFIG_REMOTING

}; // namespace System.Runtime.Remoting.Channels

--- NEW FILE ---
/*
 * TransportHeaders.cs - Implementation of the
 *                      "System.Runtime.Remoting.Channels.TransportHeaders" 
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.Runtime.Remoting.Channels
{

#if CONFIG_REMOTING

using System.Collections;

[Serializable]
public class TransportHeaders : ITransportHeaders
{
        // Internal state.
        private ArrayList headers;

        // Constructor.
        public TransportHeaders()
                        {
                                // Use an array list to preserve header 
ordering.
                                headers = new ArrayList();
                        }

        // Get or set a header value.
        public Object this[Object key]
                        {
                                get
                                {
                                        foreach(DictionaryEntry entry in 
headers)
                                        {
                                                if(entry.Key.Equals(key))
                                                {
                                                        return entry.Value;
                                                }
                                        }
                                        return null;
                                }
                                set
                                {
                                        if(key != null)
                                        {
                                                int posn;
                                                DictionaryEntry entry;
                                                for(posn = 0; posn < 
headers.Count; ++posn)
                                                {
                                                        entry = 
(DictionaryEntry)(headers[posn]);
                                                        
if(entry.Key.Equals(key))
                                                        {
                                                                
headers.RemoveAt(posn);
                                                                break;
                                                        }
                                                }
                                                headers.Add(new 
DictionaryEntry(key, value));
                                        }
                                }
                        }

        // Get an enumerator for the header list.
        public IEnumerator GetEnumerator()
                        {
                                return headers.GetEnumerator();
                        }

}; // class TransportHeaders

#endif // CONFIG_REMOTING

}; // namespace System.Runtime.Remoting.Channels





reply via email to

[Prev in Thread] Current Thread [Next in Thread]