![]() |
TrustCore SDK NanoSSH API reference
version 7.0
|
Variables | |
| sbyte4(* | sftpClientSettings::funcPtrCloseFileUpcall )(sbyte4 connectionInstance, sftpcFileHandleDescr *p_sftpFileHandleDescr) |
| Respond to a file close request. More... | |
| sbyte4(* | sftpClientSettings::funcPtrOpenFileClientUpcall )(sbyte4 connectionInstance, sftpcFileHandleDescr *p_sftpFileHandleDescr) |
| Respond to a file open request. More... | |
| sbyte4(* | sftpClientSettings::funcPtrReadFileUpcall )(sbyte4 connectionInstance, sftpcFileHandleDescr *p_sftpFileHandleDescr) |
| Respond to a file download request. More... | |
| void(* | sftpClientSettings::funcPtrStatus )(sbyte4 connectionInstance, ubyte4 statusCode, ubyte *message, ubyte4 messageLength, ubyte *pLanguage, ubyte4 languageLength) |
| Respond to a file open request. More... | |
| sbyte4(* | sftpClientSettings::funcPtrWriteFileUpcall )(sbyte4 connectionInstance, sftpcFileHandleDescr *p_sftpFileHandleDescr) |
| Respond to a file upload request. More... | |
| sbyte4(* sftpClientSettings::funcPtrCloseFileUpcall) (sbyte4 connectionInstance, sftpcFileHandleDescr *p_sftpFileHandleDescr) |
This callback function is invoked when a user is finished viewing, modifying, or adding a file.
To enable this function, the following flag must be defined in moptions.h:
__ENABLE_MOCANA_SSH_FTP_CLIENT__ | connectionInstance | Connection instance returned from SSHC_connect(). |
| p_sftpFileHandleDescr | File handle descriptor returned from SSHC_openFile(). Contains state information for a specific open file connection (similar to a connection instance). |
OK (0) if successful; otherwise a negative number error code that is meaningful within the context of your application.| sbyte4(* sftpClientSettings::funcPtrOpenFileClientUpcall) (sbyte4 connectionInstance, sftpcFileHandleDescr *p_sftpFileHandleDescr) |
This callback function is invoked when a user issues a file open request (for either reading or writing).
To enable this function, the following flag must be defined in moptions.h:
__ENABLE_MOCANA_SSH_FTP_CLIENT__ | connectionInstance | Connection instance returned from SSHC_connect(). |
| p_sftpFileHandleDescr | File handle descriptor returned from SSHC_openFile(). Contains state information for a specific open file connection (similar to a connection instance). |
OK (0) if successful; otherwise a negative number error code that is meaningful within the context of your application.| sbyte4(* sftpClientSettings::funcPtrReadFileUpcall) (sbyte4 connectionInstance, sftpcFileHandleDescr *p_sftpFileHandleDescr) |
This callback function is invoked when a server downloads (requests) a file by using get.
To enable this function, the following flag must be defined in moptions.h:
__ENABLE_MOCANA_SSH_FTP_CLIENT__ | connectionInstance | Connection instance returned from SSHC_connect(). |
| p_sftpFileHandleDescr | File handle descriptor returned from SSHC_openFile(). Contains state information for a specific open file connection (similar to a connection instance). |
OK (0) if successful; otherwise a negative number error code that is meaningful within the context of your application.| void(* sftpClientSettings::funcPtrStatus) (sbyte4 connectionInstance, ubyte4 statusCode, ubyte *message, ubyte4 messageLength, ubyte *pLanguage, ubyte4 languageLength) |
This is an optional callback that you can implement and invoke anytime to obtain the SSH server's response to NanoSSH client. This is particularly useful when a NanoSSH API method returns an error code and you want to learn the low-level details from the server's message, and display or log that information.
To enable this function, the following flag must be defined in moptions.h:
__ENABLE_MOCANA_SSH_FTP_CLIENT__ | connectionInstance | Connection instance returned from SSHC_connect(). |
| statusCode | Error/status code contained in the payload of the server's response. The location of the error code in the payload varies by server response type, as per the RFC. |
| message | Message text contained in the payload of the server's response. The location of the message in the payload varies by server response type, as per the RFC. |
| messageLength | Number of bytes in the server's response message text. The location of the message length in the payload varies by server response type, as per the RFC. |
| pLanguage | Language tag in the server's response, as defined in RFC 1766. |
| languageLength | Number of bytes in the language tag of the server's response. |
OK (0) if successful; otherwise a negative number error code that is meaningful within the context of your application.| sbyte4(* sftpClientSettings::funcPtrWriteFileUpcall) (sbyte4 connectionInstance, sftpcFileHandleDescr *p_sftpFileHandleDescr) |
This callback function is invoked when a server uploads a file by using put.
To enable this function, the following flag must be defined in moptions.h:
__ENABLE_MOCANA_SSH_FTP_CLIENT__ | connectionInstance | Connection instance returned from SSHC_connect(). |
| p_sftpFileHandleDescr | File handle descriptor returned from SSHC_openFile(). Contains state information for a specific open file connection (similar to a connection instance). |
OK (0) if successful; otherwise a negative number error code that is meaningful within the context of your application.