forked from gustavofbreunig/PrintQueueWatchCPP
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprintermonitor.h
More file actions
37 lines (28 loc) · 1.1 KB
/
printermonitor.h
File metadata and controls
37 lines (28 loc) · 1.1 KB
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
#ifndef PRINTERMONITOR_H
#define PRINTERMONITOR_H
#include "printerinformation.h"
#include "windows.h"
#include "monitoredprinters.h"
#include "printerchangenotificationthread.h"
#include <functional>
#include "printjobeventargs.h"
class PrinterMonitor
{
private:
MonitoredPrinters* _MonitoredPrinters = nullptr;
std::function<void(PrintJobEventArgs*)> JobEvent;
public:
PrinterMonitor();
~PrinterMonitor();
//Raised when a job is added to one of the print spool queues being monitored
std::function<void(PrintJobEventArgs*)> JobAdded;
//Raised when a job is removed from one of the print spool queues being monitored
std::function<void(PrintJobEventArgs*)> JobDeleted;
//Raised when a job is written to on one of the print spool queues being monitored
std::function<void(PrintJobEventArgs*)> JobWritten;
//Raised when a job's properties are changed in one of the print spool queues being monitored
std::function<void(PrintJobEventArgs*)> JobSet;
void AddPrinter(std::wstring DeviceName);
void RemovePrinter(std::wstring DeviceName);
};
#endif // PRINTERMONITOR_H