public Volume(VolumeEventController eventController, VolumeDescriptor volumeDesc, XmlNode parentNode) { mEventController = eventController; mVolumeDesc = volumeDesc; mBackupRestoreObject = new BackupRestoreVolume(parentNode); Init(); }
public Volume( VolumeEventController eventController, VolumeDescriptor volumeDesc, VolumeSource source, BaseArchive archive ) { mEventController = eventController; mVolumeDesc = volumeDesc; mBackupRestoreObject = new BackupRestoreVolume( mVolumeDesc.VolumeName, source, archive ); Init(); }
public Volume( VolumeEventController eventController, VolumeDescriptor volumeDesc, XmlNode parentNode ) { mEventController = eventController; mVolumeDesc = volumeDesc; mBackupRestoreObject = new BackupRestoreVolume( parentNode ); Init(); }
public Volume(VolumeEventController eventController, VolumeDescriptor volumeDesc, VolumeSource source, BaseArchive archive) { mEventController = eventController; mVolumeDesc = volumeDesc; mBackupRestoreObject = new BackupRestoreVolume(mVolumeDesc.VolumeName, source, archive); Init(); }
public void InvokeVolumeDescriptorActiveStateChanged(VolumeDescriptor volume, bool isActive) { if (VolumeDescriptorActiveStateChanged != null) { VolumeDescriptorActiveStateChanged(volume, isActive); } }
public void RemoveVolume( VolumeDescriptor desc, bool removeAllData ) { if ( removeAllData && desc.IsAvailable ) { desc.Volume.DeleteAllRevisions(); } VolumeDescriptorList.Instance.RemoveDescriptor( desc ); }
void mVolumeEventController_VolumeDescriptorActiveStateChanged(VolumeDescriptor desc, bool isActive) { if (desc.ReadyForBackup) { Log.WriteLine(LogType.TextLogVerbose, "Backing up volume as the descriptor (.vol) file state has recently changed"); ForceBackup(desc.Volume); } }
public void RemoveVolume(VolumeDescriptor desc, bool removeAllData) { if (removeAllData && desc.IsAvailable) { desc.Volume.DeleteAllRevisions(); } VolumeDescriptorList.Instance.RemoveDescriptor(desc); }
public void RemoveVolume(VolumeDescriptor desc, bool removeAllData) { QueuedRemoveInfo removeInfo = new QueuedRemoveInfo(); removeInfo.mDescriptor = desc; removeInfo.mDeleteAllData = removeAllData; mWorkerThread.RegisterOneShotTask(new PWLib.BackgroundWorkerThread.TaskPredicate(OnWorkerPredicate), new PWLib.BackgroundWorkerThread.Task(OnWorkerRemove), new PWLib.BackgroundWorkerThread.TaskError(OnWorkerError), removeInfo); }
public void TransferVolume(VolumeDescriptor vid, PWLib.UsbDrive.UsbDriveInfo newDrive) { QueuedTransferInfo transferInfo = new QueuedTransferInfo(); transferInfo.mDescriptor = vid; transferInfo.mNewDrive = newDrive; mWorkerThread.RegisterOneShotTask(new PWLib.BackgroundWorkerThread.TaskPredicate(OnWorkerPredicate), new PWLib.BackgroundWorkerThread.Task(OnWorkerTransfer), new PWLib.BackgroundWorkerThread.TaskError(OnWorkerError), transferInfo); }
public VolumeDescriptor AddNewDescriptor( string volName, string volFilename, VolumeSource source, BaseArchive archive ) { VolumeDescriptor vd = new VolumeDescriptor( mEventController, volName, volFilename, source, archive ); lock ( mDescriptorList ) { mDescriptorList.Add( vd ); } Config.Active.Save(); return vd; }
public void RemoveDescriptor(VolumeDescriptor vd) { lock ( mDescriptorList ) { if (mDescriptorList.Contains(vd)) { mDescriptorList.Remove(vd); } } }
public VolumeDescriptor LoadDescriptor(string volName, string volFilename) { VolumeDescriptor vd = VolumeDescriptor.LoadFromXml(mEventController, volName, volFilename); lock ( mDescriptorList ) { mDescriptorList.Add(vd); } return(vd); }
public VolumeDescriptor AddNewDescriptor(string volName, string volFilename, VolumeSource source, BaseArchive archive) { VolumeDescriptor vd = new VolumeDescriptor(mEventController, volName, volFilename, source, archive); lock ( mDescriptorList ) { mDescriptorList.Add(vd); } Config.Active.Save(); return(vd); }
public override bool Equals(object obj) { if (obj is VolumeDescriptor) { VolumeDescriptor vd = (VolumeDescriptor)obj; return(string.Compare(vd.mName, this.mName, false) == 0); } else { return(false); } }
public void RestoreVolume(VolumeDescriptor vid, VolumeSnapshotRevision revision, string onDiskPath) { if (vid.ReadyForRestore) { Log.WriteLine(LogType.TextLogVerbose, "Adding QueuedRestore (" + vid.VolumeName + ")"); QueuedRestoreInfo restoreInfo = new QueuedRestoreInfo(); restoreInfo.mDescriptor = vid; restoreInfo.mVolumeRevision = revision; restoreInfo.mDiskPath = onDiskPath; mWorkerThread.RegisterOneShotTask(new PWLib.BackgroundWorkerThread.TaskPredicate(OnWorkerPredicate), new PWLib.BackgroundWorkerThread.Task(OnWorkerRestore), new PWLib.BackgroundWorkerThread.TaskError(OnWorkerError), restoreInfo); } }
public static Volume BuildFromXml(VolumeEventController eventController, VolumeDescriptor volumeDesc, XmlNode parentNode) { return(new Volume(eventController, volumeDesc, parentNode)); }
public static Volume BuildFromXml( VolumeEventController eventController, VolumeDescriptor volumeDesc, XmlNode parentNode ) { return new Volume( eventController, volumeDesc, parentNode ); }
public void InvokeVolumeDescriptorActiveStateChanged( VolumeDescriptor volume, bool isActive ) { if ( VolumeDescriptorActiveStateChanged != null ) VolumeDescriptorActiveStateChanged( volume, isActive ); }
public void RemoveVolume( VolumeDescriptor desc, bool removeAllData ) { QueuedRemoveInfo removeInfo = new QueuedRemoveInfo(); removeInfo.mDescriptor = desc; removeInfo.mDeleteAllData = removeAllData; mWorkerThread.RegisterOneShotTask( new PWLib.BackgroundWorkerThread.TaskPredicate( OnWorkerPredicate ), new PWLib.BackgroundWorkerThread.Task( OnWorkerRemove ), new PWLib.BackgroundWorkerThread.TaskError( OnWorkerError ), removeInfo ); }
public void RestoreVolume( VolumeDescriptor vid, VolumeSnapshotRevision revision, string onDiskPath ) { if ( vid.ReadyForRestore ) { Log.WriteLine( LogType.TextLogVerbose, "Adding QueuedRestore (" + vid.VolumeName + ")" ); QueuedRestoreInfo restoreInfo = new QueuedRestoreInfo(); restoreInfo.mDescriptor = vid; restoreInfo.mVolumeRevision = revision; restoreInfo.mDiskPath = onDiskPath; mWorkerThread.RegisterOneShotTask( new PWLib.BackgroundWorkerThread.TaskPredicate( OnWorkerPredicate ), new PWLib.BackgroundWorkerThread.Task( OnWorkerRestore ), new PWLib.BackgroundWorkerThread.TaskError( OnWorkerError ), restoreInfo ); } }
public void TransferVolume( VolumeDescriptor vid, PWLib.UsbDrive.UsbDriveInfo newDrive ) { QueuedTransferInfo transferInfo = new QueuedTransferInfo(); transferInfo.mDescriptor = vid; transferInfo.mNewDrive = newDrive; mWorkerThread.RegisterOneShotTask( new PWLib.BackgroundWorkerThread.TaskPredicate( OnWorkerPredicate ), new PWLib.BackgroundWorkerThread.Task( OnWorkerTransfer ), new PWLib.BackgroundWorkerThread.TaskError( OnWorkerError ), transferInfo ); }
void mVolumeEventController_VolumeDescriptorActiveStateChanged( VolumeDescriptor desc, bool isActive ) { if ( desc.ReadyForBackup ) { Log.WriteLine( LogType.TextLogVerbose, "Backing up volume as the descriptor (.vol) file state has recently changed" ); ForceBackup( desc.Volume ); } }
public void RemoveDescriptor( VolumeDescriptor vd ) { lock ( mDescriptorList ) { if ( mDescriptorList.Contains( vd ) ) { mDescriptorList.Remove( vd ); } } }