From 36dec7f551f2da82e87aacbbd8d386cdaac757fb Mon Sep 17 00:00:00 2001 From: Lee Hoe Mun Date: Sat, 14 Oct 2023 14:53:03 +0800 Subject: [PATCH] add missing listener methods for windows --- windows/ReactNativeBlobUtil/ReactNativeBlobUtil.cpp | 8 ++++++++ windows/ReactNativeBlobUtil/ReactNativeBlobUtil.h | 13 +++++++++++++ 2 files changed, 21 insertions(+) diff --git a/windows/ReactNativeBlobUtil/ReactNativeBlobUtil.cpp b/windows/ReactNativeBlobUtil/ReactNativeBlobUtil.cpp index af6761345..2cd7ef097 100644 --- a/windows/ReactNativeBlobUtil/ReactNativeBlobUtil.cpp +++ b/windows/ReactNativeBlobUtil/ReactNativeBlobUtil.cpp @@ -1526,6 +1526,14 @@ void ReactNativeBlobUtil::splitPath(const std::wstring& fullPath, winrt::hstring fileName = path.has_filename() ? winrt::to_hstring(path.filename().c_str()) : L""; } +void ReactNativeBlobUtil::addListener(std::string eventName) noexcept +{ +} + +void ReactNativeBlobUtil::removeListeners(double count) noexcept +{ +} + winrt::Windows::Foundation::IAsyncAction ReactNativeBlobUtil::ProcessRequestAsync( const std::string& taskId, const winrt::Windows::Web::Http::Filters::HttpBaseProtocolFilter& filter, diff --git a/windows/ReactNativeBlobUtil/ReactNativeBlobUtil.h b/windows/ReactNativeBlobUtil/ReactNativeBlobUtil.h index de839df50..1cf44d6b8 100644 --- a/windows/ReactNativeBlobUtil/ReactNativeBlobUtil.h +++ b/windows/ReactNativeBlobUtil/ReactNativeBlobUtil.h @@ -320,6 +320,19 @@ struct ReactNativeBlobUtil : std::enable_shared_from_this std::string streamId, std::function callback) noexcept; + // addListener + REACT_METHOD(addListener); + void addListener( + std::string eventName + ) noexcept; + + // removeListeners + REACT_METHOD(removeListeners); + void removeListeners( + double count + ) noexcept; + + // Helper methods private: