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