iScanEngineDeviceList.h
1 #pragma once
2 
3 #include <boost/system/error_code.hpp>
4 #include <list>
5 
6 #include "iScanEngineDevice.h"
7 
8 namespace dpyImagerscanengine {
9 
10 typedef enum
11 {
12  ADDED = 0,
13  REMOVED = 1,
14 } ListEvent;
15 
16 struct UsbDevice
17 {
18  int devNumber;
19  uint16_t idVendor;
20  uint16_t idProduct;
21 };
22 
23 }
24 
31 {
32 public:
38  virtual void listEvent(boost::shared_ptr<IScanEngineDevice> scanner, dpyImagerscanengine::ListEvent event) = 0;
39 
44  {
45  }
46 };
47 
53 {
54 private:
55  std::vector<ScanEngineDeviceListObserver*> mObserversList;
56 
57 protected:
58  virtual ~IScanEngineDeviceList();
59  boost::system::error_code subscribe(ScanEngineDeviceListObserver* observer);
60  boost::system::error_code unsubscribe(ScanEngineDeviceListObserver* observer);
61 
62  virtual boost::system::error_code getScanners(std::list<boost::shared_ptr<IScanEngineDevice>>& list) = 0;
63 };
Definition: iScanEngineDeviceList.h:30
ADDED.
Definition: iScanEngineDeviceList.h:12
int devNumber
Device address.
Definition: iScanEngineDeviceList.h:18
uint16_t idProduct
USB product ID.
Definition: iScanEngineDeviceList.h:20
Definition: iScanEngineDeviceList.h:16
uint16_t idVendor
USB vendor ID.
Definition: iScanEngineDeviceList.h:19
Deepsy Imagerscanengine namespace that includes the different enums, structs or method signatures tha...
ListEvent
Definition: iScanEngineDeviceList.h:10
REMOVED.
Definition: iScanEngineDeviceList.h:13
virtual ~ScanEngineDeviceListObserver()
Destructor.
Definition: iScanEngineDeviceList.h:43
Definition: iScanEngineDeviceList.h:52