зеркало из https://github.com/mozilla/gecko-dev.git
Add ability to change the url being used for a connection. This allows us to run multiple urls on a connection which we need for many of the mail protocols.
This commit is contained in:
Родитель
993a1496ad
Коммит
694043411e
|
@ -43,6 +43,16 @@ public:
|
|||
*/
|
||||
NS_IMETHOD GetURL(nsIURL **aURL)=0;
|
||||
|
||||
/**
|
||||
* Set the URL associated with this connection. I added this because it is possible
|
||||
* to keep a connection open and run different urls on the connection. (i.e.
|
||||
* for mail protocols or other consumers of the pluggable protocol interface).
|
||||
*
|
||||
* @param aURL In parameter
|
||||
* @result NS_OK if successful
|
||||
*/
|
||||
NS_IMETHOD SetURL(nsIURL *aURL) = 0;
|
||||
|
||||
/**
|
||||
* Get the input stream associated with this connection
|
||||
*
|
||||
|
|
|
@ -90,6 +90,17 @@ nsConnectionInfo::GetURL(nsIURL **aURL)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsConnectionInfo::SetURL(nsIURL *aURL)
|
||||
{
|
||||
NS_IF_RELEASE(pURL); // release old one
|
||||
pURL = aURL;
|
||||
NS_IF_ADDREF(pURL); // now addref new one
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsConnectionInfo::GetInputStream(nsIInputStream **aStream)
|
||||
{
|
||||
|
|
|
@ -49,6 +49,7 @@ public:
|
|||
nsIStreamListener *aNotify);
|
||||
|
||||
NS_IMETHOD GetURL(nsIURL **aURL);
|
||||
NS_IMETHOD SetURL(nsIURL *aURL);
|
||||
NS_IMETHOD GetInputStream(nsIInputStream **aStream);
|
||||
NS_IMETHOD GetOutputStream(nsIOutputStream **aStream);
|
||||
NS_IMETHOD GetConsumer(nsIStreamListener **aConsumer);
|
||||
|
|
Загрузка…
Ссылка в новой задаче