KShare/uploaders/customuploader.hpp
ArsenArsen 37ce6f1eda Add clang-format; Make text and blur less annoying
I didn't read the clang-format documentation properly
2017-05-09 17:26:00 +02:00

35 lines
775 B
C++

#ifndef CUSTOMUPLOADER_HPP
#define CUSTOMUPLOADER_HPP
#include "uploader.hpp"
#include <QJsonObject>
#include <QMap>
#include <QUrl>
enum class HttpMethod { POST };
enum class RequestFormat { X_WWW_FORM_URLENCODED, JSON, PLAIN };
class CustomUploader : public Uploader {
public:
CustomUploader(QString absFilePath);
QString name();
QString description();
void doUpload(QPixmap *pixmap);
QString getFormatString(bool animated);
QMap<QString, QString> types;
private:
QString desc;
QString uName;
RequestFormat format = RequestFormat::JSON;
HttpMethod method = HttpMethod::POST;
QUrl target;
QJsonValue body;
QJsonObject headers;
QString returnPathspec;
QString iFormat;
};
#endif // CUSTOMUPLOADER_HPP