зеркало из https://github.com/mozilla/gecko-dev.git
Added GetContentLength and GetServerStatus to nsIURL class
This commit is contained in:
Родитель
6644cf58c5
Коммит
3dda89dc13
|
@ -882,6 +882,25 @@ nsresult nsHttpUrlImpl::SetPostData(nsIInputStream* input)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult nsHttpUrlImpl::GetContentLength(PRInt32 *len)
|
||||
{
|
||||
NS_LOCK_INSTANCE();
|
||||
*len = m_URL_s->content_length;
|
||||
NS_UNLOCK_INSTANCE();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
|
||||
nsresult nsHttpUrlImpl::GetServerStatus(PRInt32 *status)
|
||||
{
|
||||
NS_LOCK_INSTANCE();
|
||||
*status = m_URL_s->server_status;
|
||||
NS_UNLOCK_INSTANCE();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
nsresult nsHttpUrlImpl::ToString(PRUnichar* *unichars) const
|
||||
{
|
||||
nsAutoString string;
|
||||
|
|
|
@ -53,6 +53,8 @@ public:
|
|||
NS_IMETHOD SetURLGroup(nsIURLGroup* group);
|
||||
NS_IMETHOD SetPostHeader(const char* name, const char* value);
|
||||
NS_IMETHOD SetPostData(nsIInputStream* input);
|
||||
NS_IMETHOD GetContentLength(PRInt32 *len);
|
||||
NS_IMETHOD GetServerStatus(PRInt32 *status);
|
||||
NS_IMETHOD ToString(PRUnichar* *aString) const;
|
||||
|
||||
// from nsINetlibURL:
|
||||
|
|
|
@ -95,6 +95,10 @@ public:
|
|||
NS_IMETHOD SetPostHeader(const char* name, const char* value) = 0;
|
||||
|
||||
NS_IMETHOD SetPostData(nsIInputStream* input) = 0;
|
||||
|
||||
NS_IMETHOD GetContentLength(PRInt32 *len) = 0;
|
||||
|
||||
NS_IMETHOD GetServerStatus(PRInt32 *status) = 0;
|
||||
|
||||
/** Write the URL to aString, overwriting previous contents. */
|
||||
NS_IMETHOD ToString(PRUnichar* *aString) const = 0;
|
||||
|
|
Загрузка…
Ссылка в новой задаче