 |
FC++
v0.9.0-9e9b65
FileCatalyst Fast File Transfers - C++ Library
|
|
@ kMinimal
Same as EType::kException.
@ kUnknown
Definition: FCStateAndStats.hpp:121
time_t to_time_t(const std::chrono::high_resolution_clock::time_point &tp)
Convenience function to convert time_point objects to traditional time_t values (seconds since 1970-0...
Definition: FCTransferStats.cpp:285
@ k10_Gbps
10000000000 bps (this value requires a 64-bit integer)
Definition: FCOptions.hpp:162
std::string ftpReplyText
FTP server raw text reply.
Definition: FCException.hpp:168
@ k56_Kbps
56000 bps
Definition: FCOptions.hpp:111
@ k274_176_Mbps
274176000 bps
Definition: FCOptions.hpp:144
FileCatalyst C API Written by Stéphane stephanecharette gmail info filecatalyst com Contact Unlimi Tech Software Inc for FileCatalyst and FC license details OpenSSL with or without modification
Definition: 03_licence.txt:12
std::string makeDirectory(const fc::Remote &directory)
Create a new directory on the FTP server.
Definition: FCControl.cpp:334
virtual Name & clearCache()
Clear the mutable cache items.
Definition: FCPath.cpp:334
Control & prepareSingleFile(const fc::Remote &remote)
Queue a single file for transfer.
Definition: FCControl.cpp:399
@ kOC1
OC-1, 51.84 Mbps.
Definition: FCOptions.hpp:193
fc::StrMap getMap() const
Get a map of all current settings and values. Used mostly for debug purpose.
Definition: FCControl.cpp:959
FileCatalyst C API Written by Stéphane stephanecharette gmail info filecatalyst com Contact Unlimi Tech Software Inc for FileCatalyst and FC license details OpenSSL with or without are permitted provided that the following conditions are this list of conditions and the following disclaimer Redistributions in binary form must reproduce the above copyright this list of conditions and the following disclaimer in the documentation and or other materials provided with the distribution Boost free of to any person or organization obtaining a copy of the software and accompanying documentation covered by this and transmit the and to prepare derivative works of the and to permit third parties to whom the Software is furnished to do all subject to the including the above license this restriction and the following must be included in all copies of the in whole or in and all derivative works of the unless such copies or derivative works are solely in the form of machine executable object code generated by a source language processor including commercial applications
Definition: 03_licence.txt:47
std::string getLogFilename()
Get the name of the file used to record a summary of what FC++ runs durring a session.
Definition: FCSummaryLog.cpp:16
@ kApiIos
14 C++ API on iPhone/iOS
Definition: FCOptions.hpp:42
@ kInvalidTransferMode
Definition: FCOptions.hpp:48
@ k232WillLogoutWhenTransferCompletes
Definition: FCUtils.hpp:89
@ k155_52_Mbps
155520000 bps
Definition: FCOptions.hpp:143
std::string getDirectoryListing(const fc::Remote &directory=fc::Remote(""))
Get a directory listing from the FTP server.
Definition: FCControl.cpp:295
std::string localMd5
May not be set if MD5 is disabled.
Definition: FCTransferStats.hpp:105
@ kSummary
Summary of the FTP session is logged.
@ k640_Kbps
640000 bps
Definition: FCOptions.hpp:118
@ kT4
T4, 274.18 Mbps.
Definition: FCOptions.hpp:190
virtual Options & setMode(const fc::ETransferMode tm=fc::kUdp, const fc::EConnectionMode cm=fc::kPassive)
Set the FTP mode.
Definition: FCOptions.cpp:356
EClientIdMajor
Definition: FCOptions.hpp:26
@ kDS3
DS-3, 44.74 Mbps.
Definition: FCOptions.hpp:183
void(* StatisticsCallback)(const fc::GlobalStateAndStats &stats, void *ptr)
Allow a single callback to be specified when the statistics are updated.
Definition: FCStateAndStats.hpp:186
@ kPending
TransferStats::transfer file is scheduled for transfer, but transfer has not yet started; see fc::Con...
Definition: FCTransferStats.hpp:59
Control & upload()
Immediately upload all files that have been queued for transfer.
Definition: FCControl.cpp:607
@ kInvalid
Definition: FCUtils.hpp:128
GlobalStats stats
Global statistics.
Definition: FCStateAndStats.hpp:133
uint64_t totalNumberOfPayloadBytesTransferred
The total number of bytes that have been uploaded or downloaded.
Definition: FCStateAndStats.hpp:69
@ k80211
802.11, 2 Mbps
Definition: FCOptions.hpp:219
@ k1G
1G, 1200 bps
Definition: FCOptions.hpp:228
int example005()
Definition: example005.cpp:22
@ kApiCpp
10 C++ API
Definition: FCOptions.hpp:40
std::chrono::high_resolution_clock::duration timeRemaining
The amount of time left at the current transfer rate.
Definition: FCTransferStats.hpp:161
bool isValid() const
Quickly determine if the fc::Control object is still valid, or if it has been gutted using either the...
Definition: FCControl.cpp:67
virtual const std::string & full() const
Get the full name.
Definition: FCPath.cpp:274
@ kNotOkay
any response that matches < 100 or >= 400
Definition: FCUtils.hpp:134
virtual Options & setClientId(const fc::EClientIdMajor major_id=fc::kApi, const fc::EClientIdMinor minor_id=fc::kApiCpp)
Set the client ID values needed by FileCatalyst servers.
Definition: FCOptions.cpp:377
fc::Local temporaryLocalFilename
Temporary filename used during transfer.
Definition: FCTransferStats.hpp:121
you must not claim that you wrote the original software If you use this software in a product
Definition: 03_licence.txt:52
virtual Options & setFtpServer(const std::string &ip_or_hostname, const unsigned short tcp_port=21)
Set the FTP server address and port.
Definition: FCOptions.cpp:303
@ k430InvalidUsernameOrPassword
Definition: FCUtils.hpp:105
uint64_t getFileSize(const fc::Local &local)
Get the size of the specified remote file.
Definition: FCControl.cpp:789
@ kNormal
Same as EType::kException + EType::kSummary.
const StrMap & emptyMap()
Function that always returns an empty map. Used internally by FC++.
Definition: FCUtils.cpp:12
@ k622_08_Mbps
622080000 bps
Definition: FCOptions.hpp:150
@ k56KModem
56 Kbps
Definition: FCOptions.hpp:174
void example004_progress_thread()
Definition: example004.cpp:32
virtual Options & setSslHandshake(const fc::ESslHandshakeMode ssl_handshake_mode=fc::kSslAutoDetect)
Set the SSL handshake handling.
Definition: FCOptions.cpp:552
virtual Options & setOverwrite(const bool overwrite=false)
Toggle whether destination files can be overwritten.
Definition: FCOptions.cpp:607
virtual Options & setTransferResume(const bool enabled=false, const int md5_chunk_size_in_KiB=16384)
Toggle support for resuming incomplete partial file transfers.
Definition: FCOptions.cpp:592
int example001()
Definition: example001.cpp:24
uint64_t payloadBytesExpected
The total size of the file being transferred.
Definition: FCTransferStats.hpp:210
@ k80211n
802.11n, 600 Mbps
Definition: FCOptions.hpp:223
@ k1200_bps
1200 bps
Definition: FCOptions.hpp:104
EClientIdMinor
Definition: FCOptions.hpp:35
Options()
Default constructor uses all built-in default values.
Definition: FCOptions.cpp:105
@ kOC192
OC-192, 9.95 Gbps.
Definition: FCOptions.hpp:202
uint64_t fileReaderStarved
Number of times when the file reader couldn't proceed with reading the file from disk due to insuffic...
Definition: FCTransferStats.hpp:424
std::string findSeparator() const
Logic to extract the directory separator from the default directory or the explicit name.
Definition: FCPath.cpp:312
bool showProgress
Definition: example004.cpp:29
std::string formatBytesSI(const uint64_t bytes)
Format the payload bytes using SI units (1000 bytes per "K").
Definition: FCTransferStats.cpp:639
@ k54_Mbps
54000000 bps
Definition: FCOptions.hpp:137
FileCatalyst C API Written by Stéphane stephanecharette gmail info filecatalyst com Contact Unlimi Tech Software Inc for FileCatalyst and FC license details OpenSSL with or without are permitted provided that the following conditions are this list of conditions and the following disclaimer Redistributions in binary form must reproduce the above copyright this list of conditions and the following disclaimer in the documentation and or other materials provided with the distribution Boost free of to any person or organization obtaining a copy of the software and accompanying documentation covered by this distribute
Definition: 03_licence.txt:29
EState
Used in several locations to indicate the state of the file transfer.
Definition: FCTransferStats.hpp:47
virtual void setDefaultDir(const std::string &dir) const
Set the default directory.
Definition: FCPath.cpp:438
EConnectionMode
Definition: FCOptions.hpp:55
std::chrono::high_resolution_clock::time_point timeStarted
The absolute time when the current set of transfers started.
Definition: FCStateAndStats.hpp:97
@ k100BaseX
100 Mbps
Definition: FCOptions.hpp:208
std::string fileName
the last component from full()
Definition: FCPath.hpp:131
FileCatalyst C API Written by Stéphane stephanecharette gmail info filecatalyst com Contact Unlimi Tech Software Inc for FileCatalyst and FC license details OpenSSL with or without are permitted provided that the following conditions are this list of conditions and the following disclaimer Redistributions in binary form must reproduce the above copyright this list of conditions and the following disclaimer in the documentation and or other materials provided with the distribution Boost free of to any person or organization obtaining a copy of the software and accompanying documentation covered by this license(the "Software") to use
EState transfer
State of the file transfer.
Definition: FCTransferStats.hpp:88
@ k14_4_Kbps
14400 bps
Definition: FCOptions.hpp:108
EState
Definition: FCStateAndStats.hpp:118
@ k10BaseX
10 Mbps
Definition: FCOptions.hpp:207
virtual Options & setUsernameAndPassword(const std::string &username, const std::string &password)
Set the username and password to use when connecting to the FTP server.
Definition: FCOptions.cpp:347
@ kOC12
OC-12, 0.62 Gbps.
Definition: FCOptions.hpp:196
FileCatalyst C API Written by Stéphane stephanecharette gmail info filecatalyst com Contact Unlimi Tech Software Inc for FileCatalyst and FC license details OpenSSL https
Definition: 03_licence.txt:11
@ k1xxMore
any 1xx-style response
Definition: FCUtils.hpp:129
virtual Options & setEncoders(const int number_of_encoders=5)
Set the number of FileCatalyst server-based file encoders.
Definition: FCOptions.cpp:485
std::set< std::string > StrSet
Defined for convenience: an ordered set of text strings.
Definition: FCUtils.hpp:31
@ kSslSessionReuse
re-use the ssl session and bypass the ssl handshake
Definition: FCOptions.hpp:68
@ k128KISDN
ISDN, 128K.
Definition: FCOptions.hpp:177
fc::Exception objects represent a C++ exception and usually includes stack traces and optional parame...
Definition: FCException.hpp:24
virtual const std::string & defaultDir() const
Get the default directory.
Definition: FCPath.cpp:392
File transfer statistics.
Definition: FCTransferStats.hpp:37
std::string baseVersionStr()
Return a simple version string.
Definition: FCUtils.cpp:19
@ k257PathCreatedOrDirectoryStatus
Definition: FCUtils.hpp:94
@ kCliCpp
8 C++ CLI tool
Definition: FCOptions.hpp:39
bool tmp_filename_is_disabled() const
Determine if this file stats object has the necessary filename information to use a temporary filenam...
Definition: FCTransferStats.hpp:526
@ k255InTargetDirectoryAlready
Definition: FCUtils.hpp:93
uint64_t blockSize
The block size.
Definition: FCTransferStats.hpp:382
@ k139_264_Mbps
139264000 bps
Definition: FCOptions.hpp:142
std::list< std::string > StrList
Defined for convenience: a list of text strings.
Definition: FCUtils.hpp:22
std::chrono::high_resolution_clock::time_point timeTransferFinished
The time when the transfer completed.
Definition: FCTransferStats.hpp:171
virtual Local operator+(const std::string &name) const
Definition: FCPath.cpp:414
uint64_t echoPacketsReceived
The total number of echo packets received.
Definition: FCTransferStats.hpp:334
int makeManyDirectories(const fc::StrVec &directories)
Create multiple directories on the FTP server.
Definition: FCControl.cpp:360
@ kInvalidMajorId
Definition: FCOptions.hpp:28
@ k64_Kbps
64000 bps
Definition: FCOptions.hpp:112
virtual void setDefaultDir(const std::string &dir) const
Set the default directory.
Definition: FCPath.cpp:369
const fc::TransferStatsMap & getFileMap() const
Get a reference to the transfer file map.
Definition: FCControl.cpp:167
uint64_t bitsPerSecondImmediateTransferRate
Transfer rates measured in bits per second.
Definition: FCTransferStats.hpp:259
@ k350RequestedActionPendingFurtherInfo
Definition: FCUtils.hpp:99
@ k150FileStatusOkayOpenDataConnection
Definition: FCUtils.hpp:70
uint64_t remainingNumberOfPayloadBytesToTransfer
The number of bytes remaining to upload or download.
Definition: FCStateAndStats.hpp:88
std::string changeDirectory(const fc::Remote &directory)
Change the working directory on the FTP server.
Definition: FCControl.cpp:321
@ kGigabit
1 Gbps
Definition: FCOptions.hpp:215
Definition: FCControl.hpp:17
@ kSslFullHandshake
do not re-use ssl sessions; do the full ssl handshake
Definition: FCOptions.hpp:67
@ k534RequestDeniedDueToPolicy
Definition: FCUtils.hpp:122
@ k3_152_Mbps
3152000 bps
Definition: FCOptions.hpp:125
Control & disconnect()
Disconnect the fc::Control object from the FTP server.
Definition: FCControl.cpp:255
virtual Options & setRemotedir(const std::string &remote_directory="/")
Base path used when accessing remote files.
Definition: FCOptions.cpp:577
@ k236_8_Kbps
236800 bps
Definition: FCOptions.hpp:115
bool isFile(const fc::Local &local)
Determine if the specified name is a filename.
Definition: FCControl.cpp:839
@ k200CommandOkay
Definition: FCUtils.hpp:73
@ k221ClosingConnectionLoggedOut
Definition: FCUtils.hpp:81
virtual void display(const bool showDisplayStack=true) const
Display the exception using std::cout. Calls to_string() to format the message.
Definition: FCException.cpp:200
const std::string username
Definition: example006.cpp:16
uint64_t Mbps(const int rate)
Convert easy-to-use numerical values to bps values.
Definition: FCOptions.hpp:271
@ k226ClosingDataConnectionTransferDone
Definition: FCUtils.hpp:83
@ kApi
7 FC API (e.g., C++ API)
Definition: FCOptions.hpp:30
uint64_t encryptionThreadStarved
Number of times when one of the encryption threads had no buffers remaining to encrypt.
Definition: FCTransferStats.hpp:445
std::chrono::high_resolution_clock::duration timeRemaining
A relative amount of time, from "now", indicating how much time remains before the current set of tra...
Definition: FCStateAndStats.hpp:102
FileCatalyst C API Written by Stéphane stephanecharette gmail info filecatalyst com Contact Unlimi Tech Software Inc for FileCatalyst and FC license details OpenSSL with or without are permitted provided that the following conditions are this list of conditions and the following disclaimer Redistributions in binary form must reproduce the above copyright this list of conditions and the following disclaimer in the documentation and or other materials provided with the distribution Boost free of to any person or organization obtaining a copy of the software and accompanying documentation covered by this display
Definition: 03_licence.txt:29
bool nameDoesNotExist(const fc::Remote &remote)
Determine if a file or directory already exists with this name.
Definition: FCControl.hpp:1113
@ kDS4
DS-4, 274.176 Mbps.
Definition: FCOptions.hpp:184
@ kOC256
OC-256, 13.1 Gbps.
Definition: FCOptions.hpp:203
FileCatalyst C API Written by Stéphane stephanecharette gmail info filecatalyst com Contact Unlimi Tech Software Inc for FileCatalyst and FC license details OpenSSL with or without are permitted provided that the following conditions are this list of conditions and the following disclaimer Redistributions in binary form must reproduce the above copyright this list of conditions and the following disclaimer in the documentation and or other materials provided with the distribution Boost free of to any person or organization obtaining a copy of the software and accompanying documentation covered by this and transmit the and to prepare derivative works of the and to permit third parties to whom the Software is furnished to do all subject to the including the above license grant
Definition: 03_licence.txt:35
@ k2_5G
2.5G, GPRS, 56 Kbps
Definition: FCOptions.hpp:230
void example006_print_stats(const fc::TransferStatsMap &m)
Definition: example006.cpp:21
std::string getFileMD5(const fc::Local &local)
Get the MD5 signature of the specified local file.
Definition: FCControl.cpp:724
@ kOC36
OC-36, 1.87 Gbps.
Definition: FCOptions.hpp:199
@ kInvalid
Definition: FCTransferStats.hpp:49
@ kAny
any response that matches >= 100 and < 600
Definition: FCUtils.hpp:132
@ k1_3_Gbps
1300000000 bps
Definition: FCOptions.hpp:154
std::string formatBytesIEC(const uint64_t bytes)
Format the payload bytes using IEC units (1024 bytes per "K").
Definition: FCTransferStats.cpp:646
virtual Options & reset()
Reset the Options object to use all of the built-in default values.
Definition: FCOptions.cpp:127
@ k397_200_Mbps
397200000 bps
Definition: FCOptions.hpp:145
FileCatalyst C API Written by Stéphane stephanecharette gmail info filecatalyst com Contact Unlimi Tech Software Inc for FileCatalyst and FC license details OpenSSL with or without are permitted provided that the following conditions are this list of conditions and the following disclaimer Redistributions in binary form must reproduce the above copyright this list of conditions and the following disclaimer in the documentation and or other materials provided with the distribution Boost free of to any person or organization obtaining a copy of the software and accompanying documentation covered by this and transmit the and to prepare derivative works of the and to permit third parties to whom the Software is furnished to do so
Definition: 03_licence.txt:32
@ k532NeedAccount
Definition: FCUtils.hpp:120
@ k550RequestAbortedFileOrDirectoryError
Definition: FCUtils.hpp:123
@ kDebug
Debug-level logging is not available in release builds. It cannot be enabled or disabled through this...
A collection of file or directory properties returned when a directory listing has been requested.
Definition: FCUtils.hpp:145
int main(int argc, char *argv[])
Definition: example001.cpp:96
const std::string password
Definition: example006.cpp:17
Control & getOptimalUnitAndBlockSizes(const uint64_t file_size_in_bytes, int &unit_size_in_bytes, int &block_size_in_bytes)
Determine the best UDP unit and block sizes based on the given sizes.
Definition: FCControl.cpp:971
virtual Options & setLimits(const int unit_size_in_bytes=1024, const int block_size_in_bytes=4194304)
Set the maximum unit and block size limits when using UDP mode transfers.
Definition: FCOptions.cpp:402
virtual Options & setTrace(const bool enabled=false)
Toggle trace debug messages.
Definition: FCOptions.cpp:679
~Control()
Destructing the fc::Control object terminates any connection to the ftp server.
Definition: FCControl.cpp:53
std::vector< std::string > StrVec
Defined for convenience: a vector of text strings.
Definition: FCUtils.hpp:25
std::map< std::string, std::string > StrMap
Defined for convenience: an ordered map where both the key and the value are text strings.
Definition: FCUtils.hpp:28
GlobalStats()
Definition: FCStateAndStats.cpp:11
@ k450ActionNotTakenBusyOrUnavailable
Definition: FCUtils.hpp:108
uint64_t bps(const fc::ECommonBandwidth &bandwidth)
Convert the common bandwidth enum value to a usable bps value.
Definition: FCOptions.cpp:12
@ kInvalid
Definition: FCStateAndStats.hpp:120
@ kTrace
UDP upload packet and block trace.
@ kInvalidMinorId
Definition: FCOptions.hpp:37
To prevent mixing up local path and remote path parameters when calling the FC++ API,...
Definition: FCPath.hpp:45
size_t getFileMapIndex() const
Get the current transfer index into the file transfer mapping.
Definition: FCControl.cpp:179
bool enable(const EType type, fc::Options &options, const std::string &log_directory="")
Enable the specified type of logging.
Definition: FCLogging.cpp:11
@ k434RequestedHostUnavailable
Definition: FCUtils.hpp:107
Control & noop()
Send a NO-OP to the server.
Definition: FCControl.cpp:239
static bool summary_logging_enabled
Definition: FCSummaryLog.cpp:13
@ kFtp
1 TCP/FTP (original FTP mode)
Definition: FCOptions.hpp:49
@ k2_5_Mbps
2500000 bps
Definition: FCOptions.hpp:124
virtual const std::string & filename() const
Get the last component in full() which normally would be the filename.
Definition: FCPath.cpp:243
Control & cancelTransfer()
Cancel the current file transfer (and all remaining files if multiple files have been prepared).
Definition: FCControl.cpp:694
uint64_t onTheFlyMd5Received
On-the-fly MD5 is not supported by FC++, but the packets are counted.
Definition: FCTransferStats.hpp:414
fc::Options contains all the default and user-defined settings required by fc::Control to connect to ...
Definition: FCOptions.hpp:282
@ k1200Modem
1200 bps
Definition: FCOptions.hpp:168
@ k2_Mbps
2000000 bps
Definition: FCOptions.hpp:122
GlobalStats is used to track some summary statistics during file transfers.
Definition: FCStateAndStats.hpp:36
int oldherrno
of limited use; not typically shown
Definition: FCException.hpp:166
@ k89_472
89472000 bps
Definition: FCOptions.hpp:138
virtual bool isAbsolute() const
Original name is absolute, such as /tmp/test.txt or C:\Files.
Definition: FCPath.cpp:162
@ k256_Kbps
256000 bps
Definition: FCOptions.hpp:116
static std::string getLogFilename()
Get the name of the file used to record FC++ exceptions.
Definition: FCException.cpp:285
@ k1000BaseX
1 Gbps
Definition: FCOptions.hpp:209
@ k128_Kbps
128000 bps
Definition: FCOptions.hpp:113
virtual Options & setTmpFilenames(const bool enabled=false, const std::string &suffix=".tmp", const std::string &prefix="")
When uploading or downloading files, sometimes the target filename should not be overwritten or made ...
Definition: FCOptions.cpp:721
const std::string password
Definition: example007.cpp:17
@ k552RequestAbortedOutOfDiskSpace
Definition: FCUtils.hpp:125
@ kNotConnected
Definition: FCStateAndStats.hpp:122
TransferStats()
Constructor.
Definition: FCTransferStats.cpp:20
@ k228ServerEnteringLongPassiveMode
(long address, port)
Definition: FCUtils.hpp:85
@ kEthernet
10 Mbps
Definition: FCOptions.hpp:213
Control & flush()
Flush the TCP control channel.
Definition: FCControl.cpp:709
@ k110RestartMarkerReply
Definition: FCUtils.hpp:67
EType
Definition: FCLogging.hpp:57
@ k384_Kbps
384000 bps
Definition: FCOptions.hpp:117
@ k2488_32_Mbps
2488320000 bps (this value requires an unsigned 32-bit interger)
Definition: FCOptions.hpp:157
const std::string password
Definition: example004.cpp:26
@ k9600Modem
9600 bps
Definition: FCOptions.hpp:170
fc::Remote remoteFilename
Including the path.
Definition: FCTransferStats.hpp:113
std::string explicitName
The name used when the object was instantiated.
Definition: FCPath.hpp:128
@ k1_Mbps
1000000 bps
Definition: FCOptions.hpp:120
FileCatalyst C API Written by Stéphane stephanecharette gmail info filecatalyst com Contact Unlimi Tech Software Inc for FileCatalyst and FC license details OpenSSL with or without are permitted provided that the following conditions are this list of conditions and the following disclaimer Redistributions in binary form must reproduce the above copyright this list of conditions and the following disclaimer in the documentation and or other materials provided with the distribution Boost free of to any person or organization obtaining a copy of the software and accompanying documentation covered by this and transmit the and to prepare derivative works of the and to permit third parties to whom the Software is furnished to do all subject to the including the above license this restriction and the following must be included in all copies of the in whole or in and all derivative works of the unless such copies or derivative works are solely in the form of machine executable object code generated by a source language processor including commercial and to alter it and redistribute it subject to the following restrictions
Definition: 03_licence.txt:50
FileCatalyst C API Written by Stéphane stephanecharette gmail info filecatalyst com Contact Unlimi Tech Software Inc for FileCatalyst and FC license details OpenSSL with or without are permitted provided that the following conditions are this list of conditions and the following disclaimer Redistributions in binary form must reproduce the above copyright this list of conditions and the following disclaimer in the documentation and or other materials provided with the distribution Boost free of to any person or organization obtaining a copy of the software and accompanying documentation covered by this and transmit the Software
Definition: 03_licence.txt:30
std::string groupname
Definition: FCUtils.hpp:152
@ kMobile
15 FC Mobile (e.g., iOS app)
Definition: FCOptions.hpp:31
std::string removeDirectory(const fc::Remote &directory)
Remove an empty directory on the FTP server.
Definition: FCControl.cpp:347
@ k144_Kbps
144000 bps
Definition: FCOptions.hpp:114
@ kOC9
OC-9, 466.56 Mbps.
Definition: FCOptions.hpp:195
Control & deleteTemporaryFiles()
This is automatically called by FC++ to delete all temporary files once a transfer has completed.
Definition: FCControl.cpp:1085
virtual ~Local()
Definition: FCPath.cpp:356
Exception(FC_WHERE_DEF, const boost::system::error_code &ec, const std::string &description, const fc::StrMap &m=fc::emptyMap())
Constructor with a boost::system::error_code value.
Definition: FCException.cpp:18
uint64_t metricsPacketsSent
The total number of metric packets sent.
Definition: FCTransferStats.hpp:352
int olderrno
errno at the time the exception was created
Definition: FCException.hpp:165
@ kTransferring
file transfer in progress
Definition: FCStateAndStats.hpp:125
const std::string password
Definition: example005.cpp:18
@ k100_Mbps
100000000 bps
Definition: FCOptions.hpp:140
@ k231UserLoggedOut
Definition: FCUtils.hpp:88
fc::Remote target_remote_filename() const
Returns the remote filename which should be used.
Definition: FCTransferStats.hpp:511
boost::system::error_code errorCode
typically set by boost::asio
Definition: FCException.hpp:176
The class fc::Remote is used to encapsulate remote directories or files.
Definition: FCPath.hpp:160
virtual Name & operator+=(const std::string &rhs)
Append a filename to an existing Local or Remote object.
Definition: FCPath.cpp:144
@ k768_Kbps
768000 bps
Definition: FCOptions.hpp:119
@ k8_448_Mbps
8448000 bps
Definition: FCOptions.hpp:129
virtual ~Name()
Definition: FCPath.cpp:17
@ kDS0
DS-0, 64 Kbps.
Definition: FCOptions.hpp:180
@ k125DataConnectionAlreadyOpen
Definition: FCUtils.hpp:69
int example002()
Definition: example002.cpp:23
virtual const std::string & parentDir() const
Get the parent directory if known, or a blank string if unknown.
Definition: FCPath.cpp:203
@ kSkippedMD5
TransferStats::type the entire file was skipped (md5 matched); see fc::Options::setTransferResume()
Definition: FCTransferStats.hpp:67
bool isDirectory(const fc::Local &local)
Determine if the specified name is a directory.
Definition: FCControl.cpp:863
virtual const char * c_str() const
Definition: FCPath.hpp:53
int main(int argc, char *argv[])
Definition: example002.cpp:116
@ kNone
do not expect a response
Definition: FCUtils.hpp:136
Combine both state and statistics into a single class which callers can access.
Definition: FCStateAndStats.hpp:114
std::string renameFile(const fc::Remote &remoteFrom, const fc::Remote &remoteTo)
Rename a remote file.
Definition: FCControl.cpp:915
Control(const fc::Options &options)
Each fc::Control object represents a single FTP server connection to be controlled.
Definition: FCControl.cpp:14
FileCatalyst C API Written by Stéphane stephanecharette gmail info filecatalyst com Contact Unlimi Tech Software Inc for FileCatalyst and FC license details OpenSSL with or without are permitted provided that the following conditions are this list of conditions and the following disclaimer Redistributions in binary form must reproduce the above copyright this list of conditions and the following disclaimer in the documentation and or other materials provided with the distribution Boost free of to any person or organization obtaining a copy of the software and accompanying documentation covered by this and transmit the and to prepare derivative works of the and to permit third parties to whom the Software is furnished to do all subject to the following
Definition: 03_licence.txt:34
virtual std::string create_temporary_filename(const fc::Options &options) const
Create a temporary filename to use based on the prefix and suffix in the given options.
Definition: FCPath.cpp:345
ETransferMode
Definition: FCOptions.hpp:46
uint64_t detectApproximateUploadSpeed(const bool force_refresh=false)
Get an approximation of the available upload transfer rate between the FC++ client and server.
Definition: FCControl.cpp:1055
@ k565_148_Mbps
565148000 bps
Definition: FCOptions.hpp:148
@ kT2
T2, 6.31 Mbps.
Definition: FCOptions.hpp:188
virtual void setDefaultDir(const std::string &dir) const =0
Set the default directory.
int example007()
Definition: example007.cpp:38
@ k502CommandNotImplemented
also see k202CommandNotImplemented
Definition: FCUtils.hpp:115
FileCatalyst C API Written by Stéphane stephanecharette gmail info filecatalyst com Contact Unlimi Tech Software Inc for FileCatalyst and FC license details OpenSSL with or without are permitted provided that the following conditions are this list of conditions and the following disclaimer Redistributions in binary form must reproduce the above copyright notice
Definition: 03_licence.txt:18
const std::string password
Definition: example003.cpp:17
uint64_t filesize
Definition: FCUtils.hpp:148
#define FC_EXCEPTION_FILENAME
If a file exists with this name, then any FC++ exception created will also be automatically appended ...
Definition: FCException.hpp:34
virtual Remote operator+(const std::string &name) const
Definition: FCPath.cpp:483
std::string getStr(const std::string &header="", const bool all=false) const
Similar to getMap(), but append all items to create a single multi-line text string to display for de...
Definition: FCTransferStats.cpp:198
@ kFastEthernet
100 Mbps
Definition: FCOptions.hpp:214
@ k10GBaseX
10 Gbps
Definition: FCOptions.hpp:210
@ k530NotLoggedIn
Definition: FCUtils.hpp:119
size_t fileStatsIdx
During file transfers, the FC++ library will update this index into fc::GlobalStateAndStats::fileStat...
Definition: FCStateAndStats.hpp:142
FileCatalyst C API Written by Stéphane stephanecharette gmail info filecatalyst com Contact Unlimi Tech Software Inc for FileCatalyst and FC license details OpenSSL with or without are permitted provided that the following conditions are met
Definition: 03_licence.txt:16
virtual ~Options()
Destructor.
Definition: FCOptions.cpp:99
virtual Options & setLogFileOutputDir(const std::string &dir=".")
Set the directory that FC++ uses for writing log files.
Definition: FCOptions.cpp:695
uint64_t Gbps(const int rate)
Convert easy-to-use numerical values to bps values.
Definition: FCOptions.hpp:274
bool isConnected() const
Quickly determine if the fc::Control object is connected to a FTP server.
Definition: FCControl.cpp:75
@ k9600_bps
9600 bps
Definition: FCOptions.hpp:107
@ kSslAutoDetect
ssl handshake is chosen depending on the server type
Definition: FCOptions.hpp:66
std::string formatTimestamp2(std::chrono::high_resolution_clock::time_point tp)
Format the absolute time point using "YYYY:MM:DD HH:MM:SS.mmmmmm" where mmmmmm is microseconds.
Definition: FCTransferStats.cpp:511
@ kT1
T1, 1.54 Mbps.
Definition: FCOptions.hpp:186
@ k331SendPassword
Definition: FCUtils.hpp:97
@ k10_Mbps
10000000 bps
Definition: FCOptions.hpp:130
uint64_t totalNumberOfPayloadBytesSkipped
Number of bytes that were skipped due to auto-resume of a previous partial file transfers.
Definition: FCStateAndStats.hpp:85
const fc::GlobalStateAndStats & getGlobalStateAndStats() const
Get a reference to the global FC++ state and file transfer statistics for the control object.
Definition: FCControl.cpp:127
@ kInvalidConnectionMode
Definition: FCOptions.hpp:57
@ kFull
TransferStats::type full transfer (entire file was sent or received)
Definition: FCTransferStats.hpp:65
fc::Local localFilename
Including the path.
Definition: FCTransferStats.hpp:112
@ k10Gigabit
10 Gbps
Definition: FCOptions.hpp:216
int lineNumber
source file line number
Definition: FCException.hpp:169
@ k553RequestAbortedIllegalFilename
Definition: FCUtils.hpp:126
@ kInvalidSslHandshake
Definition: FCOptions.hpp:65
bool encrypted
Whether the transfer was encrypted using TCP+SSL or UDP+AES.
Definition: FCTransferStats.hpp:395
std::string getCurrentServerReplyString() const
Quickly retrieve the last result string received from the FTP server.
Definition: FCControl.cpp:103
const std::string password
Definition: example001.cpp:20
@ k34_368_Mbps
34368000 bps
Definition: FCOptions.hpp:134
Remote(const std::string &n)
Definition: FCPath.cpp:431
@ kMd5InProgress
TransferStats::md5 MD5 verification has started; see fc::Options::setMd5Verification()
Definition: FCTransferStats.hpp:53
@ k504CommandNotImplementedWithParm
Definition: FCUtils.hpp:117
uint64_t packetsSent
The total number of packets sent to the server (client-side overhead).
Definition: FCTransferStats.hpp:297
virtual bool empty() const
Definition: FCPath.hpp:52
std::string formatTimestamp(std::chrono::high_resolution_clock::time_point tp)
Format the absolute time point using "YYYY:MM:DD HH:MM:SS".
Definition: FCTransferStats.cpp:478
@ k28_8_Kbps
28800 bps
Definition: FCOptions.hpp:109
uint64_t remainingNumberOfFilesToSend
The total number of files left to upload to the server.
Definition: FCStateAndStats.hpp:57
std::string remoteMd5
May not be set if MD5 is disabled.
Definition: FCTransferStats.hpp:106
std::string parentDirectory
the parent directory including the terminating slash
Definition: FCPath.hpp:132
@ kInvalidBandwidth
same as kZero_bps
Definition: FCOptions.hpp:99
@ k1_544_Mbps
1544000 bps
Definition: FCOptions.hpp:121
uint64_t multipleBlocksInAckNackState
Number of times when there was multiple blocks simultaneously waiting for ACK/NACK acknowledgment.
Definition: FCTransferStats.hpp:454
@ k503BadSequenceOfCommands
Definition: FCUtils.hpp:116
bool upload
Whether the transfer was an upload or a download.
Definition: FCTransferStats.hpp:407
@ kSkippedFileExists
TransferStats::type the entire file was skipped (overwrite mode is disabled); see fc::Options::setOve...
Definition: FCTransferStats.hpp:68
#define LIBFCVER
Definition: FCVersion.hpp:31
virtual Options & setTimeout(const int timeout=15)
Set the socket timeout when reading and writing network sockets.
Definition: FCOptions.cpp:387
uint64_t Kbps(const int rate)
Convert easy-to-use numerical values to bps values.
Definition: FCOptions.hpp:268
@ k451ActionAbortedLocalError
Definition: FCUtils.hpp:109
std::string formatTransferStatsEState(const fc::TransferStats::EState state)
Format the MD5 and transfer state enums into text strings.
Definition: FCTransferStats.cpp:250
int libfcBitSize()
Determine if the library was built for a 32-bit or 64-bit platform.
Definition: FCUtils.cpp:31
std::string getTextFromServerReply(const std::string &reply)
Parse the given string and return only the last line of text following the 3-digit FTP status code.
Definition: FCUtils.cpp:84
int main(int argc, char *argv[])
Definition: example006.cpp:143
const std::string serverIP
Definition: example002.cpp:20
@ kZero_bps
0 bps
Definition: FCOptions.hpp:100
int main(int argc, char *argv[])
Definition: example007.cpp:70
uint64_t ackPacketsReceived
The total number of ack packets.
Definition: FCTransferStats.hpp:320
@ k426DataConnectionClosedAbnormally
Definition: FCUtils.hpp:104
static bool truncateLogFile()
Alias for fc::Exception::createLogFile() to re-create the log file in which FC++ exceptions are logge...
Definition: FCException.hpp:149
const std::string username
Definition: example001.cpp:19
FileCatalyst C API Written by Stéphane Charette
Definition: 03_licence.txt:2
@ k1244_16_Mbps
1244160000 bps
Definition: FCOptions.hpp:153
std::string timestamp
Definition: FCUtils.hpp:149
std::string permissions
Definition: FCUtils.hpp:150
uint64_t duplicatePacketDropped
The total number of payload packets dropped because we received a duplicate from the server.
Definition: FCTransferStats.hpp:305
int example006()
Definition: example006.cpp:45
GlobalStats & clear()
Definition: FCStateAndStats.cpp:18
@ k213FileStatus
Definition: FCUtils.hpp:77
@ k2_048_Mbps
2048000 bps
Definition: FCOptions.hpp:123
std::map< size_t, fc::TransferStats > TransferStatsMap
Track all of the individual file transfers, where the key is a numeric sequence describing the order ...
Definition: FCStateAndStats.hpp:24
#define FC_SUMMARY_FILENAME
Definition: FCSummaryLog.cpp:12
std::string getFileModificationTime(const fc::Remote &remote)
Get the modification timestamp of the specified remote file.
Definition: FCControl.cpp:776
@ k1866_24_Mbps
1866240000 bps
Definition: FCOptions.hpp:155
std::string formatTransferRate(const uint64_t bps)
Format the transfer rate statistic using the common descriptions Kbps, Mbps, etc.
Definition: FCTransferStats.cpp:621
const std::string serverIP
Definition: example001.cpp:21
@ k80211ad
802.11ad, 6.75 Gbps
Definition: FCOptions.hpp:225
int main(int argc, char *argv[])
Definition: example004.cpp:116
virtual ~Exception() FC_NOEXCEPT
Destructor.
Definition: FCException.cpp:12
const std::string username
Definition: example002.cpp:18
static bool removeLogFile()
Remove the fc_exception.log file.
Definition: FCException.cpp:365
bool disable(const EType type, fc::Options &options)
Disable the specified logging type.
Definition: FCLogging.cpp:72
std::string filename
source file
Definition: FCException.hpp:170
#define FC_WHERE_DEF
Macros used to pass in several required parameters when instantiating a fc::Exception object.
Definition: FCException.hpp:41
static std::string convertNumberToSiOrIecString(const uint64_t bps, const long double factor=1000)
Definition: FCTransferStats.cpp:532
@ k28KModem
28.8 Kbps
Definition: FCOptions.hpp:172
@ k4_Mbps
4000000 bps
Definition: FCOptions.hpp:127
@ k80211g
802.11g, 54 Mbps
Definition: FCOptions.hpp:222
fc::StrMap map
additional/optional debug information
Definition: FCException.hpp:175
EState type
The type of transfer.
Definition: FCTransferStats.hpp:94
int main(int argc, char *argv[])
Definition: example005.cpp:77
virtual std::string to_string() const
Convert the exception to a very detailed multi-line text block.
Definition: FCException.hpp:99
void example007_file_transfer_stats_callback(const fc::GlobalStateAndStats &stats, void *ptr)
Definition: example007.cpp:21
uint64_t totalNumberOfFilesSent
The total number of files uploaded from the client to the server.
Definition: FCStateAndStats.hpp:48
fc::Control & clearFileMap()
Clear the map of pending file transfers.
Definition: FCControl.cpp:153
static fc::Local getLogFileOutputDir()
Static method to get the location where FileCatalyst C++ log files should be written.
Definition: FCOptions.cpp:713
@ kTransferFinished
TransferStats::transfer indicates the transfer was successful
Definition: FCTransferStats.hpp:61
@ kPauseForRetry
see fc::Options::setRetries()
Definition: FCStateAndStats.hpp:126
std::string fullDirAndName
the name combined with the default directory
Definition: FCPath.hpp:133
@ kT3
T3, 44.74 Mbps.
Definition: FCOptions.hpp:189
const std::string password
Definition: example002.cpp:19
@ k227ServerOpenedPassiveConnection
(h1,h2,h3,h4,p1,p2)
Definition: FCUtils.hpp:84
@ k1_Kbps
1000 bps
Definition: FCOptions.hpp:103
GlobalStateAndStats & clear()
Definition: FCStateAndStats.cpp:42
@ k425CannotOpenDataConnection
Definition: FCUtils.hpp:103
@ kCli
3 FC CLI tool
Definition: FCOptions.hpp:29
@ k202CommandNotImplemented
also see k502CommandNotImplemented
Definition: FCUtils.hpp:74
std::string formatTimeDuration(const std::chrono::high_resolution_clock::duration &d)
Format the "time remaining" statistic as a number followed by a common 1-letter description.
Definition: FCTransferStats.cpp:386
std::string raw(const std::string &cmd, const fc::FtpServerReplyCodes expectedReply=fc::kOkay)
Send an unmanaged raw command to the server.
Definition: FCControl.cpp:943
FileCatalyst C API Written by Stéphane stephanecharette gmail info filecatalyst com Contact Unlimi Tech Software Inc for FileCatalyst and FC license details OpenSSL with or without are permitted provided that the following conditions are this list of conditions and the following disclaimer Redistributions in binary form must reproduce the above copyright this list of conditions and the following disclaimer in the documentation and or other materials provided with the distribution Boost free of charge
Definition: 03_licence.txt:27
int main(int argc, char *argv[])
Definition: example003.cpp:55
std::chrono::high_resolution_clock::time_point timestamp
time when the exception was created
Definition: FCException.hpp:173
uint64_t remainingNumberOfFilesToReceive
The total number of files left to download from the server.
Definition: FCStateAndStats.hpp:60
fc::StrMap & add_to_map(fc::StrMap &m, const std::string &header="") const
Get the map entries – similar to getmap() – but instead of returning a new map, add the entries to a ...
Definition: FCTransferStats.cpp:241
@ kCliJava
7 Java application
Definition: FCOptions.hpp:38
@ kOC18
OC-18, 0.93 Gbps.
Definition: FCOptions.hpp:197
uint64_t networkWriterStarved
Number of times when the network buffer writer couldn't proceed with writing to the socket due to a l...
Definition: FCTransferStats.hpp:434
@ kConnected
connection is established, no transfer in progress
Definition: FCStateAndStats.hpp:124
uint64_t detectApproximateDownloadSpeed(const bool force_refresh=false)
Get an approximation of the available download transfer rate between the FC++ client and server.
Definition: FCControl.cpp:1070
you must not claim that you wrote the original software If you use this software in a an acknowledgment in the product documentation would be appreciated but is not required Altered source versions must be plainly marked as such
Definition: 03_licence.txt:54
fc::Remote temporaryRemoteFilename
Temporary remote filename prior to being renamed.
Definition: FCTransferStats.hpp:122
const std::string serverIP
Definition: example005.cpp:19
virtual const std::string & defaultDir() const =0
Get the default directory.
virtual Options & setMultiThreaded(const bool multi_threaded=true, const int count=3)
Toggle whether multiple threads are used for UDP transfers.
Definition: FCOptions.cpp:616
ESslHandshakeMode
Definition: FCOptions.hpp:63
std::string formatTimeDuration2(const std::chrono::high_resolution_clock::duration &d)
Format the "time remaining" statistic as a common time string, such as HH:MM:SS.
Definition: FCTransferStats.cpp:431
@ k4800_bps
4800 bps
Definition: FCOptions.hpp:106
virtual Options & setCongestionControl(const bool enabled=false, const int aggression=2)
Toggle the FileCatalyst UDP congestion control algorithm.
Definition: FCOptions.cpp:470
virtual const std::string & defaultDir() const
Get the default directory.
Definition: FCPath.cpp:461
std::string md5
Definition: FCUtils.hpp:153
virtual Options & setRetries(const int count=0, const int wait_period_in_seconds=30)
Set the number of times that failed transfers should be retried and the length of the pause (in secon...
Definition: FCOptions.cpp:648
fc::Local target_local_filename() const
Returns the local filename which should be used.
Definition: FCTransferStats.hpp:493
@ k2400_bps
2400 bps
Definition: FCOptions.hpp:105
std::string username
Definition: FCUtils.hpp:151
@ k13_1_Gbps
13178880000 bps (this value requires a 64-bit integer)
Definition: FCOptions.hpp:163
bool nameExists(const fc::Local &local)
Determine if a file or directory exists with the given name.
Definition: FCControl.cpp:815
fc::FtpServerReplyCodes ftpReplyCode
FTP server reply code.
Definition: FCException.hpp:167
virtual const std::string & separator() const =0
Return the usual path separator, such as slash or backslash.
@ k32_064_Mbps
32064000 bps
Definition: FCOptions.hpp:133
virtual bool isRelative() const
Original name is relative, such as test.txt or ..\test.txt.
Definition: FCPath.cpp:183
FtpServerReplyCodes
An enum to represent possible FTP server reply code.
Definition: FCUtils.hpp:64
std::string formatBytesOldStyle(const uint64_t bytes)
Format the payload bytes using IEC units (1024 bytes per "K"), similar to IEC but leave out the middl...
Definition: FCTransferStats.cpp:663
const std::string serverIP
Definition: example006.cpp:18
virtual const std::string & str() const
Definition: FCPath.hpp:56
const std::string serverIP
Definition: example004.cpp:27
@ k431TemporarilyUnableToProcessSecurity
Definition: FCUtils.hpp:106
uint64_t unitSize
The unit (packet) size.
Definition: FCTransferStats.hpp:371
std::string libfcVersionStr()
Return the version string of the FC++ library.
Definition: FCUtils.cpp:25
const std::string username
Definition: example007.cpp:16
@ k466_56_Mbps
466560000 bps
Definition: FCOptions.hpp:147
FileCatalyst C API Written by Stéphane stephanecharette gmail info filecatalyst com Contact Unlimi Tech Software Inc for FileCatalyst and FC license details OpenSSL with or without are permitted provided that the following conditions are this list of conditions and the following disclaimer Redistributions in binary form must reproduce the above copyright this list of conditions and the following disclaimer in the documentation and or other materials provided with the distribution Boost free of to any person or organization obtaining a copy of the software and accompanying documentation covered by this execute
Definition: 03_licence.txt:30
const fc::TransferStats * stats
Definition: example004.cpp:28
Control & connect()
Connect the fc::Control object to the specified FTP server.
Definition: FCControl.cpp:204
fc::FtpServerReplyCodes getCurrentServerReplyCode() const
Quickly retrieve the most recent result code received from the FTP server.
Definition: FCControl.cpp:115
Control & download()
Immediately download all files that have been queued for transfer.
Definition: FCControl.cpp:560
FileCatalyst C API Written by Stéphane stephanecharette gmail info filecatalyst com Contact Unlimi Tech Software Inc for FileCatalyst and FC license details OpenSSL with or without are permitted provided that the following conditions are this list of conditions and the following disclaimer Redistributions in binary form must reproduce the above copyright this list of conditions and the following disclaimer in the documentation and or other materials provided with the distribution Boost free of to any person or organization obtaining a copy of the software and accompanying documentation covered by this and transmit the and to prepare derivative works of the and to permit third parties to whom the Software is furnished to do all subject to the including the above license this restriction and the following must be included in all copies of the in whole or in part
Definition: 03_licence.txt:36
const std::string serverIP
Definition: example003.cpp:18
EState md5
State of the MD5 verification.
Definition: FCTransferStats.hpp:82
Local(const std::string &n)
Definition: FCPath.cpp:362
@ k3G
3G, UMTS, 384 Kbps
Definition: FCOptions.hpp:232
std::string getCurrentDirectory()
Get the current directory from the FTP server.
Definition: FCControl.cpp:308
@ kUnknown
Definition: FCTransferStats.hpp:50
@ k250RequestedActionOkay
Definition: FCUtils.hpp:91
static bool createLogFile(const bool truncateNow=false)
Create the fc_exception.log file used to record exceptions in FC++.
Definition: FCException.cpp:309
bool tmp_filename_is_enabled() const
Determine if this file stats object has the necessary filename information to use a temporary filenam...
Definition: FCTransferStats.hpp:536
std::vector< FileDetails > FDVec
A std::vector of fc::FileDetails.
Definition: FCUtils.hpp:158
@ k215OperatingSystem
Definition: FCUtils.hpp:79
Control & setStatsCallback(fc::StatisticsCallback callback, void *userCtx=NULL)
Set a C-style callback function to be called once per second when file transfer statistics are update...
Definition: FCControl.cpp:225
uint64_t blocksCompleted
The number of completed transfer blocks.
Definition: FCTransferStats.hpp:272
@ k64KISDN
ISDN, 64K.
Definition: FCOptions.hpp:176
Control & operator=(Control &&rhs)
C++11 move assignment.
Definition: FCControl.cpp:35
@ k2400Modem
2400 bps
Definition: FCOptions.hpp:169
@ k933_12_Mbps
933120000 bps
Definition: FCOptions.hpp:151
GlobalStateAndStats()
Definition: FCStateAndStats.cpp:34
#define LIBFCBITSIZE
Definition: FCVersion.hpp:39
FileCatalyst C API Written by Stéphane stephanecharette gmail info filecatalyst com Contact Unlimi Tech Software Inc for FileCatalyst and FC license details OpenSSL with or without are permitted provided that the following conditions are this list of conditions and the following disclaimer Redistributions in binary form must reproduce the above copyright this list of conditions and the following disclaimer in the documentation and or other materials provided with the distribution Boost free of to any person or organization obtaining a copy of the software and accompanying documentation covered by this and transmit the and to prepare derivative works of the and to permit third parties to whom the Software is furnished to do all subject to the including the above license this restriction and the following must be included in all copies of the in whole or in and all derivative works of the unless such copies or derivative works are solely in the form of machine executable object code generated by a source language processor including commercial and to alter it and redistribute it freely
Definition: 03_licence.txt:48
@ kOC3
OC-3, 155.52 Mbps.
Definition: FCOptions.hpp:194
FileCatalyst C API Written by Stéphane stephanecharette gmail info filecatalyst com Contact Unlimi Tech Software Inc for FileCatalyst and FC license details OpenSSL with or without are permitted provided that the following conditions are this list of conditions and the following disclaimer Redistributions in binary form must reproduce the above copyright this list of conditions and the following disclaimer in the documentation and or other materials provided with the distribution Boost http
Definition: 03_licence.txt:27
@ k211SystemStatus
Definition: FCUtils.hpp:75
@ k120ServiceReadyInMinutes
Definition: FCUtils.hpp:68
@ kDS2
DS-2, 6.312 Mbps.
Definition: FCOptions.hpp:182
fc::FDVec getDirectoryDetails(const fc::Remote &directory=fc::Remote("."), const bool getMd5=false)
Return as much information as possible on files and directories from the server.
Definition: FCControl.cpp:386
std::string get_filename(const EType type)
Get the filename for the specified log type.
Definition: FCLogging.cpp:125
@ k225DataConnectionOpen
Definition: FCUtils.hpp:82
virtual Name & simplify()
Attempt to simplify the path by removing double slashes and things like "../".
Definition: FCPath.cpp:33
uint64_t totalNumberOfFilesReceived
The total number of files downloaded from the server to the client.
Definition: FCStateAndStats.hpp:54
@ k11_Mbps
11000000 bps
Definition: FCOptions.hpp:131
virtual Options & setEncryption(const bool enable_TCP_SSL=false, const bool enable_UDP_AES=true)
Toggle control channel and data channel encryption.
Definition: FCOptions.cpp:543
virtual std::string getStr(const bool verbose=false) const
Similar to fc::Options::getMap(), but formatted as a multi-line text string.
Definition: FCOptions.cpp:283
@ kPartial
TransferStats::type only part of the file needed to be transferred (transfer was resumed); see fc::Op...
Definition: FCTransferStats.hpp:66
std::string opensslVersionStr()
Determine the version of OpenSSL used by FC++.
Definition: FCUtils.cpp:37
@ kMd5Skipped
TransferStats::md5 file transfer was skipped since MD5 checksum indicates no changes; see fc::Options...
Definition: FCTransferStats.hpp:56
@ k80211a
802.11a, 54 Mbps
Definition: FCOptions.hpp:220
bool isLoggedIn() const
Quickly determine if the fc::Control object has completed the login process.
Definition: FCControl.cpp:83
bool removeLogFile()
Remove the summary log file.
Definition: FCSummaryLog.cpp:58
bool truncateLogFile()
Truncate the summary log file, or create it if it didn't already exist.
Definition: FCSummaryLog.cpp:40
uint64_t packetLossEvent
The total number of data packet loss events.
Definition: FCTransferStats.hpp:360
TransferStats & operator+=(const TransferStats &rhs)
Combine transfer statistics to get statistics over several files.
Definition: FCTransferStats.cpp:85
int example004()
Definition: example004.cpp:58
int othererror
on Windows, this is set to WSAGetLastError()
Definition: FCException.hpp:164
std::chrono::high_resolution_clock::time_point timeTransferBegan
The time when the file transfer began.
Definition: FCTransferStats.hpp:136
static fc::Local output_log_directory("./")
const std::string username
Definition: example003.cpp:16
#define BASEFCVER
Definition: FCVersion.hpp:22
bool isFileCatalystServer() const
Quickly determine if the FTP server supports the FileCatalyst extensions.
Definition: FCControl.cpp:93
@ k144IDSL
IDSL, 144 Kbps.
Definition: FCOptions.hpp:178
@ k6_75_Gbps
6750000000 bps (this value requires a 64-bit integer)
Definition: FCOptions.hpp:160
virtual Options & setMd5Verification(const bool enabled=false, const int mode=0)
Toggle MD5 verification.
Definition: FCOptions.cpp:525
const fc::Options & getOptions() const
Get the current set of options.
Definition: FCControl.cpp:269
@ k521DataConnectionCannotBeOpened
Definition: FCUtils.hpp:118
virtual Options & setSocketOptions(const int socket_buffer_size_in_KiB=8192, const bool keepalive_enabled=true, const int keepalive_interval_in_seconds=55, const int keepalive_probes=9)
Set socket-based options.
Definition: FCOptions.cpp:502
virtual Options & setLocaldir(const std::string &local_directory=".")
Base path used when accessing local files.
Definition: FCOptions.cpp:562
virtual fc::StrMap getMap(const bool verbose=false) const
Obtain a simple std::map representation of the options.
Definition: FCOptions.cpp:167
uint64_t bitsPerSecondAverageTransferRate
The calculated average transfer rate.
Definition: FCStateAndStats.hpp:91
const std::string serverIP
Definition: example007.cpp:18
std::chrono::high_resolution_clock::time_point timePreviousBlockFinished
The time when the last block completed.
Definition: FCTransferStats.hpp:143
Control & setNewOptions(const fc::Options &newOptions)
Set new options.
Definition: FCControl.cpp:281
const std::string username
Definition: example004.cpp:25
std::string filename
Definition: FCUtils.hpp:147
uint64_t packetsReceived
The total number of packets received from the server.
Definition: FCTransferStats.hpp:289
@ k16_Mbps
16000000 bps
Definition: FCOptions.hpp:132
@ k4G
4G, 100 Mbps
Definition: FCOptions.hpp:233
TransferStats & clear(const bool all=true)
Clear most or all of the transfer statistics.
Definition: FCTransferStats.cpp:32
bool isDirectory
Definition: FCUtils.hpp:154
EState state
Global state of the FC++ library.
Definition: FCStateAndStats.hpp:130
virtual ~Remote()
Definition: FCPath.cpp:425
virtual Options & setBandwidth(const uint64_t full_bandwidth_bps=fc::bps(fc::kZero_bps), const uint64_t slow_start_bandwidth_bps=fc::bps(fc::kZero_bps))
Set the maximum and initial transfer rates which will be requested from the FileCatalyst server.
Definition: FCOptions.cpp:440
@ kOC48
OC-48, 2,49 Gbps.
Definition: FCOptions.hpp:200
@ k97_728_Mbps
97728000 bps
Definition: FCOptions.hpp:139
virtual Options & setSummaryLogging(const bool enabled=false)
Write a summary log.
Definition: FCOptions.cpp:775
@ k39_813_Gbps
39813120000 bps (this value requires a 64-bit integer)
Definition: FCOptions.hpp:164
@ k452ActionNotTakenOutOfDiskSpace
Definition: FCUtils.hpp:110
@ kMd5Success
TransferStats::md5 MD5 verification was successful
Definition: FCTransferStats.hpp:54
@ k51_84_Mbps
51840000 bps
Definition: FCOptions.hpp:136
@ kOC24
OC-24, 1.24 Gbps.
Definition: FCOptions.hpp:198
fc::Control & clearGlobalStats()
Clear all of the file transfer statistics.
Definition: FCControl.cpp:139
const std::string username
Definition: example005.cpp:17
@ k80211ac
802.11ac, 1.3 Gbps
Definition: FCOptions.hpp:224
fc::StrMap getMap(const std::string &header="") const
Format all the transfer statistics as easy-to-read text strings, and store into a map of strings.
Definition: FCTransferStats.cpp:142
#define FC_WHERE_PASS
Macros used to pass in several required parameters when instantiating a fc::Exception object.
Definition: FCException.hpp:42
virtual const std::string & name() const
The original name specified when this object was first instantiated.
Definition: FCPath.cpp:196
@ kDS1
DS-1, 1.54 Mbps.
Definition: FCOptions.hpp:181
@ kMobileUploaderIos
13 iPhone/iOS tool
Definition: FCOptions.hpp:41
@ kAll
Same as EType::kException + EType::kSummary + EType::kTrace (and EType::kDebug if available)
uint64_t requestRetransmit
The total number of client-side requests made to the server to transmit or retransmit a specific pack...
Definition: FCTransferStats.hpp:313
static std::string defaultRemoteDirectory
Definition: FCPath.hpp:174
fc::FtpServerReplyCodes getCodeFromServerReply(const std::string &reply)
Parse the given string and return the 3-digit FTP status code.
Definition: FCUtils.cpp:43
The class fc::Local is used to encapsulate local directories or files.
Definition: FCPath.hpp:141
#define FC_NOEXCEPT
Definition: FCWindows.hpp:58
@ k501ErrorInParametersOrArguments
Definition: FCUtils.hpp:114
@ k44_736_Mbps
44736000 bps
Definition: FCOptions.hpp:135
FileCatalyst C API Written by Stéphane stephanecharette gmail info filecatalyst com Contact Unlimi Tech Software Inc for FileCatalyst and FC license details OpenSSL with or without are permitted provided that the following conditions are this list of conditions and the following disclaimer Redistributions in binary form must reproduce the above copyright this list of conditions and the following disclaimer in the documentation and or other materials provided with the distribution Boost free of to any person or organization obtaining a copy of the software and accompanying documentation covered by this and transmit the and to prepare derivative works of the and to permit third parties to whom the Software is furnished to do all subject to the including the above license this restriction and the following disclaimer
Definition: 03_licence.txt:35
@ k500CommandNotRecognized
Definition: FCUtils.hpp:113
@ k6_312_Mbps
6312000 bps
Definition: FCOptions.hpp:128
fc::StrVec callstack
call stack where the exception was created
Definition: FCException.hpp:174
uint64_t blocksRemaining
The number of transfer blocks remaining.
Definition: FCTransferStats.hpp:281
@ k3_5_Mbps
3500000 bps
Definition: FCOptions.hpp:126
@ k1_Gbps
1000000000 bps
Definition: FCOptions.hpp:152
int example003()
Definition: example003.cpp:21
uint64_t payloadBytesTransferred
The number of payload bytes.
Definition: FCTransferStats.hpp:194
const fc::TransferStats & getMostRecentFileStats() const
Gets the most recent file transfer statistics.
Definition: FCControl.cpp:191
std::string formatTimeRecent(const std::chrono::high_resolution_clock::time_point &tp)
Format the time in an easy-to-read text string.
Definition: FCTransferStats.cpp:302
@ kUdp
2 UDP (FileCatalyst mode)
Definition: FCOptions.hpp:51
@ kTcp
1 TCP/FTP (original FTP mode)
Definition: FCOptions.hpp:50
@ k4976_64_Mbps
4967640000 bps (this value requires a 64-bit integer)
Definition: FCOptions.hpp:159
@ k332NeedAccountForLogin
Definition: FCUtils.hpp:98
void add(const std::string &msg)
Add a message to the summary log file.
Definition: FCSummaryLog.cpp:80
@ k2xxOkay
any 2xx-style positive response
Definition: FCUtils.hpp:130
@ k80211b
802.11b, 11 Mbps
Definition: FCOptions.hpp:221
Name(const std::string &n)
Definition: FCPath.cpp:23
@ k252Echo
Definition: FCUtils.hpp:92
@ kConnecting
Definition: FCStateAndStats.hpp:123
@ k33KModem
33.6 Kbps
Definition: FCOptions.hpp:173
@ kException
C++ exceptions are logged with a backtrace.
@ k14KModem
14.4 Kbps
Definition: FCOptions.hpp:171
@ k135_Mbps
135000000 bps
Definition: FCOptions.hpp:141
@ k533CommandProtectionLevelDenied
Definition: FCUtils.hpp:121
@ kTransferFailed
TransferStats::transfer transfer did not complete
Definition: FCTransferStats.hpp:62
@ k33_6_Kbps
36600 bps
Definition: FCOptions.hpp:110
@ k3xxPending
any 3xx-style response
Definition: FCUtils.hpp:131
static std::string defaultLocalDirectory
Definition: FCPath.hpp:154
@ kNone
Calling fc::Logging::enable(kNone) is equivalent to calling fc::Logging::disable(kAll).
@ k551RequestAbortedPageTypeUnknown
Definition: FCUtils.hpp:124
bool nameDoesNotExist(const fc::Local &local)
Determine if a file or directory already exists with this name.
Definition: FCControl.hpp:1096
std::string text
1-line exception text
Definition: FCException.hpp:172
Definition: FCControl.hpp:52
@ k214HelpMessage
Definition: FCUtils.hpp:78
@ kE1
E1, 2.048 Mbps.
Definition: FCOptions.hpp:187
virtual const char * what() const FC_NOEXCEPT
Inherited from std::exception to provide a very simple 1-line text string.
Definition: FCException.hpp:70
@ k9953_28_Mbps
9953280000 bps (this value requires a 64-bit integer)
Definition: FCOptions.hpp:161
@ kOC768
OC-768, 39.8 Gbps.
Definition: FCOptions.hpp:204
uint64_t metricsPacketsReceived
The total number of metric packets received.
Definition: FCTransferStats.hpp:343
virtual Exception & init(FC_WHERE_DEF, const fc::FtpServerReplyCodes code, const std::string &reply, const std::string &description, const fc::StrMap &map)
Initialize the exception, including getting the call stack where the exception was generated.
Definition: FCException.cpp:220
Control & deleteFile(const fc::Remote &remoteFile)
Delete a remote file.
Definition: FCControl.cpp:887
@ k2_75G
2.75G, EDGE, 236.8 Kbps
Definition: FCOptions.hpp:231
ECommonBandwidth
Enumerations for several common bandwidth values.
Definition: FCOptions.hpp:97
@ kDataConnectionReady
matches both k125DataConnectionAlreadyOpen and k150FileStatusOkayOpenDataConnection
Definition: FCUtils.hpp:135
virtual const std::string & separator() const
Return the usual path separator, such as slash or backslash.
Definition: FCPath.cpp:472
uint64_t dataPacketsReceived
The total number of data packets received.
Definition: FCTransferStats.hpp:327
@ kTransferStarted
TransferStats::transfer file transfer is in progress
Definition: FCTransferStats.hpp:60
@ kOC96
OC-96, 4.98 Gbps.
Definition: FCOptions.hpp:201
@ kMd5Failed
TransferStats::md5 MD5 verification failed
Definition: FCTransferStats.hpp:55
@ k230UserLoggedIn
Definition: FCUtils.hpp:87
@ kT5
T5, 400.35 Mbps.
Definition: FCOptions.hpp:191
@ k220ReadyForNewUser
Definition: FCUtils.hpp:80
#define FC_WHERE
Macros used to pass in several required parameters when instantiating a fc::Exception object.
Definition: FCException.hpp:40
@ k600_Mbps
600000000 bps
Definition: FCOptions.hpp:149
@ kActive
server connects to client for transfer (not supported in FC++)
Definition: FCOptions.hpp:58
@ k400_352_Mbps
400352000 bps
Definition: FCOptions.hpp:146
FileCatalyst C API Written by Stéphane stephanecharette gmail info filecatalyst com Contact Unlimi Tech Software Inc for FileCatalyst and FC license details OpenSSL with or without are permitted provided that the following conditions are this list of conditions and the following disclaimer Redistributions in binary form must reproduce the above copyright this list of conditions and the following disclaimer in the documentation and or other materials provided with the distribution Boost free of to any person or organization obtaining a copy of the software and accompanying documentation covered by this reproduce
Definition: 03_licence.txt:29
TransferStatsMap fileStatsMap
Track statistics on all individual file transfers.
Definition: FCStateAndStats.hpp:136
static std::string defaultLocalSeparator
Definition: FCPath.hpp:155
static std::string defaultRemoteSeparator
Definition: FCPath.hpp:175
uint64_t payloadBytesSkipped
The number of bytes that were skipped due to a successful auto-resume of a partial transfer.
Definition: FCTransferStats.hpp:227
@ k234SecurityDataExchangeComplete
Definition: FCUtils.hpp:90
@ kPassive
client asks server for a port to which it connects to transfer files
Definition: FCOptions.hpp:59
@ kOkay
any response that matches 1xx, 2xx, or 3xx
Definition: FCUtils.hpp:133
Control & prepareRecursiveDir(const fc::Remote &remote, const fc::Local &local)
Queue many files/directories for transfer.
Definition: FCControl.cpp:498
@ k212DirectoryStatus
Definition: FCUtils.hpp:76
@ k2G
2G GSM, 14.4 Kbps
Definition: FCOptions.hpp:229
@ k421ServiceNotAvailableClosingControl
Definition: FCUtils.hpp:102
@ k229ServerEnteringExtendedPassiveMode
(|||port|)
Definition: FCUtils.hpp:86
uint64_t bitsPerSecondAverageTransferRate
Transfer rates measured in bits per second.
Definition: FCTransferStats.hpp:243
virtual const std::string & separator() const
Return the usual path separator, such as slash or backslash.
Definition: FCPath.cpp:403