mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 15:23:51 +00:00
Fixed up ftp implementation for event queue arguemnt to NewConnection.
This commit is contained in:
parent
640e419016
commit
0c8a62f098
@ -69,7 +69,9 @@ nsFtpProtocolConnection::QueryInterface(const nsIID& aIID, void** aInstancePtr)
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsFtpProtocolConnection::Init(nsIUrl* url, nsISupports* eventSink) {
|
||||
nsFtpProtocolConnection::Init(nsIUrl* url, nsISupports* eventSink,
|
||||
PLEventQueue* eventQueue)
|
||||
{
|
||||
nsresult rv;
|
||||
|
||||
if (mConnected)
|
||||
@ -80,6 +82,8 @@ nsFtpProtocolConnection::Init(nsIUrl* url, nsISupports* eventSink) {
|
||||
|
||||
rv = eventSink->QueryInterface(nsIFtpEventSink::GetIID(), (void**)&mEventSink);
|
||||
|
||||
mEventQueue = eventQueue;
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
@ -107,7 +111,7 @@ nsFtpProtocolConnection::Resume(void) {
|
||||
|
||||
// establishes the connection and initiates the file transfer.
|
||||
NS_IMETHODIMP
|
||||
nsFtpProtocolConnection::Open(nsIUrl* url, nsISupports* eventSink) {
|
||||
nsFtpProtocolConnection::Open(void) {
|
||||
nsresult rv;
|
||||
|
||||
mState = FTP_CONNECT;
|
||||
|
@ -63,7 +63,7 @@ public:
|
||||
NS_IMETHOD Resume(void);
|
||||
|
||||
// nsIProtocolConnection methods:
|
||||
NS_IMETHOD Open(nsIUrl* url, nsISupports* eventSink);
|
||||
NS_IMETHOD Open(void);
|
||||
NS_IMETHOD GetContentType(char* *contentType);
|
||||
NS_IMETHOD GetInputStream(nsIInputStream* *result);
|
||||
NS_IMETHOD GetOutputStream(nsIOutputStream* *result);
|
||||
@ -88,17 +88,18 @@ public:
|
||||
nsFtpProtocolConnection();
|
||||
virtual ~nsFtpProtocolConnection();
|
||||
|
||||
nsresult Init(nsIUrl* url, nsISupports* eventSink);
|
||||
nsresult Init(nsIUrl* url, nsISupports* eventSink, PLEventQueue* eventQueue);
|
||||
|
||||
protected:
|
||||
nsIUrl* mUrl;
|
||||
nsIFtpEventSink* mEventSink;
|
||||
PLEventQueue* mEventQueue;
|
||||
PRInt32 mServerType;
|
||||
PRBool mPasv;
|
||||
PRBool mConnected;
|
||||
FTP_STATE mState;
|
||||
nsITransport* mCPipe; // the command channel
|
||||
nsITransport* mDPipe; // the data channel
|
||||
nsITransport* mCPipe; // the command channel
|
||||
nsITransport* mDPipe; // the data channel
|
||||
};
|
||||
|
||||
#endif /* nsFtpProtocolConnection_h___ */
|
||||
|
@ -96,14 +96,15 @@ nsFtpProtocolHandler::NewUrl(const char* aSpec,
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFtpProtocolHandler::NewConnection(nsIUrl* url,
|
||||
nsISupports* eventSink,
|
||||
nsIProtocolConnection* *result)
|
||||
nsISupports* eventSink,
|
||||
PLEventQueue* eventQueue,
|
||||
nsIProtocolConnection* *result)
|
||||
{
|
||||
nsresult rv;
|
||||
nsFtpProtocolConnection* connection = new nsFtpProtocolConnection();
|
||||
if (connection == nsnull)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
rv = connection->Init(url, eventSink);
|
||||
rv = connection->Init(url, eventSink, eventQueue);
|
||||
if (NS_FAILED(rv)) {
|
||||
delete connection;
|
||||
return rv;
|
||||
|
@ -41,6 +41,7 @@ public:
|
||||
nsIUrl* *result);
|
||||
NS_IMETHOD NewConnection(nsIUrl* url,
|
||||
nsISupports* eventSink,
|
||||
PLEventQueue* eventQueue,
|
||||
nsIProtocolConnection* *result);
|
||||
|
||||
// nsFtpProtocolHandler methods:
|
||||
@ -48,7 +49,6 @@ public:
|
||||
virtual ~nsFtpProtocolHandler();
|
||||
|
||||
protected:
|
||||
|
||||
};
|
||||
|
||||
#endif /* nsFtpProtocolHandler_h___ */
|
||||
|
Loading…
Reference in New Issue
Block a user