|
|
Main context used in all operations. |
|
|
Boolean variables are integers. FALSE is 0 and all nonzero values are interpreted as TRUE. |
|
|
Context used in directory operations. |
|
|
Context used in file operations. |
|
|
Data structure for representing file attributes. |
|
|
Context used in globbing. |
|
|
Signed 32 bit integers. |
|
|
Signed 64 bit integers. |
|
|
Function prototype for message callback. SFT library calls message callback function when it needs to interact with the application. Different operations have different actions: SSH_SFT_OPERATION_FILE_COPY -> SSH_SFT_ACTION_START (start file copy?) SSH_SFT_ACTION_OVERWRITE (overwrite file?) SSH_SFT_ACTION_ASCII_CONVERSION_SRC (conversion from source?) SSH_SFT_ACTION_ASCII_CONVERSION_DST (conversion to destination?) SSH_SFT_OPERATION_FILE_MOVE -> SSH_SFT_ACTION_START (start file copy?) SSH_SFT_ACTION_OVERWRITE (overwrite file?) SSH_SFT_ACTION_ASCII_CONVERSION_SRC (conversion from source?) SSH_SFT_ACTION_ASCII_CONVERSION_DST (conversion to destination?) SSH_SFT_ACTION_REMOVE (remove file?) SSH_SFT_OPERATION_DIR_COPY -> SSH_SFT_ACTION_ENTER_DIR (enter directory?) SSH_SFT_ACTION_LIST (list file/directory?) SSH_SFT_ACTION_CREATE_DIR (create directory?) SSH_SFT_ACTION_START (start file copy?) SSH_SFT_ACTION_OVERWRITE (overwrite file?) SSH_SFT_ACTION_ASCII_CONVERSION_SRC (conversion from source?) SSH_SFT_ACTION_ASCII_CONVERSION_DST (conversion to destination?) SSH_SFT_OPERATION_DIR_MOVE -> SSH_SFT_ACTION_ENTER_DIR (enter directory?) SSH_SFT_ACTION_LIST (list file/directory?) SSH_SFT_ACTION_CREATE_DIR (create directory?) SSH_SFT_ACTION_START (start file copy?) SSH_SFT_ACTION_OVERWRITE (overwrite file?) SSH_SFT_ACTION_ASCII_CONVERSION_SRC (conversion from source?) SSH_SFT_ACTION_ASCII_CONVERSION_DST (conversion to destination?) SSH_SFT_ACTION_REMOVE (remove file?) SSH_SFT_ACTION_REMOVE_DIR (remove directory?) SSH_SFT_OPERATION_DIR_REMOVE -> SSH_SFT_ACTION_ENTER_DIR (enter directory?) SSH_SFT_ACTION_LIST (list file/directory?) SSH_SFT_ACTION_REMOVE (remove file?) SSH_SFT_ACTION_REMOVE_DIR (remove directory?)
|
|
|
Offsets used in file copy. |
|
|
SFT parameters. Each SFT session can be configured with parameters. |
|
|
Function prototype for file copy progress callback. SFT library calls progress callback function after each succesful data transfer. This means that the progress callback function is called very often and should not perform any heavy functionality. It is suggested that progress callback function only updates statistics and some other thread performs further actions, like drawing the progress bar.
|
|
|
Function prototype for creating file copy progress context. Directory copy is performed so that more than one file is copied at the same time. For this reason, application must provide one context for each file transfer. SFT library calls progress context creation function before each file transfer. This context is then given to progress callback function during the file transfer.
|
|
|
Function prototype for destroying file copy progress context. After file transfer SFT library calls progress context destroy function. Application can then free resources bound to the context.
|
|
|
Function prototype for signal callback function. Signal callback is used by the library to tell the application that it has performed some action. For example, if library loses the connection (SSH_SFT_SIGNAL_KILL), the application must tear done the corresponding contexts.
|
|
|
Timestamps are signed 64 bit integers. |
|
|
Unsigned 32 bit integers. |
|
|
Unsigned 64 bit integers. |
|
|
|
|
|
|
SFT action code. Action codes are used in directory operations to tell the user what kind of action starts. The user can then decide whether the action can start or not.
|
|
|
Checksum types. SFT can use checksums to check whether two files are identical. There is also separate checkpoint database that can be used for saving the state of the file transfer. If the file transfer is interrupted, the database can be used for determining the point from where file transfer can be resumed.
|
|
|
|
|
|
Return values for SFT API functions. All SFT API functions return these values. There is always a descriptive status message returned with the return value.
|
|
|
Attribute flags are used for specifying, which attributes are present.
|
|
|
File open flags. Different flags are used in opening file.
|
|
|
File types. Different file types are used in SFT operations. |
|
|
Return values for user interaction. These values are used when user interaction is needed to perform some operation. Interaction callback function is called from the library and the function must return the value for the library.
|
|
|
SFT operation code. Operation codes are used in directory operations to tell the user what kind of operation is going on. The user can then decide whether the operation can continue or not.
|
|
|
SETSTAT permissions modes. |
|
|
Signal type. Signal types are used for transfering signals from the library to the application. Signal callback is used by the library to tell the application that it has performed some action. For example, if library loses the connection (SSH_SFT_SIGNAL_KILL), the application must tear done the corresponding contexts. |
|
|
Streaming types. SFT can use two file transfer methods: traditional SFTP protocol and streaming. Traditional SFTP file transfer uses SFTP READ and WRITE messages to transfer file data. Streaming does not use SFTP protocol, but transfers the file data over a dedicated SSH channel without protocol overhead. There is a small overhead on setting up streaming channel, so it is not used for small files that can be sent using just one READ and WRITE messages.
|
|
|
File transfer mode. File can be transferred either in binary or ASCII mode. In ASCII mode newlines are converted from source convention to destination convention. |
|
||||||||||||
|
Abort operation. The ongoing file operations can be aborted with this function. 'handle' specifies the session that is aborted.
|
|
||||||||||||
|
Close SFT session. This function closes the session given in 'handle'.
|
|
||||||||||||||||
|
Configure SFT session. This function re-configures the session given in 'handle' using the parameters in 'param'.
|
|
||||||||||||||||
|
Get SFT configuration. This function gets the configuration of the session given in 'handle'.
|
|
||||||||||||||||||||||||||||||||||||||||||||
|
Copy file. Source file name with path is given in 'src_file'. Destination file name with path is given in 'dst_file'. File is copied from remote or local host specified by 'src_handle' to remote or local host specified by 'dst_handle'. 'handles' must be successfully opened before they are used. 'progress_cb' and 'progress_cb_ctx' are used for informing the caller about the progress of the file transfer. 'message_cb' and 'message_cb_ctx' are used for informing the caller about different actions during file transfer. For example, if destination file already exists and the user must be asked, whether the file can be overwritten, 'message_cb' function is called. With 'copy_offset' it is possible to give the starting offsets of the source and destination files. If 'copy_offset' is NULL, no offsets are used.
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Copy directory. Source directory name with path is given in 'src_dir'. Destination directory name with path is given in 'dst_dir'. Directory is copied from remote or local host specified by 'src_handle' to remote or local host specified by 'dst_handle'. 'src_handle' and 'dst_handle' must be successfully opened before they are used. 'glob' context is used for globbing. If 'glob' is NULL, no globbing is done. 'max_depth' specifies the maximum depth of the directory traversal. If 'max_depth' is set to 0, the whole directory is copied recursively. 'progress_cb' and 'progress_cb_ctx' are used for informing the caller about the progress of the file transfer. 'progress_ctx_create_cb' function is used for creating context for each file copy operation. 'progress_ctx_destroy_cb' function is used for destroying the created context. 'progress_cb_ctx' is given to both create adn destroy functions as an argument. 'message_cb' and 'message_cb_ctx' are used for informing the caller about different actions during file transfer. For example, if destination file already exists and the user must be asked, whether the file can be overwritten, 'message_cb' function is called.
|