Prepare wxWebRequest::SetStorage() implementation

This commit is contained in:
Tobias Taschner 2018-10-29 22:06:15 +01:00
parent cf85c04d25
commit 5660565081
No known key found for this signature in database
GPG Key ID: AE6ECD71294F87FD

View File

@ -40,6 +40,13 @@ public:
State_Cancelled
};
enum Storage
{
Storage_Memory,
Storage_File,
Storage_None
};
virtual ~wxWebRequest() { }
virtual void SetHeader(const wxString& name, const wxString& value)
@ -53,6 +60,8 @@ public:
void SetIgnoreServerErrorStatus(bool ignore) { m_ignoreServerErrorStatus = ignore; }
virtual void SetStorage(Storage storage);
virtual void Start() = 0;
virtual void Cancel() = 0;
@ -75,6 +84,7 @@ public:
protected:
wxString m_method;
Storage m_storage;
wxWebRequestHeaderMap m_headers;
wxFileOffset m_dataSize;
wxSharedPtr<wxInputStream> m_dataStream;
@ -83,7 +93,8 @@ protected:
m_id(id),
m_state(State_Idle),
m_ignoreServerErrorStatus(false),
m_dataSize(0) { }
m_dataSize(0),
m_storage(Storage_Memory) { }
void SetState(State state, const wxString& failMsg = "");