Author: alanmc
Date: 2006-10-22 09:32:18 -0400 (Sun, 22 Oct 2006)
New Revision: 66876

Removed:
   trunk/bitsharp/src/MonoTorrent.Client/IClientEngine.cs
   trunk/bitsharp/src/MonoTorrent.Client/IEngineSettings.cs
   trunk/bitsharp/src/MonoTorrent.Client/IPieceManager.cs
   trunk/bitsharp/src/MonoTorrent.Client/ITorrentManager.cs
   trunk/bitsharp/src/MonoTorrent.Common/ITorrent.cs
   trunk/bitsharp/src/MonoTorrent.Common/ITorrentFile.cs
Log:
The use of interfaces is an extra layer of hassle without providing any 
benefits (in these cases). The interfaces have been removed until a time comes 
when they provide a benefit. Remember, KISS ;)

Deleted: trunk/bitsharp/src/MonoTorrent.Client/IClientEngine.cs
===================================================================
--- trunk/bitsharp/src/MonoTorrent.Client/IClientEngine.cs      2006-10-22 
13:28:18 UTC (rev 66875)
+++ trunk/bitsharp/src/MonoTorrent.Client/IClientEngine.cs      2006-10-22 
13:32:18 UTC (rev 66876)
@@ -1,71 +0,0 @@
-//
-// IClientEngine.cs
-//
-// Authors:
-//   Alan McGovern [EMAIL PROTECTED]
-//
-// Copyright (C) 2006 Alan McGovern
-//
-// 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.
-//
-
-
-
-namespace MonoTorrent.Client
-{
-    /// <summary>
-    /// The interface to access the ClientEngine with
-    /// </summary>
-    public interface IClientEngine
-    {
-        /// <summary>
-        /// Loads a .torrent into the engine
-        /// </summary>
-        /// <param name="path">The path to load the .torrent from</param>
-        /// <returns></returns>
-        ITorrentManager LoadTorrent(string path);
-
-        /// <summary>
-        /// The settings for the engine
-        /// </summary>
-        IEngineSettings Settings { get; set; }
-
-
-        /// <summary>
-        /// Allows a TorrentManager to begin uploading/downloading
-        /// </summary>
-        /// <param name="torrent">The TorrentManager to start</param>
-        void Start(ITorrentManager torrent);
-
-
-        /// <summary>
-        /// Suspends downloading and uploading without disposing of peer 
information
-        /// </summary>
-        /// <param name="torrent">The TorrentManager to suspend</param>
-        void Pause(ITorrentManager torrent);
-
-
-        /// <summary>
-        /// Stops uploading and downloading and disposes of peer information
-        /// </summary>
-        /// <param name="torrent">The TorrentManager to stop</param>
-        void Stop(ITorrentManager torrent);
-    }
-}
\ No newline at end of file

Deleted: trunk/bitsharp/src/MonoTorrent.Client/IEngineSettings.cs
===================================================================
--- trunk/bitsharp/src/MonoTorrent.Client/IEngineSettings.cs    2006-10-22 
13:28:18 UTC (rev 66875)
+++ trunk/bitsharp/src/MonoTorrent.Client/IEngineSettings.cs    2006-10-22 
13:32:18 UTC (rev 66876)
@@ -1,72 +0,0 @@
-//
-// IEngineSettings.cs
-//
-// Authors:
-//   Alan McGovern [EMAIL PROTECTED]
-//
-// Copyright (C) 2006 Alan McGovern
-//
-// 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.
-//
-
-
-
-namespace MonoTorrent.Client
-{
-    /// <summary>
-    /// The interface with which to access the EngineSettings
-    /// </summary>
-    public interface IEngineSettings
-    {
-        /// <summary>
-        /// The maximum combined download speed for all torrents currently 
running
-        /// </summary>
-        int GlobalMaxDownloadSpeed { get; set; }
-
-        /// <summary>
-        /// The maximum combined upload speed for all torrents currently 
running
-        /// </summary>
-        int GlobalMaxUploadSpeed { get; set; }
-
-
-        /// <summary>
-        /// The default directory to save torrents to
-        /// </summary>
-        string DefaultSavePath { get; set; }
-
-
-        /// <summary>
-        /// The maximum combined concurrent open connections
-        /// </summary>
-        int GlobalMaxConnections { get; set; }
-
-
-        /// <summary>
-        /// The maximum combined concurrent half open connections
-        /// </summary>
-        int GlobalMaxHalfOpenConnections { get; set; }
-
-
-        /// <summary>
-        /// The port to accept incoming connections on
-        /// </summary>
-        int ListenPort { get; set; }
-    }
-}
\ No newline at end of file

Deleted: trunk/bitsharp/src/MonoTorrent.Client/IPieceManager.cs
===================================================================
--- trunk/bitsharp/src/MonoTorrent.Client/IPieceManager.cs      2006-10-22 
13:28:18 UTC (rev 66875)
+++ trunk/bitsharp/src/MonoTorrent.Client/IPieceManager.cs      2006-10-22 
13:32:18 UTC (rev 66876)
@@ -1,44 +0,0 @@
-//
-// IPieceManager.cs
-//
-// Authors:
-//   Alan McGovern [EMAIL PROTECTED]
-//
-// Copyright (C) 2006 Alan McGovern
-//
-// 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.
-//
-
-using System;
-using MonoTorrent.Client;
-
-namespace MonoTorrent.Common
-{
-    /// <summary>
-    /// Interface for accessing the PieceManager
-    /// </summary>
-    public interface IPieceManager
-    {
-        /// <summary>
-        /// Event that's fired every time a Piece changes
-        /// </summary>
-        event EventHandler<PieceEventArgs> OnPieceChanged;
-    }
-}

