New configuration options for automatically uploading the avatars to an external server.

This commit is contained in:
lotodore
2009-03-01 23:09:14 +00:00
parent 4de0913bf2
commit 16decacb6b
14 changed files with 172 additions and 149 deletions
+4 -3
View File
@@ -42,7 +42,7 @@ TransferHelper::~TransferHelper()
}
void
TransferHelper::Init(const string &url, const string &targetFileName, const string &user, const string &password)
TransferHelper::Init(const string &url, const string &targetFileName, const string &user, const string &password, int filesize)
{
// Initialise curl.
m_data->curlHandle = curl_easy_init();
@@ -57,7 +57,7 @@ TransferHelper::Init(const string &url, const string &targetFileName, const stri
if (curl_easy_setopt(m_data->curlHandle, CURLOPT_URL, m_data->curlUrl.c_str()) != CURLE_OK)
throw NetException(__FILE__, __LINE__, ERR_SOCK_TRANSFER_INVALID_URL, 0);
InternalInit(url, targetFileName, user, password);
InternalInit(url, targetFileName, user, password, filesize);
// Use the multi interface for better abort handling.
if (curl_multi_add_handle(m_data->curlMultiHandle, m_data->curlHandle) != CURLM_OK)
@@ -156,4 +156,5 @@ boost::shared_ptr<TransferData>
TransferHelper::GetData()
{
return m_data;
}
}