1 #ifndef FILE_TRANSFER_INFOTON_CLASS
2 #define FILE_TRANSFER_INFOTON_CLASS
Provides a dynamically resizable ASCII character string.
Defines the base class for all string processing objects in hoople.
A very common template for a dynamic array of bytes.
A clonable object knows how to make copy of itself.
Outcomes describe the state of completion for an operation.
An object that traverses directory trees and provides a view of all files.
Base objects used by the file transfer tentacle to schedule transfers.
virtual basis::clonable * clone() const
must be provided to allow creation of a copy of this object.
commands
the commands specify what this package is intended to do.
@ BUILD_TARGET_TREE
asks the target side to build the directory tree from the source.
@ CONCLUDE_TRANSFER_MARKER
this infoton marks the end of the transfer process.
@ PLACE_FILE_CHUNKS
the destination side requests a new set of chunks.
@ TREE_COMPARISON
the destination root will be compared with the source root.
basis::abyte _command
one of the commands above.
basis::outcome _success
reports what kind of result occurred.
static const structures::string_array & file_transfer_classifier()
returns the classifier for this type of infoton.
virtual ~file_transfer_infoton()
basis::astring _src_root
the top-level directory of the source.
bool _request
if it's not a request, then it's a response.
basis::astring _dest_root
the top-level directory of the destination.
virtual int packed_size() const
reports how large the infoton will be when packed.
void package_tree_info(const filesystem::directory_tree &tree, const structures::string_array &includes)
prepares the packed data from the "tree" and "includes" list.
basis::byte_array _packed_data
the packed headers and file chunks.
virtual bool unpack(basis::byte_array &packed_form)
restores an infoton from a packed form.
virtual void pack(basis::byte_array &packed_form) const
stuffs the data in the infoton into the "packed_form".
An infoton is an individual request parcel with accompanying information.
virtual basis::astring text_form() const
local version just makes text_form() more functional.
An array of strings with some additional helpful methods.
unsigned char abyte
A fairly important unit which is seldom defined...