1 /*****************************************************************************
5 *****************************************************************************/
13 #include "DriveVolume.h"
17 extern int FitName (wchar_t *destination
, const wchar_t *path
, const wchar_t *filename
, uint32 totalWidth
);
20 typedef struct DefragReport
26 uint64 FilesSizeBytes
;
27 uint64 FilesSizeOnDisk
;
28 uint64 FilesSizeClusters
;
29 uint64 FilesSlackBytes
;
30 uint32 FilesFragments
;
31 double AverageFragments
; // = FilesFragments / FilesCount
32 double PercentFragged
;
35 vector
<uint32
> FraggedFiles
;
36 vector
<uint32
> UnfraggedFiles
;
37 vector
<uint32
> UnmovableFiles
;
44 Defragment (wstring Name
, DefragType DefragMethod
);
49 void TogglePause (void);
53 bool IsDoneYet (void);
55 wstring
GetStatusString (void);
56 double GetStatusPercent (void);
57 DefragType
GetDefragType (void) { return (Method
); }
58 DefragReport
&GetDefragReport (void) { return (Report
); }
59 DriveVolume
&GetVolume (void) { return (Volume
); }
62 void Lock (void) { DefragMutex
.Lock (); }
63 void Unlock (void) { DefragMutex
.Unlock (); }
65 // Limit length of status string to 70 chars?
66 bool GetDoLimitLength (void) { return (DoLimitLength
); }
67 void SetDoLimitLength (bool L
) { DoLimitLength
= L
; }
70 void FastDefrag (void);
71 void ExtensiveDefrag (void);
72 void SetStatusString (wstring NewStatus
);
74 DWORD LastBMPUpdate
; // Last time volume bitmap was updated
88 DefragType DefragMethod
;
92 #endif // DEFRAGMENT_H