📄 nsihttpchannel.h
字号:
*/ /* void visitResponseHeaders (in nsIHttpHeaderVisitor aVisitor); */ NS_IMETHOD VisitResponseHeaders(nsIHttpHeaderVisitor *aVisitor) = 0; /** * Returns true if the server sent a "Cache-Control: no-store" response * header. */ /* boolean isNoStoreResponse (); */ NS_IMETHOD IsNoStoreResponse(PRBool *_retval) = 0; /** * Returns true if the server sent the equivalent of a "Cache-control: * no-cache" response header. Equivalent response headers include: * "Pragma: no-cache", "Expires: 0", and "Expires" with a date value * in the past relative to the value of the "Date" header. */ /* boolean isNoCacheResponse (); */ NS_IMETHOD IsNoCacheResponse(PRBool *_retval) = 0;};/* Use this macro when declaring classes that implement this interface. */#define NS_DECL_NSIHTTPCHANNEL \ NS_IMETHOD GetRequestMethod(nsACString & aRequestMethod); \ NS_IMETHOD SetRequestMethod(const nsACString & aRequestMethod); \ NS_IMETHOD GetReferrer(nsIURI * *aReferrer); \ NS_IMETHOD SetReferrer(nsIURI * aReferrer); \ NS_IMETHOD GetRequestHeader(const nsACString & aHeader, nsACString & _retval); \ NS_IMETHOD SetRequestHeader(const nsACString & aHeader, const nsACString & aValue, PRBool aMerge); \ NS_IMETHOD VisitRequestHeaders(nsIHttpHeaderVisitor *aVisitor); \ NS_IMETHOD GetAllowPipelining(PRBool *aAllowPipelining); \ NS_IMETHOD SetAllowPipelining(PRBool aAllowPipelining); \ NS_IMETHOD GetRedirectionLimit(PRUint32 *aRedirectionLimit); \ NS_IMETHOD SetRedirectionLimit(PRUint32 aRedirectionLimit); \ NS_IMETHOD GetResponseStatus(PRUint32 *aResponseStatus); \ NS_IMETHOD GetResponseStatusText(nsACString & aResponseStatusText); \ NS_IMETHOD GetRequestSucceeded(PRBool *aRequestSucceeded); \ NS_IMETHOD GetResponseHeader(const nsACString & header, nsACString & _retval); \ NS_IMETHOD SetResponseHeader(const nsACString & header, const nsACString & value, PRBool merge); \ NS_IMETHOD VisitResponseHeaders(nsIHttpHeaderVisitor *aVisitor); \ NS_IMETHOD IsNoStoreResponse(PRBool *_retval); \ NS_IMETHOD IsNoCacheResponse(PRBool *_retval); /* Use this macro to declare functions that forward the behavior of this interface to another object. */#define NS_FORWARD_NSIHTTPCHANNEL(_to) \ NS_IMETHOD GetRequestMethod(nsACString & aRequestMethod) { return _to GetRequestMethod(aRequestMethod); } \ NS_IMETHOD SetRequestMethod(const nsACString & aRequestMethod) { return _to SetRequestMethod(aRequestMethod); } \ NS_IMETHOD GetReferrer(nsIURI * *aReferrer) { return _to GetReferrer(aReferrer); } \ NS_IMETHOD SetReferrer(nsIURI * aReferrer) { return _to SetReferrer(aReferrer); } \ NS_IMETHOD GetRequestHeader(const nsACString & aHeader, nsACString & _retval) { return _to GetRequestHeader(aHeader, _retval); } \ NS_IMETHOD SetRequestHeader(const nsACString & aHeader, const nsACString & aValue, PRBool aMerge) { return _to SetRequestHeader(aHeader, aValue, aMerge); } \ NS_IMETHOD VisitRequestHeaders(nsIHttpHeaderVisitor *aVisitor) { return _to VisitRequestHeaders(aVisitor); } \ NS_IMETHOD GetAllowPipelining(PRBool *aAllowPipelining) { return _to GetAllowPipelining(aAllowPipelining); } \ NS_IMETHOD SetAllowPipelining(PRBool aAllowPipelining) { return _to SetAllowPipelining(aAllowPipelining); } \ NS_IMETHOD GetRedirectionLimit(PRUint32 *aRedirectionLimit) { return _to GetRedirectionLimit(aRedirectionLimit); } \ NS_IMETHOD SetRedirectionLimit(PRUint32 aRedirectionLimit) { return _to SetRedirectionLimit(aRedirectionLimit); } \ NS_IMETHOD GetResponseStatus(PRUint32 *aResponseStatus) { return _to GetResponseStatus(aResponseStatus); } \ NS_IMETHOD GetResponseStatusText(nsACString & aResponseStatusText) { return _to GetResponseStatusText(aResponseStatusText); } \ NS_IMETHOD GetRequestSucceeded(PRBool *aRequestSucceeded) { return _to GetRequestSucceeded(aRequestSucceeded); } \ NS_IMETHOD GetResponseHeader(const nsACString & header, nsACString & _retval) { return _to GetResponseHeader(header, _retval); } \ NS_IMETHOD SetResponseHeader(const nsACString & header, const nsACString & value, PRBool merge) { return _to SetResponseHeader(header, value, merge); } \ NS_IMETHOD VisitResponseHeaders(nsIHttpHeaderVisitor *aVisitor) { return _to VisitResponseHeaders(aVisitor); } \ NS_IMETHOD IsNoStoreResponse(PRBool *_retval) { return _to IsNoStoreResponse(_retval); } \ NS_IMETHOD IsNoCacheResponse(PRBool *_retval) { return _to IsNoCacheResponse(_retval); } /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */#define NS_FORWARD_SAFE_NSIHTTPCHANNEL(_to) \ NS_IMETHOD GetRequestMethod(nsACString & aRequestMethod) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRequestMethod(aRequestMethod); } \ NS_IMETHOD SetRequestMethod(const nsACString & aRequestMethod) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetRequestMethod(aRequestMethod); } \ NS_IMETHOD GetReferrer(nsIURI * *aReferrer) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetReferrer(aReferrer); } \ NS_IMETHOD SetReferrer(nsIURI * aReferrer) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetReferrer(aReferrer); } \ NS_IMETHOD GetRequestHeader(const nsACString & aHeader, nsACString & _retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRequestHeader(aHeader, _retval); } \ NS_IMETHOD SetRequestHeader(const nsACString & aHeader, const nsACString & aValue, PRBool aMerge) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetRequestHeader(aHeader, aValue, aMerge); } \ NS_IMETHOD VisitRequestHeaders(nsIHttpHeaderVisitor *aVisitor) { return !_to ? NS_ERROR_NULL_POINTER : _to->VisitRequestHeaders(aVisitor); } \ NS_IMETHOD GetAllowPipelining(PRBool *aAllowPipelining) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAllowPipelining(aAllowPipelining); } \ NS_IMETHOD SetAllowPipelining(PRBool aAllowPipelining) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAllowPipelining(aAllowPipelining); } \ NS_IMETHOD GetRedirectionLimit(PRUint32 *aRedirectionLimit) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRedirectionLimit(aRedirectionLimit); } \ NS_IMETHOD SetRedirectionLimit(PRUint32 aRedirectionLimit) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetRedirectionLimit(aRedirectionLimit); } \ NS_IMETHOD GetResponseStatus(PRUint32 *aResponseStatus) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetResponseStatus(aResponseStatus); } \ NS_IMETHOD GetResponseStatusText(nsACString & aResponseStatusText) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetResponseStatusText(aResponseStatusText); } \ NS_IMETHOD GetRequestSucceeded(PRBool *aRequestSucceeded) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRequestSucceeded(aRequestSucceeded); } \ NS_IMETHOD GetResponseHeader(const nsACString & header, nsACString & _retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetResponseHeader(header, _retval); } \ NS_IMETHOD SetResponseHeader(const nsACString & header, const nsACString & value, PRBool merge) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetResponseHeader(header, value, merge); } \ NS_IMETHOD VisitResponseHeaders(nsIHttpHeaderVisitor *aVisitor) { return !_to ? NS_ERROR_NULL_POINTER : _to->VisitResponseHeaders(aVisitor); } \ NS_IMETHOD IsNoStoreResponse(PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->IsNoStoreResponse(_retval); } \ NS_IMETHOD IsNoCacheResponse(PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->IsNoCacheResponse(_retval); } #if 0/* Use the code below as a template for the implementation class for this interface. *//* Header file */class nsHttpChannel : public nsIHttpChannel{public: NS_DECL_ISUPPORTS NS_DECL_NSIHTTPCHANNEL nsHttpChannel(); virtual ~nsHttpChannel(); /* additional members */};/* Implementation file */NS_IMPL_ISUPPORTS1(nsHttpChannel, nsIHttpChannel)nsHttpChannel::nsHttpChannel(){ /* member initializers and constructor code */}nsHttpChannel::~nsHttpChannel(){ /* destructor code */}/* attribute ACString requestMethod; */NS_IMETHODIMP nsHttpChannel::GetRequestMethod(nsACString & aRequestMethod){ return NS_ERROR_NOT_IMPLEMENTED;}NS_IMETHODIMP nsHttpChannel::SetRequestMethod(const nsACString & aRequestMethod){ return NS_ERROR_NOT_IMPLEMENTED;}/* attribute nsIURI referrer; */NS_IMETHODIMP nsHttpChannel::GetReferrer(nsIURI * *aReferrer){ return NS_ERROR_NOT_IMPLEMENTED;}NS_IMETHODIMP nsHttpChannel::SetReferrer(nsIURI * aReferrer){ return NS_ERROR_NOT_IMPLEMENTED;}/* ACString getRequestHeader (in ACString aHeader); */NS_IMETHODIMP nsHttpChannel::GetRequestHeader(const nsACString & aHeader, nsACString & _retval){ return NS_ERROR_NOT_IMPLEMENTED;}/* void setRequestHeader (in ACString aHeader, in ACString aValue, in boolean aMerge); */NS_IMETHODIMP nsHttpChannel::SetRequestHeader(const nsACString & aHeader, const nsACString & aValue, PRBool aMerge){ return NS_ERROR_NOT_IMPLEMENTED;}/* void visitRequestHeaders (in nsIHttpHeaderVisitor aVisitor); */NS_IMETHODIMP nsHttpChannel::VisitRequestHeaders(nsIHttpHeaderVisitor *aVisitor){ return NS_ERROR_NOT_IMPLEMENTED;}/* attribute boolean allowPipelining; */NS_IMETHODIMP nsHttpChannel::GetAllowPipelining(PRBool *aAllowPipelining){ return NS_ERROR_NOT_IMPLEMENTED;}NS_IMETHODIMP nsHttpChannel::SetAllowPipelining(PRBool aAllowPipelining){ return NS_ERROR_NOT_IMPLEMENTED;}/* attribute unsigned long redirectionLimit; */NS_IMETHODIMP nsHttpChannel::GetRedirectionLimit(PRUint32 *aRedirectionLimit){ return NS_ERROR_NOT_IMPLEMENTED;}NS_IMETHODIMP nsHttpChannel::SetRedirectionLimit(PRUint32 aRedirectionLimit){ return NS_ERROR_NOT_IMPLEMENTED;}/* readonly attribute unsigned long responseStatus; */NS_IMETHODIMP nsHttpChannel::GetResponseStatus(PRUint32 *aResponseStatus){ return NS_ERROR_NOT_IMPLEMENTED;}/* readonly attribute ACString responseStatusText; */NS_IMETHODIMP nsHttpChannel::GetResponseStatusText(nsACString & aResponseStatusText){ return NS_ERROR_NOT_IMPLEMENTED;}/* readonly attribute boolean requestSucceeded; */NS_IMETHODIMP nsHttpChannel::GetRequestSucceeded(PRBool *aRequestSucceeded){ return NS_ERROR_NOT_IMPLEMENTED;}/* ACString getResponseHeader (in ACString header); */NS_IMETHODIMP nsHttpChannel::GetResponseHeader(const nsACString & header, nsACString & _retval){ return NS_ERROR_NOT_IMPLEMENTED;}/* void setResponseHeader (in ACString header, in ACString value, in boolean merge); */NS_IMETHODIMP nsHttpChannel::SetResponseHeader(const nsACString & header, const nsACString & value, PRBool merge){ return NS_ERROR_NOT_IMPLEMENTED;}/* void visitResponseHeaders (in nsIHttpHeaderVisitor aVisitor); */NS_IMETHODIMP nsHttpChannel::VisitResponseHeaders(nsIHttpHeaderVisitor *aVisitor){ return NS_ERROR_NOT_IMPLEMENTED;}/* boolean isNoStoreResponse (); */NS_IMETHODIMP nsHttpChannel::IsNoStoreResponse(PRBool *_retval){ return NS_ERROR_NOT_IMPLEMENTED;}/* boolean isNoCacheResponse (); */NS_IMETHODIMP nsHttpChannel::IsNoCacheResponse(PRBool *_retval){ return NS_ERROR_NOT_IMPLEMENTED;}/* End of implementation class template. */#endif#endif /* __gen_nsIHttpChannel_h__ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -