{
public:
basis::astring _filename; //!< the name of the file being transferred.
+//hmmm: consider adding full length here so we know it.
double _byte_start; //!< the starting location in the file being sent.
int _length; //!< the length of the transferred piece.
file_time _time; //!< the timestamp on the file.
enum outcomes {
OKAY = basis::common::OKAY,
BAD_INPUT = basis::common::BAD_INPUT,
-// GARBAGE = basis::common::GARBAGE,
-// NOT_FOUND = basis::common::NOT_FOUND,
-// NONE_READY = basis::common::NONE_READY,
-// FAILURE = basis::common::FAILURE,
+ FINISHED = basis::common::IS_EMPTY, // nothing left to pack.
DEFINE_OUTCOME(SOURCE_MISSING, -43, "The source file is not accessible"),
DEFINE_OUTCOME(TARGET_DIR_ERROR, -44, "The target's directory could not "
"be created"),
//!< method can be exported for use by shared libs.
static basis::outcome copy_file(const basis::astring &source, const basis::astring &destination,
- int copy_chunk_factor = copy_chunk_factor());
+ int copy_chunk_factor = heavy_file_operations::copy_chunk_factor());
//!< copies a file from the "source" location to the "destination".
/*!< the outcomes could be from this class or from common::outcomes.
the "copy_chunk_factor" is the read buffer size to use while copying. */
static basis::outcome write_file_chunk(const basis::astring &target, double byte_start,
const basis::byte_array &chunk, bool truncate = true,
- int copy_chunk_factor = copy_chunk_factor());
+ int copy_chunk_factor = heavy_file_operations::copy_chunk_factor());
//!< stores a chunk of bytes into the "target" file.
/*!< writes the content stored in "chunk" into the file "target" at the
position "byte_start". the entire "chunk" will be used, which means the
out before bytes are stored into it; this is not an additive operation. */
private:
- static bool advance(const filename_list &to_transfer, file_transfer_header &last_action);
+ static basis::outcome advance(const filename_list &to_transfer,
+ file_transfer_header &last_action);
//!< advances to the next file in the transfer list "to_transfer".
};