- clang format + naming improved
This commit is contained in:
+18
-18
@@ -7,39 +7,39 @@
|
||||
#include <windows.h>
|
||||
#include <Dbt.h>
|
||||
|
||||
class UsbChangeListener
|
||||
{
|
||||
public:
|
||||
class UsbChangeListener
|
||||
{
|
||||
public:
|
||||
class Delegate
|
||||
{
|
||||
public:
|
||||
virtual void onDeviceInsert(const wchar_t* name) = 0;
|
||||
virtual void onDeviceRemove(const wchar_t* name) = 0;
|
||||
virtual void onDeviceInsert(const wchar_t* name) = 0;
|
||||
virtual void onDeviceRemove(const wchar_t* name) = 0;
|
||||
};
|
||||
|
||||
|
||||
UsbChangeListener();
|
||||
~UsbChangeListener();
|
||||
|
||||
void setDelegate(Delegate* d);
|
||||
|
||||
void setDelegate(Delegate* d);
|
||||
Delegate* getDelegate() const;
|
||||
|
||||
void start();
|
||||
void stop();
|
||||
void start();
|
||||
void stop();
|
||||
|
||||
protected:
|
||||
HDEVNOTIFY mNotifyHandle; /// Handle to track notifications about USB insert/removal.
|
||||
HWND mHiddenWindow; /// Hidden window to receive notifications
|
||||
DEV_BROADCAST_DEVICEINTERFACE mNotificationFilter; /// Notifications filter
|
||||
wchar_t mWindowClassName[256]; /// Hidden window class
|
||||
Delegate* mDelegate; /// Event handler pointer
|
||||
protected:
|
||||
HDEVNOTIFY mNotifyHandle; /// Handle to track notifications about USB insert/removal.
|
||||
HWND mHiddenWindow; /// Hidden window to receive notifications
|
||||
DEV_BROADCAST_DEVICEINTERFACE mNotificationFilter; /// Notifications filter
|
||||
wchar_t mWindowClassName[256]; /// Hidden window class
|
||||
Delegate* mDelegate; /// Event handler pointer
|
||||
|
||||
/// Hidden window procedure.
|
||||
/// @param hwnd Window handle
|
||||
/// @param uMsg Message ID
|
||||
/// @param wParam First param
|
||||
/// @param lParam Second param
|
||||
static LRESULT CALLBACK ADRWindowProc( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam );
|
||||
};
|
||||
static LRESULT CALLBACK ADRWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user