fixed: UGContainer<Type> used a std::vector<Type> and when a new item was inserted
then current iterators (and pointers) were invalidated
now we are using std::vector<Type*>
this caused some crashes when a new user was added by 'adduser' winix function
added: plugin 'export' is able to upload files on a remote server now
(not finished yet)
changed: Thumb class is now called: Image
and we are able to resize images too
(some new options in the config and in mount points)
added: some new plugin messages
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@764 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -10,7 +10,9 @@
|
||||
#ifndef headerfile_winix_plugins_export_exportthread
|
||||
#define headerfile_winix_plugins_export_exportthread
|
||||
|
||||
#include <vector>
|
||||
#include <list>
|
||||
#include <curl/curl.h>
|
||||
#include "core/basethread.h"
|
||||
#include "message.h"
|
||||
|
||||
@@ -27,6 +29,7 @@ public:
|
||||
ExportThread();
|
||||
|
||||
void SetUTF8(bool use_utf8);
|
||||
void SetBaseUrl(const std::wstring & url);
|
||||
|
||||
void AddMessage(const Message & message);
|
||||
void AddMessage(int type, const std::wstring & url, const std::wstring & path);
|
||||
@@ -41,15 +44,38 @@ private:
|
||||
static ExportThread * exp_thread;
|
||||
std::string url_a;
|
||||
std::string buffer;
|
||||
size_t buffer_read_index;
|
||||
bool utf8;
|
||||
std::wstring base_url;
|
||||
|
||||
std::string browser_name;
|
||||
std::string ftp_server;
|
||||
std::string ftp_login;
|
||||
std::string ftp_pass;
|
||||
char error_buf[CURL_ERROR_SIZE];
|
||||
|
||||
int conn_timeout; // timeout in seconds
|
||||
int conn_max_errors; // maximum errors (if there are more then a message is treated as undeliverable)
|
||||
|
||||
std::string look_for_url;
|
||||
std::string repl_url;
|
||||
std::string local_path;
|
||||
|
||||
virtual bool SignalReceived();
|
||||
virtual void Do();
|
||||
void DoMessage();
|
||||
bool Fetch(const char * url);
|
||||
bool Put();
|
||||
static size_t StaticSaveFunction(char * ptr, size_t size, size_t nmemb, void *userdata);
|
||||
size_t SaveFunction(char * ptr, size_t size, size_t nmemb, void *userdata);
|
||||
|
||||
static size_t StaticReadFunction(char * ptr, size_t size, size_t nmemb, void *userdata);
|
||||
size_t ReadFunction(char * ptr, size_t size, size_t nmemb, void *userdata);
|
||||
void Convert(const std::wstring & in, std::string & out, bool clear = true);
|
||||
void ChangeAdresses(std::string & buf);
|
||||
void ChangeAdressesThumb(std::string & buf);
|
||||
bool HasThumbInAdress(std::string & buf, size_t i);
|
||||
void CreateBaseUrl(std::string & buf);
|
||||
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
||||
Reference in New Issue
Block a user