-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathAbstractDeviceWatcher.h
More file actions
44 lines (33 loc) · 1002 Bytes
/
AbstractDeviceWatcher.h
File metadata and controls
44 lines (33 loc) · 1002 Bytes
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
41
42
43
44
#ifndef _A_DEVICE_WATCHER_H_
#define _A_DEVICE_WATCHER_H_
#include "Win_CriticalSection.h"
#include "IDeviceChanged.h"
#include "ICollector.h"
#include "NotifyWindow.h"
namespace DeviceDetectLibrary
{
class IDeviceWatcherObserver;
class CAbstractDeviceWatcher : public boost::noncopyable, public ICollector, public IDeviceChanged
{
public:
virtual ~CAbstractDeviceWatcher(void);
virtual void Start();
virtual void Stop();
public: // ICollector
void Found(const CDeviceInfo::Pointer& pDeviceInfo);
void Lost(const std::wstring& devId);
protected:
explicit CAbstractDeviceWatcher(IDeviceWatcherObserver* observer);
virtual void StartEnumerators(void) = 0;
virtual void StopEnumerators(void) = 0;
CNotifyWindow& CreateNotifyWindow(void);
void RemoveNotifyWindow(void);
private:
Devices actualDevices_;
Devices tempDevices_;
IDeviceWatcherObserver* observer_;
CCriticalSection section_;
std::auto_ptr<CNotifyWindow> window_;
};
}
#endif _A_DEVICE_WATCHER_H_