ScanChecksum Class Reference

This scans a supplied path and stores the results. More...

#include <ScanChecksum.h>

Inheritance diagram for ScanChecksum:

Inheritance graph
[legend]
Collaboration diagram for ScanChecksum:

Collaboration graph
[legend]

List of all members.

Public Member Functions

bool Start (std::list< ScanPath::Entry > &paths, const bool multiThread=false, const size_t chunkSize=1024 *1024)
bool Start (ScanPath::Entry &entry, const size_t chunkSize=1024 *1024)
bool Stop (void)
bool GetCompleted (void)
virtual bool CallbackUpdate (const size_t numFiles, const ScanPath::Entry &currentEntry, const size_t currentBytesScanned)
virtual void CallbackComplete (void)
 A virtual callback that is triggered when the scanning is complete.


Detailed Description

This scans a supplied path and stores the results.

Member Function Documentation

bool Start ( std::list< ScanPath::Entry > &  paths,
const bool  multiThread = false,
const size_t  chunkSize = 1024 *1024 
)

Starts scanning the paths supplied using an optional new thread and generates checksum information for each file. If a scan is already running the previous scan is stopped.

Parameters:
paths The paths to scan and produce checksum information for.
multiThread By default the scan does not use an extra thread. Using true will start a thread to start scanning and Start() will return immediately.
chunkSize The number of bytes to use for a file buffer when accessing files. By default this uses a megabyte.
Returns:
Success returns true, failure returns false.

bool Stop ( void   ) 

Stops the current scan if it is running.

Returns:
Success returns true, failure returns false.

bool GetCompleted ( void   ) 

Tests the completion state of the last scan.

Returns:
A completed scan returns true, a pending scan returns false.

virtual bool CallbackUpdate ( const size_t  numFiles,
const ScanPath::Entry currentEntry,
const size_t  currentBytesScanned 
) [virtual]

A virtual callback that is triggered when the scanning status is updated.

Returns:
True allows the scan to continue. False terminates the scan as quickly as possible.


Generated on Sat Jun 28 22:02:34 2008 for ReplicaNet and RNLobby by  doxygen 1.5.3