Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

26 lines
621 B
C
Raw Normal View History

2016-05-12 16:51:25 -04:00
#pragma once
#include "net/NetRequest.h"
2016-05-12 16:51:25 -04:00
class SkinUpload : public Net::NetRequest {
Q_OBJECT
public:
using Ptr = shared_qobject_ptr<SkinUpload>;
enum Model { STEVE, ALEX };
2016-05-12 16:51:25 -04:00
// Note this class takes ownership of the file.
SkinUpload(QString token, QByteArray skin, Model model = STEVE);
virtual ~SkinUpload() = default;
static SkinUpload::Ptr make(QString token, QByteArray skin, Model model = STEVE);
void init() override;
protected:
virtual QNetworkReply* getReply(QNetworkRequest&) override;
2016-05-12 16:51:25 -04:00
private:
2016-05-12 16:51:25 -04:00
Model m_model;
QByteArray m_skin;
QString m_token;
2016-05-12 16:51:25 -04:00
};