#pragma once

#include <stddef.h>

typedef enum {
    FTP_OK = 0,
    FTP_ERR_CONNECT,
    FTP_ERR_LOGIN,
    FTP_ERR_DOWNLOAD,
    FTP_ERR_FILE,
} ftp_err_t;

typedef void (*ftp_progress_cb_t)(size_t downloaded, size_t total);

typedef struct {
    const char *server;
    int port;
    const char *username;
    const char *password;
    const char *remote_path;
    const char *local_path;
} ftp_config_t;

ftp_err_t ftp_manager_download(const ftp_config_t *cfg,
                               ftp_progress_cb_t cb);
