forked from hedgar2017/loki-example
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdevice.h
28 lines (21 loc) · 762 Bytes
/
device.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
#pragma once
#include <Windows.h>
class Device
{
public:
explicit Device(PCWSTR deviceInterface);
Device(const Device &) = delete;
void operator =(const Device &) = delete;
virtual ~Device() = default;
virtual void initialize();
virtual void abort();
bool isInitialized() const;
bool isAborted() const;
protected:
void setOutputReport(PVOID data, DWORD size);
private:
PCWSTR mp_deviceInterface {nullptr};
HANDLE mp_deviceHandle {nullptr};
bool m_isInitialized {false};
bool m_isAborted {false};
};