VirtualBox

Changeset 82727 in vbox for trunk/include/iprt


Ignore:
Timestamp:
Jan 13, 2020 2:55:50 PM (5 years ago)
Author:
vboxsync
Message:

IPRT/FTP: Implemented first support for data connection handling. Work in progress.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/ftp.h

    r82723 r82727  
    103103    /** Invalid reply type, do not use. */
    104104    RTFTPSERVER_REPLY_INVALID                        = 0,
     105    /** Command okay. */
     106    RTFTPSERVER_REPLY_OKAY                           = 200,
    105107    /** Command not implemented, superfluous at this site. */
    106108    RTFTPSERVER_REPLY_ERROR_CMD_NOT_IMPL_SUPERFLUOUS = 202,
    107     /** Command okay. */
    108     RTFTPSERVER_REPLY_OKAY                           = 200,
    109109    /** Service ready for new user. */
    110110    RTFTPSERVER_REPLY_READY_FOR_NEW_USER             = 220,
     
    117117    /** User name okay, need password. */
    118118    RTFTPSERVER_REPLY_USERNAME_OKAY_NEED_PASSWORD    = 331,
     119    /** Can't open data connection. */
     120    RTFTPSERVER_REPLY_CANT_OPEN_DATA_CONN            = 425,
    119121    /** Connection closed; transfer aborted. */
    120122    RTFTPSERVER_REPLY_CONN_CLOSED_TRANSFER_ABORTED   = 426,
     
    143145{
    144146    /** User name. */
    145     char         *pszUser;
     147    char                       *pszUser;
    146148    /** Number of failed login attempts. */
    147     uint8_t       cFailedLoginAttempts;
     149    uint8_t                     cFailedLoginAttempts;
    148150    /** Timestamp (in ms) of last command issued by the client. */
    149     uint64_t      tsLastCmdMs;
     151    uint64_t                    tsLastCmdMs;
     152    /** Current set data type. */
     153    RTFTPSERVER_DATA_TYPE       enmDataType;
    150154} RTFTPSERVERCLIENTSTATE;
    151155/** Pointer to a FTP server client state. */
     
    202206     */
    203207    DECLCALLBACKMEMBER(int,  pfnOnUserDisconnect)(PRTFTPCALLBACKDATA pData);
     208    DECLCALLBACKMEMBER(int,  pfnOnFileOpen)(PRTFTPCALLBACKDATA pData, const char *pcszPath, uint32_t fMode, void **ppvHandle);
     209    DECLCALLBACKMEMBER(int,  pfnOnFileRead)(PRTFTPCALLBACKDATA pData, void *pvHandle, void *pvBuf, size_t cbToRead, size_t *pcbRead);
     210    DECLCALLBACKMEMBER(int,  pfnOnFileClose)(PRTFTPCALLBACKDATA pData, void *pvHandle);
    204211    /**
    205212     * Callback which gets invoked when the client wants to retrieve the size of a specific file.
     
    216223     * @param   pData           Pointer to generic callback data.
    217224     * @param   pcszPath        Path of file / directory to "stat". Optional. If NULL, the current directory will be used.
    218      * @param   pFsObjInfo      Where to return the RTFSOBJINFO data on success.
     225     * @param   pFsObjInfo      Where to return the RTFSOBJINFO data on success. Optional.
    219226     * @returns VBox status code.
    220227     */
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette