Make wxWebResponse::Init() and Finalize() non-public
The former can be called from the derived class ctors while the latter only needs to be called from wxWebRequest itself, so just make it a friend: this is not ideal, but still better than leaving this public and simpler than any alternatives.
This commit is contained in:
@@ -154,10 +154,6 @@ public:
|
||||
|
||||
wxString AsString() const;
|
||||
|
||||
bool Init();
|
||||
|
||||
void Finalize();
|
||||
|
||||
virtual wxString GetFileName() const;
|
||||
|
||||
protected:
|
||||
@@ -166,15 +162,24 @@ protected:
|
||||
|
||||
wxWebResponse(wxWebRequest& request);
|
||||
|
||||
// Called from derived class ctor to finish initialization which can't be
|
||||
// performed in ctor itself as it needs to use pure virtual method.
|
||||
void Init();
|
||||
|
||||
void* GetDataBuffer(size_t sizeNeeded);
|
||||
|
||||
void ReportDataReceived(size_t sizeReceived);
|
||||
|
||||
private:
|
||||
// Called by wxWebRequest only.
|
||||
void Finalize();
|
||||
|
||||
wxMemoryBuffer m_readBuffer;
|
||||
mutable wxFFile m_file;
|
||||
mutable wxScopedPtr<wxInputStream> m_stream;
|
||||
|
||||
friend class wxWebRequest;
|
||||
|
||||
wxDECLARE_NO_COPY_CLASS(wxWebResponse);
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user