Subversion Repositories tpanel

Rev

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

Rev 117 Rev 120
Line 19... Line 19...
19
#ifndef __TFSFREADER_H__
19
#ifndef __TFSFREADER_H__
20
#define __TFSFREADER_H__
20
#define __TFSFREADER_H__
21
 
21
 
22
#include <string>
22
#include <string>
23
#include <vector>
23
#include <vector>
-
 
24
#include <functional>
24
 
25
 
25
#include "ftplib/ftplib.h"
26
#include "ftplib/ftplib.h"
26
 
27
 
27
#define _BUF_SIZE   1024
28
#define _BUF_SIZE   1024
28
 
29
 
Line 39... Line 40...
39
        ~TFsfReader();
40
        ~TFsfReader();
40
 
41
 
41
        bool copyOverFTP(const std::string& fname, const std::string& target);
42
        bool copyOverFTP(const std::string& fname, const std::string& target);
42
        bool unpack(const std::string&fname, const std::string& path);
43
        bool unpack(const std::string&fname, const std::string& path);
43
        static void callbackLog(char *str, void* arg, bool out);
44
        static void callbackLog(char *str, void* arg, bool out);
-
 
45
        static void callbackError(char *msg, void *arg, int err);
-
 
46
        static int callbackXfer(off64_t xfered, void *arg);
-
 
47
 
-
 
48
        static void regCallbackProgress(std::function<int (off64_t xfered)> progress) { _progress = progress; }
44
 
49
 
45
    private:
50
    private:
46
        ftplib *mFtpLib{nullptr};
51
        ftplib *mFtpLib{nullptr};
-
 
52
        static std::function<int (off64_t xfered)> _progress;
47
};
53
};
48
 
54
 
49
#endif
55
#endif