#include "ble_plugin.h" // Windows stub - BLE peripheral not yet implemented. #include #include #include namespace ble { class BlePlugin : public flutter::Plugin { public: static void RegisterWithRegistrar(flutter::PluginRegistrarWindows* registrar) { auto channel = std::make_unique>( registrar->messenger(), "com.dalimaster.ble", &flutter::StandardMethodCodec::GetInstance()); auto plugin = std::make_unique(); channel->SetMethodCallHandler( [plugin_pointer = plugin.get()](const auto& call, auto result) { plugin_pointer->HandleMethodCall(call, std::move(result)); }); registrar->AddPlugin(std::move(plugin)); } BlePlugin() {} virtual ~BlePlugin() {} private: void HandleMethodCall( const flutter::MethodCall& method_call, std::unique_ptr> result) { if (method_call.method_name().compare("isSupported") == 0) { result->Success(flutter::EncodableValue(false)); } else { result->Success(); } } }; } // namespace ble void BlePluginCApiRegisterWithRegistrar( FlutterDesktopPluginRegistrarRef registrar) { ble::BlePlugin::RegisterWithRegistrar( flutter::PluginRegistrarManager::GetInstance() ->GetRegistrar(registrar)); }