#include "device_bus/monitor/WindowsDeviceMonitor.h"

#include "utils/logs/logging.h"

namespace softbus::device_bus::monitor
{

WindowsDeviceMonitor::WindowsDeviceMonitor(QObject* parent)
    : IDeviceMonitor(parent)
{
#if defined(_WIN32)
    // real impl allocated in start()
#endif
}

WindowsDeviceMonitor::~WindowsDeviceMonitor()
{
    stop();
}

bool WindowsDeviceMonitor::start()
{
#if defined(_WIN32)
    // TODO: Implement WM_DEVICECHANGE + SetupAPI + NotifyIpInterfaceChange.
    // Keep as stub for now to allow Linux builds; Windows build will need completing.
    LOG_INFO() << "WindowsDeviceMonitor started (stub)";
    return true;
#else
    LOG_WARNING() << "WindowsDeviceMonitor is not available on this platform";
    return true;
#endif
}

void WindowsDeviceMonitor::stop()
{
#if defined(_WIN32)
    LOG_INFO() << "WindowsDeviceMonitor stopped (stub)";
#endif
}

std::vector<DeviceEvent> WindowsDeviceMonitor::snapshotExisting()
{
    // TODO: implement full snapshot on Windows.
    return {};
}

} // namespace softbus::device_bus::monitor

