From 9262278979709181414664053523657355762707 Mon Sep 17 00:00:00 2001 From: Glenn Smith Date: Thu, 24 Apr 2025 14:46:37 -0400 Subject: std::function ==> ProgressFunction --- http.h | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) (limited to 'http.h') diff --git a/http.h b/http.h index 8cade41b..59567178 100644 --- a/http.h +++ b/http.h @@ -29,6 +29,7 @@ #include #ifdef BINARYNINJACORE_LIBRARY + #include "progress.h" #include "downloadprovider.h" #include "json/json.h" #else @@ -195,8 +196,8 @@ namespace BinaryNinja::Http _STD_UNORDERED_MAP<_STD_STRING, _STD_STRING> m_headers; _STD_VECTOR m_body; - std::function m_downloadProgress; - std::function m_uploadProgress; + ProgressFunction m_downloadProgress; + ProgressFunction m_uploadProgress; /*! Construct an arbitrary HTTP request with an empty body @@ -209,8 +210,8 @@ namespace BinaryNinja::Http */ Request(_STD_STRING method, _STD_STRING url, const _STD_UNORDERED_MAP<_STD_STRING, _STD_STRING>& headers = {}, _STD_VECTOR> params = {}, - std::function downloadProgress = {}, - std::function uploadProgress = {}); + ProgressFunction downloadProgress = {}, + ProgressFunction uploadProgress = {}); /*! @@ -225,8 +226,8 @@ namespace BinaryNinja::Http */ Request(_STD_STRING method, _STD_STRING url, const _STD_UNORDERED_MAP<_STD_STRING, _STD_STRING>& headers, _STD_VECTOR> params, _STD_VECTOR body, - std::function downloadProgress = {}, - std::function uploadProgress = {}); + ProgressFunction downloadProgress = {}, + ProgressFunction uploadProgress = {}); /*! @@ -242,8 +243,8 @@ namespace BinaryNinja::Http Request(_STD_STRING method, _STD_STRING url, const _STD_UNORDERED_MAP<_STD_STRING, _STD_STRING>& headers, _STD_VECTOR> params, _STD_VECTOR> formFields, - std::function downloadProgress = {}, - std::function uploadProgress = {}); + ProgressFunction downloadProgress = {}, + ProgressFunction uploadProgress = {}); /*! @@ -258,8 +259,8 @@ namespace BinaryNinja::Http */ Request(_STD_STRING method, _STD_STRING url, const _STD_UNORDERED_MAP<_STD_STRING, _STD_STRING>& headers, _STD_VECTOR> params, _STD_VECTOR formFields, - std::function downloadProgress = {}, - std::function uploadProgress = {}); + ProgressFunction downloadProgress = {}, + ProgressFunction uploadProgress = {}); /*! @@ -273,8 +274,8 @@ namespace BinaryNinja::Http */ static Request Get(_STD_STRING url, const _STD_UNORDERED_MAP<_STD_STRING, _STD_STRING>& headers = {}, const _STD_VECTOR>& params = {}, - std::function downloadProgress = {}, - std::function uploadProgress = {}); + ProgressFunction downloadProgress = {}, + ProgressFunction uploadProgress = {}); /*! @@ -289,8 +290,8 @@ namespace BinaryNinja::Http */ static Request Post(_STD_STRING url, const _STD_UNORDERED_MAP<_STD_STRING, _STD_STRING>& headers = {}, const _STD_VECTOR>& params = {}, const _STD_VECTOR& body = {}, - std::function downloadProgress = {}, - std::function uploadProgress = {}); + ProgressFunction downloadProgress = {}, + ProgressFunction uploadProgress = {}); /*! @@ -306,8 +307,8 @@ namespace BinaryNinja::Http static Request Post(_STD_STRING url, const _STD_UNORDERED_MAP<_STD_STRING, _STD_STRING>& headers, const _STD_VECTOR>& params, const _STD_VECTOR>& formFields, - std::function downloadProgress = {}, - std::function uploadProgress = {}); + ProgressFunction downloadProgress = {}, + ProgressFunction uploadProgress = {}); /*! @@ -322,8 +323,8 @@ namespace BinaryNinja::Http */ static Request Post(_STD_STRING url, const _STD_UNORDERED_MAP<_STD_STRING, _STD_STRING>& headers, const _STD_VECTOR>& params, const _STD_VECTOR& formFields, - std::function downloadProgress = {}, - std::function uploadProgress = {}); + ProgressFunction downloadProgress = {}, + ProgressFunction uploadProgress = {}); }; -- cgit v1.3.1