Changeset 2439
- Timestamp:
- 3/10/2012 1:32:51 PM (16 months ago)
- Location:
- branches/eraser6/pluginsRewrite/Eraser.Plugins/ExtensionPoints
- Files:
-
- 5 moved
-
IEntropySource.cs (moved) (moved from branches/eraser6/pluginsRewrite/Eraser.Plugins/ExtensionPoints/EntropySource.cs) (1 diff)
-
IErasureMethod.cs (moved) (moved from branches/eraser6/pluginsRewrite/Eraser.Plugins/ExtensionPoints/ErasureMethod.cs) (8 diffs)
-
IErasureTarget.cs (moved) (moved from branches/eraser6/pluginsRewrite/Eraser.Plugins/ExtensionPoints/ErasureTarget.cs) (8 diffs)
-
IFileSystem.cs (moved) (moved from branches/eraser6/pluginsRewrite/Eraser.Plugins/ExtensionPoints/FileSystem.cs) (6 diffs)
-
IPrng.cs (moved) (moved from branches/eraser6/pluginsRewrite/Eraser.Plugins/ExtensionPoints/Prng.cs) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eraser6/pluginsRewrite/Eraser.Plugins/ExtensionPoints/IEntropySource.cs
r2405 r2439 32 32 /// the EntropyPoller class. 33 33 /// </summary> 34 public abstract classEntropySource : IRegisterable34 public interface IEntropySource : IRegisterable 35 35 { 36 36 /// <summary> -
branches/eraser6/pluginsRewrite/Eraser.Plugins/ExtensionPoints/IErasureMethod.cs
r2405 r2439 35 35 /// streams, not unused drive space. 36 36 /// </summary> 37 public abstract class ErasureMethod : IRegisterable37 public abstract class IErasureMethod : IRegisterable 38 38 { 39 39 public override string ToString() … … 100 100 /// <param name="prng">The PRNG source for random data.</param> 101 101 /// <param name="callback">The progress callback function.</param> 102 public abstract void Erase(Stream stream, long erasureLength, Prng prng,102 public abstract void Erase(Stream stream, long erasureLength, IPrng prng, 103 103 ErasureMethodProgressFunction callback); 104 104 … … 128 128 129 129 //Randomize. 130 Prng rand = Host.Instance.Prngs.ActivePrng;130 IPrng rand = Host.Instance.Prngs.ActivePrng; 131 131 for (int i = 0; i < result.Length; ++i) 132 132 { … … 148 148 public static void WriteRandom(byte[] buffer, object value) 149 149 { 150 (( Prng)value).NextBytes(buffer);150 ((IPrng)value).NextBytes(buffer); 151 151 } 152 152 … … 182 182 /// unused drive space. 183 183 /// </summary> 184 public abstract class UnusedSpaceErasureMethod : ErasureMethod184 public abstract class UnusedSpaceErasureMethod : IErasureMethod 185 185 { 186 186 /// <summary> … … 197 197 /// <param name="prng">The PRNG source for random data.</param> 198 198 /// <param name="callback">The progress callback function.</param> 199 public virtual void EraseUnusedSpace(Stream stream, Prng prng, ErasureMethodProgressFunction callback)199 public virtual void EraseUnusedSpace(Stream stream, IPrng prng, ErasureMethodProgressFunction callback) 200 200 { 201 201 Erase(stream, long.MaxValue, prng, callback); … … 242 242 } 243 243 244 public override void Erase(Stream stream, long erasureLength, Prng prng,244 public override void Erase(Stream stream, long erasureLength, IPrng prng, 245 245 ErasureMethodProgressFunction callback) 246 246 { … … 324 324 /// <param name="buffer">The buffer to populate with the data to write.</param> 325 325 /// <param name="prng">The PRNG used for random passes.</param> 326 public void Execute(byte[] buffer, Prng prng)326 public void Execute(byte[] buffer, IPrng prng) 327 327 { 328 328 Function(buffer, OpaqueValue == null ? prng : OpaqueValue); -
branches/eraser6/pluginsRewrite/Eraser.Plugins/ExtensionPoints/IErasureTarget.cs
r2405 r2439 37 37 /// </summary> 38 38 [Serializable] 39 public abstract class ErasureTarget : ISerializable, IRegisterable39 public abstract class IErasureTarget : ISerializable, IRegisterable 40 40 { 41 41 #region Serialization code 42 protected ErasureTarget(SerializationInfo info, StreamingContext context)42 protected IErasureTarget(SerializationInfo info, StreamingContext context) 43 43 { 44 44 Guid methodGuid = (Guid)info.GetValue("Method", typeof(Guid)); … … 68 68 /// Constructor. 69 69 /// </summary> 70 protected ErasureTarget()70 protected IErasureTarget() 71 71 { 72 72 Method = ErasureMethodRegistrar.Default; … … 84 84 /// The method used for erasing the file. 85 85 /// </summary> 86 public ErasureMethod Method86 public IErasureMethod Method 87 87 { 88 88 get … … 106 106 /// <returns>The Erasure method which the target should be erased with. 107 107 /// This function will never return <see cref="ErasureMethodRegistrar.Default"/></returns> 108 public virtual ErasureMethod EffectiveMethod108 public virtual IErasureMethod EffectiveMethod 109 109 { 110 110 get … … 124 124 /// <param name="method">The erasure method to check.</param> 125 125 /// <returns>True if the erasure method is supported, false otherwise.</returns> 126 public virtual bool SupportsMethod( ErasureMethod method)126 public virtual bool SupportsMethod(IErasureMethod method) 127 127 { 128 128 return true; … … 140 140 /// The Progress Changed event handler of the owning task. 141 141 /// </summary> 142 protected internal Action< ErasureTarget, ProgressChangedEventArgs> OnProgressChanged142 protected internal Action<IErasureTarget, ProgressChangedEventArgs> OnProgressChanged 143 143 { 144 144 get; … … 166 166 /// The backing variable for the <see cref="Method"/> property. 167 167 /// </summary> 168 private ErasureMethod method;168 private IErasureMethod method; 169 169 } 170 170 … … 173 173 /// object. 174 174 /// </summary> 175 public interface IErasureTargetConfigurer : ICliConfigurer< ErasureTarget>175 public interface IErasureTargetConfigurer : ICliConfigurer<IErasureTarget> 176 176 { 177 177 } -
branches/eraser6/pluginsRewrite/Eraser.Plugins/ExtensionPoints/IFileSystem.cs
r2405 r2439 34 34 /// Provides functions to handle erasures specfic to file systems. 35 35 /// </summary> 36 public abstract class FileSystem : IRegisterable36 public abstract class IFileSystem : IRegisterable 37 37 { 38 38 /// <summary> … … 47 47 { 48 48 //Get the PRNG we are going to use 49 Prng prng = Host.Instance.Prngs.ActivePrng;49 IPrng prng = Host.Instance.Prngs.ActivePrng; 50 50 51 51 //Initialsie the base name, if any. … … 110 110 111 111 //Find a random entry. 112 Prng prng = Host.Instance.Prngs.ActivePrng;112 IPrng prng = Host.Instance.Prngs.ActivePrng; 113 113 string result = string.Empty; 114 114 while (result.Length == 0) … … 205 205 /// <param name="searchCallback">The callback function for search progress.</param> 206 206 /// <param name="eraseCallback">The callback function for erasure progress.</param> 207 public abstract void EraseClusterTips(VolumeInfo info, ErasureMethod method,207 public abstract void EraseClusterTips(VolumeInfo info, IErasureMethod method, 208 208 ClusterTipsSearchProgress searchCallback, ClusterTipsEraseProgress eraseCallback); 209 209 … … 220 220 /// <param name="method">The method used to erase the files.</param> 221 221 public abstract void EraseOldFileSystemResidentFiles(VolumeInfo volume, 222 DirectoryInfo tempDirectory, ErasureMethod method,222 DirectoryInfo tempDirectory, IErasureMethod method, 223 223 FileSystemEntriesEraseProgress callback); 224 224 … … 241 241 /// </summary> 242 242 /// <param name="info"></param> 243 public abstract void EraseFileSystemObject(StreamInfo info, ErasureMethod method,244 ErasureMethod.ErasureMethodProgressFunction callback);243 public abstract void EraseFileSystemObject(StreamInfo info, IErasureMethod method, 244 IErasureMethod.ErasureMethodProgressFunction callback); 245 245 246 246 //TODO: This is supposed to be in VolumeInfo! -
branches/eraser6/pluginsRewrite/Eraser.Plugins/ExtensionPoints/IPrng.cs
r2405 r2439 31 31 /// random data erase passes. 32 32 /// </summary> 33 public abstract class Prng : IRegisterable33 public abstract class IPrng : IRegisterable 34 34 { 35 35 public override string ToString()
Note: See TracChangeset
for help on using the changeset viewer.
