Subversion Repositories tpanel

Rev

Rev 446 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 446 Rev 475
Line 1... Line 1...
1
/*
1
/*
2
 * Copyright (C) 2022 by Andreas Theofilu <andreas@theosys.at>
2
 * Copyright (C) 2022 to 2024 by Andreas Theofilu <andreas@theosys.at>
3
 *
3
 *
4
 * This program is free software; you can redistribute it and/or modify
4
 * This program is free software; you can redistribute it and/or modify
5
 * it under the terms of the GNU General Public License as published by
5
 * it under the terms of the GNU General Public License as published by
6
 * the Free Software Foundation; either version 3 of the License, or
6
 * the Free Software Foundation; either version 3 of the License, or
7
 * (at your option) any later version.
7
 * (at your option) any later version.
Line 39... Line 39...
39
        TFsfReader();
39
        TFsfReader();
40
        ~TFsfReader();
40
        ~TFsfReader();
41
 
41
 
42
        bool copyOverFTP(const std::string& fname, const std::string& target);
42
        bool copyOverFTP(const std::string& fname, const std::string& target);
43
        bool unpack(const std::string&fname, const std::string& path);
43
        bool unpack(const std::string&fname, const std::string& path);
-
 
44
        bool isTP5() { return tp5Type; }
44
        static void callbackLog(char *str, void* arg, bool out);
45
        static void callbackLog(char *str, void* arg, bool out);
45
        static void callbackError(char *msg, void *arg, int err);
46
        static void callbackError(char *msg, void *arg, int err);
46
        static int callbackXfer(off64_t xfered, void *arg);
47
        static int callbackXfer(off64_t xfered, void *arg);
47
 
48
 
48
        static void regCallbackProgress(std::function<int (off64_t xfered)> progress) { _progress = progress; }
49
        static void regCallbackProgress(std::function<int (off64_t xfered)> progress) { _progress = progress; }
49
 
50
 
50
    private:
51
    private:
51
        ftplib *mFtpLib{nullptr};
52
        ftplib *mFtpLib{nullptr};
52
        static std::function<int (off64_t xfered)> _progress;
53
        static std::function<int (off64_t xfered)> _progress;
53
        void logging(int level, const std::string& msg);
54
        void logging(int level, const std::string& msg);
-
 
55
 
-
 
56
        bool tp5Type{false};
54
};
57
};
55
 
58
 
56
#endif
59
#endif