From 67ad831a31b08ae68616501217e371b9e7b3dfa4 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 12 Jan 2021 03:07:11 +0100 Subject: [PATCH] Improve documentation of wxWebRequest storage methods Indicate which methods should be used with each storage type to process the data later. --- interface/wx/webrequest.h | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/interface/wx/webrequest.h b/interface/wx/webrequest.h index c4b086131d..15abd01074 100644 --- a/interface/wx/webrequest.h +++ b/interface/wx/webrequest.h @@ -152,15 +152,29 @@ public: */ enum Storage { - /// All data is collected in memory until the request is complete + /** + All data is collected in memory until the request is complete. + + It can be later retrieved using wxWebResponse::AsString() or + wxWebResponse::GetStream(). + */ Storage_Memory, - /// The data is written to a file on disk + /** + The data is written to a file on disk as it is received. + + This file can be later read from using wxWebResponse::GetStream() + or otherwise processed using wxWebRequestEvent::GetResponseFileName(). + */ Storage_File, /** The data is not stored by the request and is only available via events. + + Data can be retrieved using wxWebRequestEvent::GetDataBuffer() and + wxWebRequestEvent::GetDataSize() methods from wxEVT_WEBREQUEST_DATA + handler. */ Storage_None }; @@ -694,7 +708,7 @@ public: /** Returns the full path of a temporary file containing the response data - when the state is @c State_Completed and storage is @Storage_File. + when the state is @c State_Completed and storage is @c Storage_File. The file will be removed after the event handlers are called. You can move the file to a location of your choice if you want to process the