summaryrefslogtreecommitdiffstats
path: root/logic/net/ScreenshotUploader.h
blob: c1c9db6f2af1a1f8f585167d711cf92153fbac82 (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
#pragma once
#include "NetAction.h"

class ScreenShot;
typedef std::shared_ptr<class ScreenShotUpload> ScreenShotUploadPtr;
typedef std::shared_ptr<class ScreenShotGet> ScreenShotGetPtr;
class ScreenShotUpload : public NetAction
{
public:
	explicit ScreenShotUpload(ScreenShot *shot);
	static ScreenShotUploadPtr make(ScreenShot *shot)
	{
		return ScreenShotUploadPtr(new ScreenShotUpload(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 start();

private:
	ScreenShot *m_shot;
};