summaryrefslogtreecommitdiffstats
path: root/api/logic/screenshots/ImgurUpload.h
blob: 4fcf52333d22a6d61753ddb51e5f8df809cc33b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#pragma once
#include "net/NetAction.h"
#include "Screenshot.h"

#include "multimc_logic_export.h"

typedef std::shared_ptr<class ImgurUpload> ImgurUploadPtr;
class MULTIMC_LOGIC_EXPORT ImgurUpload : public NetAction
{
public:
	explicit ImgurUpload(ScreenshotPtr shot);
	static ImgurUploadPtr make(ScreenshotPtr shot)
	{
		return ImgurUploadPtr(new ImgurUpload(shot));
	}

protected
slots:
	virtual void downloadProgress(qint64 bytesReceived, qint64 bytesTotal);
	virtual void downloadError(QNetworkReply::NetworkError error);
	virtual void downloadFinished();
	virtual void downloadReadyRead()
	{
	}

public
slots:
	virtual void executeTask();

private:
	ScreenshotPtr m_shot;
	bool finished = true;
};