Deleted: trunk/bitsharp/src/MonoTorrent.Client/ITorrentManager.cs
===================================================================
--- trunk/bitsharp/src/MonoTorrent.Client/ITorrentManager.cs    2006-10-22 
13:28:18 UTC (rev 66875)
+++ trunk/bitsharp/src/MonoTorrent.Client/ITorrentManager.cs    2006-10-22 
13:32:18 UTC (rev 66876)
@@ -1,120 +0,0 @@
-//
-// ITorrentManager.cs
-//
-// Authors:
-//   Alan McGovern [EMAIL PROTECTED]
-//
-// Copyright (C) 2006 Alan McGovern
-//
-// 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.
-//
-
-
-
-using System;
-using MonoTorrent.Common;
-
-namespace MonoTorrent.Client
-{
-    /// <summary>
-    /// Interface used to interact with .torrents loaded into the Engine.
-    /// </summary>
-    public interface ITorrentManager
-    {
-        /// <summary>
-        /// Event fired when new peers are found due to a tracker update
-        /// </summary>
-        event EventHandler<PeersAddedEventArgs> OnPeersAdded;
-
-
-        /// <summary>
-        /// Event fired every time a piece is hashed
-        /// </summary>
-        event EventHandler<PieceHashedEventArgs> OnPieceHashed;
-
-
-        /// /<summary>
-        /// Event fired every time the TorrentManager's state changes
-        /// </summary>
-        event EventHandler<TorrentStateChangedEventArgs> OnTorrentStateChanged;
-
-
-        /// <summary>
-        /// Returns a torrent instance.
-        /// </summary>
-        ITorrent Torrent { get; }
-
-
-        /// <summary>
-        /// The current state of the torrent.
-        /// </summary>
-        TorrentState State { get; }
-
-
-        /// <summary>
-        /// The current progress of the torrent in percent.
-        /// </summary>
-        double Progress();
-
-
-        /// <summary>
-        /// The current download speed in bytes per second
-        /// </summary>
-        /// <returns></returns>
-        double DownloadSpeed();
-
-
-        /// <summary>
-        /// The current upload speed in bytes per second
-        /// </summary>
-        /// <returns></returns>
-        double UploadSpeed();
-
-
-        /// <summary>
-        /// The count of already downloaded bytes.
-        /// </summary>
-        long DataBytesDownloaded { get; }
-
-
-        /// <summary>
-        /// The count of already downloaded bytes.
-        /// </summary>
-        long DataBytesUploaded { get; }
-
-
-        /// <summary>
-        /// The path to save the files to
-        /// </summary>
-        string SavePath { get; }
-
-
-        /// <summary>
-        /// The piecemanager associated with this ITorrentManager
-        /// </summary>
-        IPieceManager PieceManager { get; }
-
-        int AvailablePeers { get; }
-
-        int Seeds();
-
-        int Leechs();
-    }
-}

Deleted: trunk/bitsharp/src/MonoTorrent.Common/ITorrent.cs
===================================================================
--- trunk/bitsharp/src/MonoTorrent.Common/ITorrent.cs   2006-10-22 13:28:18 UTC 
(rev 66875)
+++ trunk/bitsharp/src/MonoTorrent.Common/ITorrent.cs   2006-10-22 13:32:18 UTC 
(rev 66876)
@@ -1,62 +0,0 @@
-//
-// System.String.cs
-//
-// Authors:
-//   Alan McGovern [EMAIL PROTECTED]
-//
-// Copyright (C) 2006 Alan McGovern
-//
-// 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.
-//
-
-
-
-using System;
-using System.Collections;
-
-namespace MonoTorrent.Common
-{
-    public interface ITorrent : IEnumerable
-    {
-        string TorrentPath { get; }
-
-        string[] AnnounceUrls { get; }
-
-        string Name { get; }
-
-        string Comment { get; }
-
-        DateTime CreationDate { get; }
-
-        string CreatedBy { get; }
-
-        string PublisherUrl { get; }
-
-        int PieceLength { get; }
-
-        byte[] InfoHash { get; }
-
-        long Size { get; }
-
-        ITorrentFile[] Files { get; }
-
-        byte[][] Pieces { get; }
-    }
-}
\ No newline at end of file

Deleted: trunk/bitsharp/src/MonoTorrent.Common/ITorrentFile.cs
===================================================================
--- trunk/bitsharp/src/MonoTorrent.Common/ITorrentFile.cs       2006-10-22 
13:28:18 UTC (rev 66875)
+++ trunk/bitsharp/src/MonoTorrent.Common/ITorrentFile.cs       2006-10-22 
13:32:18 UTC (rev 66876)
@@ -1,39 +0,0 @@
-//
-// System.String.cs
-//
-// Authors:
-//   Alan McGovern [EMAIL PROTECTED]
-//
-// Copyright (C) 2006 Alan McGovern
-//
-// 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.
-//
-
-
-
-namespace MonoTorrent.Common
-{
-    public interface ITorrentFile
-    {
-        string Path { get; }
-
-        long Length { get; }
-    }
-}
\ No newline at end of file

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to