2010-08-10 18:12:50 +02:00
|
|
|
/*
|
|
|
|
* This file is a part of Winix
|
|
|
|
* and is not publicly distributed
|
|
|
|
*
|
|
|
|
* Copyright (c) 2010, Tomasz Sowa
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2011-01-23 15:15:30 +01:00
|
|
|
#ifndef headerfile_winix_functions_upload
|
|
|
|
#define headerfile_winix_functions_upload
|
2010-08-10 18:12:50 +02:00
|
|
|
|
|
|
|
#include "functionbase.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace Fun
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
class Upload : public FunctionBase
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
Upload();
|
|
|
|
bool HasAccess();
|
|
|
|
void MakePost();
|
2011-01-05 22:24:11 +01:00
|
|
|
void UploadFile(Item & item, const std::wstring & tmp_filename);
|
2010-08-10 18:12:50 +02:00
|
|
|
|
|
|
|
private:
|
|
|
|
|
2011-01-05 22:24:11 +01:00
|
|
|
std::wstring path;
|
2010-12-10 22:07:01 +01:00
|
|
|
std::string patha, path_thumba;
|
|
|
|
|
2010-08-10 18:12:50 +02:00
|
|
|
bool HasAccess(const Item & item);
|
2010-12-10 22:07:01 +01:00
|
|
|
bool UploadSaveStaticFile(const Item & item, const std::wstring & tmp_filename);
|
2010-08-10 18:12:50 +02:00
|
|
|
bool FunUploadCheckAbuse();
|
|
|
|
void UploadMulti();
|
|
|
|
void UploadSingle();
|
2011-02-11 22:37:28 +01:00
|
|
|
void CreateThumb(Item & item);
|
2010-08-10 18:12:50 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
} // namespace
|
|
|
|
|
|
|
|
#endif
|