- clang format + naming improved

This commit is contained in:
2026-09-03 10:03:42 +03:00
parent 249e614def
commit e166bae1ea
204 changed files with 20621 additions and 21019 deletions
+18 -18
View File
@@ -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