-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWorker.h
41 lines (35 loc) · 822 Bytes
/
Worker.h
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
34
35
36
37
38
39
40
#pragma once
#include <Windows.h>
#include <string>
#include "Settings.h"
#include "OMDbInfo.h"
using namespace std;
#define STD_BUFFSIZE 4096
bool ejectDisk(char driveLetter);
std::string GetLastErrorAsString();
std::string FindPosterUrl(std::string json);
bool fileExists(std::string file);
class Worker
{
private:
std::string driveLetter;
std::string strTitle;
// DVDInfo info;
HANDLE hThread;
DWORD threadId;
bool run;
Settings* set;
OMDbInfo* omdb;
HWND txtOut;
static DWORD WINAPI WorkerThread(LPVOID lpParam);
std::string RenameFile(std::string& folder);
static bool RipDisk(Worker * wrkr);
public:
Worker(char drive, Settings* settings);
~Worker();
void Stop();
bool IsStarted();
void Start();
void SetTextWindow(HWND hwnd);// { txtOut = hwnd; }
HWND GetTextWindow() { return txtOut; }
};