Remove semi-public wxWebSession::GetImpl()
It's better not to have this method in the public class, even if it means that we need to pass a wxWebSessionImpl object to wxWebRequestImpl ctor explicitly now. No real changes.
This commit is contained in:
@@ -107,7 +107,10 @@ protected:
|
|||||||
wxFileOffset m_dataSize;
|
wxFileOffset m_dataSize;
|
||||||
wxScopedPtr<wxInputStream> m_dataStream;
|
wxScopedPtr<wxInputStream> m_dataStream;
|
||||||
|
|
||||||
wxWebRequestImpl(wxWebSession& session, wxEvtHandler* handler, int id);
|
wxWebRequestImpl(wxWebSession& session,
|
||||||
|
wxWebSessionImpl& sessionImpl,
|
||||||
|
wxEvtHandler* handler,
|
||||||
|
int id);
|
||||||
|
|
||||||
// Call SetState() with either State_Failed or State_Completed appropriate
|
// Call SetState() with either State_Failed or State_Completed appropriate
|
||||||
// for the response status.
|
// for the response status.
|
||||||
|
@@ -230,8 +230,6 @@ public:
|
|||||||
|
|
||||||
void Close();
|
void Close();
|
||||||
|
|
||||||
wxWebSessionImpl* GetImpl() const { return m_impl.get(); }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static void RegisterFactory(const wxString& backend,
|
static void RegisterFactory(const wxString& backend,
|
||||||
wxWebSessionFactory* factory);
|
wxWebSessionFactory* factory);
|
||||||
|
@@ -55,9 +55,12 @@ static const wxStringCharType* wxNO_IMPL_MSG
|
|||||||
//
|
//
|
||||||
// wxWebRequestImpl
|
// wxWebRequestImpl
|
||||||
//
|
//
|
||||||
wxWebRequestImpl::wxWebRequestImpl(wxWebSession& session, wxEvtHandler* handler, int id)
|
wxWebRequestImpl::wxWebRequestImpl(wxWebSession& session,
|
||||||
|
wxWebSessionImpl& sessionImpl,
|
||||||
|
wxEvtHandler* handler,
|
||||||
|
int id)
|
||||||
: m_storage(wxWebRequest::Storage_Memory),
|
: m_storage(wxWebRequest::Storage_Memory),
|
||||||
m_headers(session.GetImpl()->GetHeaders()),
|
m_headers(sessionImpl.GetHeaders()),
|
||||||
m_dataSize(0),
|
m_dataSize(0),
|
||||||
m_session(session),
|
m_session(session),
|
||||||
m_handler(handler),
|
m_handler(handler),
|
||||||
|
@@ -156,7 +156,7 @@ wxWebRequestCURL::wxWebRequestCURL(wxWebSession & session,
|
|||||||
wxEvtHandler* handler,
|
wxEvtHandler* handler,
|
||||||
const wxString & url,
|
const wxString & url,
|
||||||
int id):
|
int id):
|
||||||
wxWebRequestImpl(session, handler, id),
|
wxWebRequestImpl(session, sessionImpl, handler, id),
|
||||||
m_sessionImpl(sessionImpl)
|
m_sessionImpl(sessionImpl)
|
||||||
{
|
{
|
||||||
m_headerList = NULL;
|
m_headerList = NULL;
|
||||||
|
@@ -127,7 +127,7 @@ wxWebRequestWinHTTP::wxWebRequestWinHTTP(wxWebSession& session,
|
|||||||
wxEvtHandler* handler,
|
wxEvtHandler* handler,
|
||||||
const wxString& url,
|
const wxString& url,
|
||||||
int id):
|
int id):
|
||||||
wxWebRequestImpl(session, handler, id),
|
wxWebRequestImpl(session, sessionImpl, handler, id),
|
||||||
m_sessionImpl(sessionImpl),
|
m_sessionImpl(sessionImpl),
|
||||||
m_url(url),
|
m_url(url),
|
||||||
m_connect(NULL),
|
m_connect(NULL),
|
||||||
|
@@ -164,7 +164,7 @@ wxWebRequestURLSession::wxWebRequestURLSession(wxWebSession& session,
|
|||||||
wxEvtHandler* handler,
|
wxEvtHandler* handler,
|
||||||
const wxString& url,
|
const wxString& url,
|
||||||
int winid):
|
int winid):
|
||||||
wxWebRequestImpl(session, handler, winid),
|
wxWebRequestImpl(session, sessionImpl, handler, winid),
|
||||||
m_sessionImpl(sessionImpl),
|
m_sessionImpl(sessionImpl),
|
||||||
m_url(url)
|
m_url(url)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user