Files
  • nsIChannelClassifier.idl
  • nsichanneltests.h
  • nsichanneltests.cpp
  • nsihttpchanneltests.h
  • nsihttpchanneltests.cpp
  • TestStreamChannel.cpp
  • nsFileChannel.h
  • nsFileChannel.cpp
  • nsIFileChannel.idl
  • nsHttpChannel.h
  • nsHttpChannel.cpp
  • nsIHttpChannel.idl
  • nsIHttpChannelInternal.idl
  • nsViewSourceChannel.cpp
  • nsViewSourceChannel.h
  • nsIViewSourceChannel.idl
  • nsDataChannel.cpp
  • nsDataChannel.h
  • nsGopherChannel.cpp
  • nsGopherChannel.h
  • nsFTPChannel.h
  • nsFTPChannel.cpp
  • nsIFTPChannel.idl
  • nsInputStreamChannel.cpp
  • nsBaseChannel.cpp
  • nsInputStreamChannel.h
  • nsBaseChannel.h
  • nsITraceableChannel.idl
  • nsIChannel.idl
  • nsIChannelEventSink.idl
  • nsIMultiPartChannel.idl
  • nsIUploadChannel.idl
  • nsChannelProperties.h
  • nsIApplicationCacheChannel.idl
  • nsIResumableChannel.idl
  • nsIProxiedChannel.idl
  • nsIInputStreamChannel.idl
  • nsIEncodedChannel.idl
  • nsICachingChannel.idl
  • nsJARChannel.cpp
  • nsJARChannel.h
  • nsIJARChannel.idl
  • nsIconChannel.h
  • nsIconChannel.cpp
  • nsIconChannel.h
  • nsIconChannel.cpp
  • nsIconChannel.h
  • nsIconChannel.cpp
  • nsIconChannel.h
  • nsIconChannel.cpp
  • nsIconChannel.h
  • nsIconChannel.cpp
  • nsIconChannel.h
  • nsIScriptChannel.idl
  • nsWyciwygChannel.cpp
  • nsWyciwygChannel.h
  • nsIWyciwygChannel.idl
  • nsChannelReader.cpp
  • nsChannelReader.h
netwerk/cookie/src/nsCookieService.cpp
  • 52:  #include "nsIChannel.h"
  • 683:   nsIChannel *aChannel,
  • 686:   GetCookieInternal(aHostURI, aChannel, PR_FALSE, aCookie);
  • 694:   nsIChannel *aChannel,
  • 697:   GetCookieInternal(aHostURI, aChannel, PR_TRUE, aCookie);
  • 706:   nsIChannel *aChannel)
  • 708:   return SetCookieStringInternal(aHostURI, aPrompt, aCookieHeader, nsnull, aChannel, PR_FALSE);
  • 717:   nsIChannel *aChannel)
  • 719:   return SetCookieStringInternal(aHostURI, aPrompt, aCookieHeader, aServerTime, aChannel, PR_TRUE);
  • 727:   nsIChannel *aChannel,
  • 736:   PRUint32 cookieStatus = CheckPrefs(aHostURI, aChannel, aCookieHeader);
  • 764:   while (SetCookieInternal(aHostURI, aChannel, cookieHeader, serverTime, aFromHttp));
  • 1179:   nsIChannel *aChannel,
  • 1191:   PRUint32 cookieStatus = CheckPrefs(aHostURI, aChannel, nsnull);
  • 1346:   nsIChannel *aChannel,
  • 1415:   aChannel,
  • 1833:   nsIChannel *aChannel,
  • 1849:   rv = mPermissionService->CanAccess(aHostURI, aChannel, &access);
  • 1878:   rv = mPermissionService->GetOriginatingURI(aChannel, getter_AddRefs(firstURI));
netwerk/cookie/src/nsCookieService.h
  • 64:  class nsIChannel;
  • 171:   void GetCookieInternal(nsIURI *aHostURI, nsIChannel *aChannel, PRBool aHttpBound, char **aCookie);
  • 172:   nsresult SetCookieStringInternal(nsIURI *aHostURI, nsIPrompt *aPrompt, const char *aCookieHeader, const char *aServerTime, nsIChannel *aChannel, PRBool aFromHttp);
  • 173:   PRBool SetCookieInternal(nsIURI *aHostURI, nsIChannel *aChannel, nsDependentCString &aCookieHeader, PRInt64 aServerTime, PRBool aFromHttp);
  • 181:   PRUint32 CheckPrefs(nsIURI *aHostURI, nsIChannel *aChannel, const char *aCookieHeader);
netwerk/cookie/public/nsICookieService.idl
  • 42:  interface nsIChannel;
  • 87:   * @param aChannel
  • 88:   * the channel used to load the document. this parameter may be null,
  • 94:   string getCookieString(in nsIURI aURI, in nsIChannel aChannel);
  • 107:   * @param aChannel
  • 108:   * the channel used to load the document. this parameter may be null,
  • 114:   string getCookieStringFromHttp(in nsIURI aURI, in nsIURI aFirstURI, in nsIChannel aChannel);
  • 125:   * @param aChannel
  • 126:   * the channel used to load the document. this parameter may be null,
  • 131:   * from aChannel.
  • 133:   void setCookieString(in nsIURI aURI, in nsIPrompt aPrompt, in string aCookie, in nsIChannel aChannel);
  • 153:   * @param aChannel
  • 154:   * the channel used to load the document. this parameter may be null,
  • 158:   void setCookieStringFromHttp(in nsIURI aURI, in nsIURI aFirstURI, in nsIPrompt aPrompt, in string aCookie, in string aServerTime, in nsIChannel aChannel);
netwerk/cookie/public/nsICookiePermission.idl
  • 42:  interface nsIChannel;
  • 85:   * this method is called to test whether or not the given URI/channel may
  • 90:   * @param aChannel
  • 91:   * the channel corresponding to aURI
  • 97:   in nsIChannel aChannel);
  • 102:   * this method is called to test whether or not the given URI/channel may
  • 111:   * @param aChannel
  • 112:   * the channel corresponding to aURI
  • 127:   in nsIChannel aChannel,
  • 135:   * determines the originating URI for a load given a channel, for third-party
  • 136:   * cookie blocking. this is done by leveraging the loadgroup of the channel to
  • 141:   * @param aChannel
  • 142:   * the channel for the load trying to get or set cookies
  • 146:   nsIURI getOriginatingURI(in nsIChannel aChannel);
netwerk/test/TestThreadedIO.cpp
  • 70:  // Create channel for requested URL.
  • 71:  static nsCOMPtr<nsIChannel>
  • 72:  createChannel( const char *url ) {
  • 82:   // Allocate a new input channel on this thread.
  • 131:  TestListener::OnStartRequest( nsIChannel *aChannel, nsISupports *aContext ) {
  • 146:  TestListener::OnStopRequest( nsIChannel *aChannel,
  • 161:  TestListener::OnDataAvailable( nsIChannel *aChannel,
  • 196:  // thread), opens a channel, and does AsyncRead to it.
  • 204:   // Create channel for random web page.
  • 205:   nsCOMPtr<nsIChannel> channel = createChannel( (const char*)p );
  • 207:   if ( channel ) {
  • 216:   // Read the channel.
  • 218:   nsresult rv = channel->AsyncRead( testListener, 0 );
netwerk/test/TestRes.cpp
  • 89:   nsCOMPtr<nsIChannel> channel;
  • 90:   rv = serv->NewChannel(url,
  • 92:   getter_AddRefs(channel));
  • 96:   rv = channel->Open(getter_AddRefs(in));
  • 117:   rv = channel->GetOriginalURI(getter_AddRefs(uri));
  • 124:   rv = channel->GetURI(getter_AddRefs(uri));
  • 150:   nsCOMPtr<nsIChannel> channel = do_QueryInterface(request);
  • 152:   rv = channel->GetURI(getter_AddRefs(uri));
  • 168:   nsCOMPtr<nsIChannel> channel = do_QueryInterface(request);
  • 170:   rv = channel->GetURI(getter_AddRefs(uri));
  • 218:   nsCOMPtr<nsIChannel> channel;
  • 219:   rv = serv->NewChannel(url,
  • 221:   getter_AddRefs(channel));
  • 227:   rv = channel->AsyncOpen(nsnull, listener);
netwerk/test/TestHttp.cpp
  • 157:   nsCOMPtr<nsIChannel> chan;
  • 164:   rv = NS_NewChannel(getter_AddRefs(chan), uri, nsnull, nsnull, callbacks);
netwerk/test/TestStreamChannel.cpp
  • 183:   nsCOMPtr<nsIChannel> chan;
  • 184:   rv = NS_NewInputStreamChannel(getter_AddRefs(chan), uri, stream);
netwerk/test/TestOpen.cpp
  • 43:  #include "nsIChannel.h"
  • 44:  #include "nsIHttpChannel.h"
netwerk/test/TestProtocols.cpp
  • 66:  #include "nsIChannel.h"
  • 67:  #include "nsIResumableChannel.h"
  • 69:  #include "nsIHttpChannel.h"
  • 70:  #include "nsIHttpChannelInternal.h"
  • 72:  #include "nsIChannelEventSink.h"
  • 81:  #include "nsChannelProperties.h"
  • 217:  // TestChannelEventSink
  • 220:  class TestChannelEventSink : public nsIChannelEventSink
  • 224:   NS_DECL_NSICHANNELEVENTSINK
  • 226:   TestChannelEventSink();
  • 227:   virtual ~TestChannelEventSink();
  • 230:  TestChannelEventSink::TestChannelEventSink()
  • 234:  TestChannelEventSink::~TestChannelEventSink()
  • 239:  NS_IMPL_ISUPPORTS1(TestChannelEventSink, nsIChannelEventSink)
  • 242:  TestChannelEventSink::OnChannelRedirect(nsIChannel *channel,
  • 243:   nsIChannel *newChannel,
  • 246:   LOG(("\n+++ TestChannelEventSink::OnChannelRedirect (with flags %x) +++\n",
  • 382:   nsCOMPtr<nsIChannel> channel = do_QueryInterface(request);
  • 383:   if (channel) {
  • 385:   channel->GetStatus(&status);
  • 386:   LOG(("Channel Status: %08x\n", status));
  • 388:   LOG(("Channel Info:\n"));
  • 390:   channel->GetName(value);
  • 393:   channel->GetContentType(value);
  • 396:   channel->GetContentCharset(value);
  • 400:   if (NS_SUCCEEDED(channel->GetContentLength(&length)))
  • 407:   channel->GetOwner(getter_AddRefs(owner));
  • 408:   LOG(("\tChannel Owner: %x\n", owner.get()));
  • 427:   nsresult rv = propbag->GetPropertyAsInt64(NS_CHANNEL_PROP_CONTENT_LENGTH,
  • 433:   nsCOMPtr<nsIHttpChannelInternal> httpChannelInt(do_QueryInterface(request));
  • 434:   if (httpChannelInt) {
  • 436:   nsresult rv = httpChannelInt->GetResponseVersion(&majorVer, &minorVer);
  • 440:   nsCOMPtr<nsIHttpChannel> httpChannel(do_QueryInterface(request));
  • 441:   if (httpChannel) {
  • 448:   httpChannel->VisitRequestHeaders(visitor);
  • 451:   httpChannel->VisitResponseHeaders(visitor);
  • 456:   nsCOMPtr<nsIResumableChannel> resChannel = do_QueryInterface(request);
  • 457:   if (resChannel) {
  • 460:   nsresult rv = resChannel->GetEntityID(entityID);
  • 525:   nsCOMPtr<nsIHttpChannel> pHTTPCon(do_QueryInterface(request));
  • 570:   if (iid.Equals(NS_GET_IID(nsIChannelEventSink))) {
  • 571:   TestChannelEventSink *sink;
  • 573:   sink = new TestChannelEventSink();
  • 614:   nsCOMPtr<nsIChannel> pChannel;
  • 624:   rv = NS_NewChannel(getter_AddRefs(pChannel), pURL, pService,
  • 633:   nsCOMPtr<nsIWritablePropertyBag2> props = do_QueryInterface(pChannel);
  • 646:   nsCOMPtr<nsIHttpChannel> pHTTPCon(do_QueryInterface(pChannel));
  • 673:   nsCOMPtr<nsIResumableChannel> res = do_QueryInterface(pChannel);
  • 675:   NS_ERROR("Channel is not resumable!");
  • 684:   rv = pChannel->AsyncOpen(listener, // IStreamListener consumer
netwerk/test/TestPageLoad.cpp
  • 302:   nsCOMPtr<nsIChannel> chan;
  • 330:   rv = NS_NewChannel(getter_AddRefs(chan), uri, nsnull, nsnull, callbacks);
  • 331:   RETURN_IF_FAILED(rv, "NS_NewChannel");
  • 371:   nsCOMPtr<nsIChannel> chan;
  • 378:   rv = NS_NewChannel(getter_AddRefs(chan), baseURI, nsnull, nsnull, callbacks);
netwerk/test/PropertiesTest.cpp
  • 48:  #include "nsIChannel.h"
  • 81:   nsIChannel *channel = nsnull;
  • 82:   ret = service->NewChannel(NS_LITERAL_CSTRING(TEST_URL), nsnull, nsnull, &channel);
  • 85:   ret = channel->Open(&in);
netwerk/test/TestFileInput2.cpp
  • 48:  #include "nsIFileChannel.h"
  • 258:  #include "nsIChannel.h"
  • 260:  class FileChannelWorker : public nsIRunnable {
  • 269:   nsCOMPtr<nsIFileChannel> inCh;
  • 270:   nsCOMPtr<nsIFileChannel> outCh;
  • 274:   rv = NS_NewLocalFileChannel(getter_AddRefs(inCh), mInPath);
  • 280:   //rv = NS_NewLocalFileChannel(getter_AddRefs(outCh), mOutPath);
  • 298:   FileChannelWorker()
  • 320:   FileChannelWorker* worker = new FileChannelWorker();
  • 334:   virtual ~FileChannelWorker() {
  • 345:  NS_IMPL_ISUPPORTS1(FileChannelWorker, nsIRunnable)
  • 467:   CreateFun create = FileChannelWorker::Create;
  • 470:   printf("FileChannelWorker *****************************\n");
netwerk/test/TestStreamLoader.cpp
  • 65:   nsCOMPtr<nsIChannel> chan;
  • 66:   rv = NS_NewChannel(getter_AddRefs(chan), uri);
netwerk/test/TestCallbacks.cpp
  • 50:  #include "nsIChannel.h"
  • 100:   nsresult Init(nsIURI *aURI, nsIChannel *aChannel, nsISupports *aContext);
  • 108:   nsCOMPtr<nsIChannel> mChannel;
  • 206:  Consumer::Init(nsIURI *aURI, nsIChannel* aChannel, nsISupports *aContext) {
  • 208:   mChannel = aChannel;
  • 217:   nsCOMPtr<nsIChannel> aChannel = do_QueryInterface(request);
  • 219:   rv = aChannel->GetURI(getter_AddRefs(uri));
  • 291:   // create a channel
  • 292:   nsCOMPtr<nsIChannel> channel;
  • 293:   rv = serv->NewChannelFromURI(uri, getter_AddRefs(channel));
  • 297:   rv = consumer->Init(uri, channel, contextSup);
  • 302:   return channel->AsyncOpen(static_cast<nsIStreamListener*>(consumer), contextSup);
netwerk/test/TestUpload.cpp
  • 48:  #include "nsIUploadChannel.h"
  • 173:   nsCOMPtr<nsIChannel> channel;
  • 174:   rv = ioService->NewChannelFromURI(uri, getter_AddRefs(channel));
  • 178:   nsCOMPtr<nsIUploadChannel> uploadChannel(do_QueryInterface(channel));
  • 179:   uploadChannel->SetUploadStream(uploadStream, EmptyCString(), -1);
  • 191:   channel->AsyncOpen(listener, nsnull);
netwerk/test/TestSyncHTTP.cpp
  • 41:  #include <nsIChannel.h>
  • 42:  #include <nsIHTTPChannel.h>
  • 60:   nsCOMPtr<nsIChannel> channel;
  • 91:   rv = NS_OpenURI(getter_AddRefs(c[i].channel), c[i].uri, nsnull, nsnull);
  • 94:   nsCOMPtr<nsIHTTPChannel> httpChannel = do_QueryInterface(c[i].channel);
  • 95:   if (httpChannel)
  • 96:   httpChannel->SetOpenHasEventQueue(PR_FALSE);
  • 106:   rv = c[i].channel->Open(getter_AddRefs(c[i].inputStream));
  • 107:   RETURN_IF_FAILED(rv, "nsIChannel::OpenInputStream");
netwerk/protocol/file/src/nsFileChannel.h
  • 40:  #ifndef nsFileChannel_h__
  • 41:  #define nsFileChannel_h__
  • 43:  #include "nsBaseChannel.h"
  • 44:  #include "nsIFileChannel.h"
  • 45:  #include "nsIUploadChannel.h"
  • 47:  class nsFileChannel : public nsBaseChannel
  • 48:   , public nsIFileChannel
  • 49:   , public nsIUploadChannel
  • 53:   NS_DECL_NSIFILECHANNEL
  • 54:   NS_DECL_NSIUPLOADCHANNEL
  • 56:   nsFileChannel(nsIURI *uri) {
  • 63:   // NOTE: If the channel has a type hint set, contentType will be left
  • 69:   nsIChannel** channel);
  • 76:  #endif // !nsFileChannel_h__
netwerk/protocol/file/src/nsFileProtocolHandler.cpp
  • 41:  #include "nsFileChannel.h"
  • 42:  #include "nsInputStreamChannel.h"
  • 284:  nsFileProtocolHandler::NewChannel(nsIURI *uri, nsIChannel **result)
  • 286:   nsFileChannel *chan = new nsFileChannel(uri);
netwerk/protocol/file/src/nsFileChannel.cpp
  • 40:  #include "nsFileChannel.h"
  • 278:  nsFileChannel::MakeFileInputStream(nsIFile *file,
  • 310:  nsFileChannel::OpenContentStream(PRBool async, nsIInputStream **result,
  • 311:   nsIChannel** channel)
  • 328:   nsCOMPtr<nsIChannel> newChannel;
  • 329:   rv = NS_NewChannel(getter_AddRefs(newChannel), newURI);
  • 334:   newChannel.forget(channel);
  • 365:   // sniffer code in nsBaseChannel.
  • 395:  // nsFileChannel::nsISupports
  • 397:  NS_IMPL_ISUPPORTS_INHERITED2(nsFileChannel,
  • 398:   nsBaseChannel,
  • 399:   nsIUploadChannel,
  • 400:   nsIFileChannel)
  • 403:  // nsFileChannel::nsIFileChannel
  • 406:  nsFileChannel::GetFile(nsIFile **file)
  • 416:  // nsFileChannel::nsIUploadChannel
  • 419:  nsFileChannel::SetUploadStream(nsIInputStream *stream,
  • 442:  nsFileChannel::GetUploadStream(nsIInputStream **result)
netwerk/protocol/file/public/nsIFileChannel.idl
  • 39:  #include "nsIChannel.idl"
  • 44:   * nsIFileChannel
  • 47:  interface nsIFileChannel : nsISupports
netwerk/protocol/res/src/nsResProtocolHandler.cpp
  • 273:  nsResProtocolHandler::NewChannel(nsIURI* uri, nsIChannel* *result)
  • 282:   rv = mIOService->NewChannel(spec, nsnull, nsnull, result);
netwerk/protocol/res/public/nsIResProtocolHandler.idl
  • 72:   * guaranteed to reference a resource that exists (ie. opening a channel to
netwerk/protocol/http/src/nsHttpHandler.h
  • 68:  class nsIHttpChannel;
  • 177:   // Called by the channel before writing a request
  • 178:   void OnModifyRequest(nsIHttpChannel *chan)
  • 183:   // Called by the channel once headers are available
  • 184:   void OnExamineResponse(nsIHttpChannel *chan)
  • 189:   // Called by the channel once headers have been merged with cached headers
  • 190:   void OnExamineMergedResponse(nsIHttpChannel *chan)
  • 195:   // Called by channels before a redirect happens. This notifies both the
  • 196:   // channel's and the global redirect observers.
  • 197:   nsresult OnChannelRedirect(nsIChannel* oldChan, nsIChannel* newChan,
  • 200:   // Called by the channel when the response is read from the cache without
  • 202:   void OnExamineCachedResponse(nsIHttpChannel *chan)
  • 224:   void NotifyObservers(nsIHttpChannel *chan, const char *event);
netwerk/protocol/http/src/nsHttpHandler.cpp
  • 50:  #include "nsHttpChannel.h"
  • 56:  #include "nsIHttpChannel.h"
  • 491:  nsHttpHandler::NotifyObservers(nsIHttpChannel *chan, const char *event)
  • 499:  nsHttpHandler::OnChannelRedirect(nsIChannel* oldChan, nsIChannel* newChan,
  • 504:   nsresult rv = gIOService->OnChannelRedirect(oldChan, newChan, flags);
  • 508:   // Now, the per-channel observers
  • 509:   nsCOMPtr<nsIChannelEventSink> sink;
  • 512:   rv = sink->OnChannelRedirect(oldChan, newChan, flags);
  • 1153:   // UI thread, and so do all the methods in nsHttpChannel.cpp
  • 1154:   // (mIDNConverter is used by nsHttpChannel)
  • 1444:  nsHttpHandler::NewChannel(nsIURI *uri, nsIChannel **result)
  • 1446:   LOG(("nsHttpHandler::NewChannel\n"));
  • 1465:   return NewProxiedChannel(uri, nsnull, result);
  • 1481:  nsHttpHandler::NewProxiedChannel(nsIURI *uri,
  • 1483:   nsIChannel **result)
  • 1485:   nsHttpChannel *httpChannel = nsnull;
  • 1487:   LOG(("nsHttpHandler::NewProxiedChannel [proxyInfo=%p]\n",
  • 1501:   NS_NEWXPCOM(httpChannel, nsHttpChannel);
  • 1502:   if (!httpChannel)
  • 1504:   NS_ADDREF(httpChannel);
  • 1528:   rv = httpChannel->Init(uri, caps, proxyInfo);
  • 1531:   NS_RELEASE(httpChannel);
  • 1535:   *result = httpChannel;
  • 1795:  nsHttpsHandler::NewChannel(nsIURI *aURI, nsIChannel **_retval)
  • 1797:   return gHttpHandler->NewChannel(aURI, _retval);
netwerk/protocol/http/src/nsHttpTransaction.cpp
  • 198:   // for the channel that called Init()
  • 199:   mChannel = do_QueryInterface(eventsink);
  • 259:   mChannel,
  • 362:   mChannel,
  • 369:   mChannel,
  • 377:   // nsHttpChannel synthesizes progress events in OnDataAvailable
  • 565:   mChannel,
  • 574:   mChannel,
  • 607:   // which will notify the channel that the transaction failed.
  • 647:   // closing this pipe triggers the channel's OnStopRequest method.
  • 764:   mChannel,
  • 879:   // decoding is done when the channel receives the content data
  • 982:   mChannel,
  • 1021:   mChannel,
netwerk/protocol/http/src/nsHttpChannel.h
  • 41:  #ifndef nsHttpChannel_h__
  • 42:  #define nsHttpChannel_h__
  • 55:  #include "nsIHttpChannel.h"
  • 56:  #include "nsIHttpChannelInternal.h"
  • 59:  #include "nsIChannelEventSink.h"
  • 68:  #include "nsICachingChannel.h"
  • 73:  #include "nsIApplicationCacheChannel.h"
  • 74:  #include "nsIEncodedChannel.h"
  • 76:  #include "nsIUploadChannel.h"
  • 81:  #include "nsIResumableChannel.h"
  • 85:  #include "nsIProxiedChannel.h"
  • 86:  #include "nsITraceableChannel.h"
  • 94:  // nsHttpChannel
  • 97:  class nsHttpChannel : public nsHashPropertyBag
  • 98:   , public nsIHttpChannel
  • 99:   , public nsIHttpChannelInternal
  • 101:   , public nsICachingChannel
  • 102:   , public nsIUploadChannel
  • 104:   , public nsIEncodedChannel
  • 106:   , public nsIResumableChannel
  • 109:   , public nsIProxiedChannel
  • 110:   , public nsITraceableChannel
  • 111:   , public nsIApplicationCacheChannel
  • 116:   NS_DECL_NSICHANNEL
  • 117:   NS_DECL_NSIHTTPCHANNEL
  • 120:   NS_DECL_NSICACHINGCHANNEL
  • 121:   NS_DECL_NSIUPLOADCHANNEL
  • 123:   NS_DECL_NSIENCODEDCHANNEL
  • 124:   NS_DECL_NSIHTTPCHANNELINTERNAL
  • 126:   NS_DECL_NSIRESUMABLECHANNEL
  • 129:   NS_DECL_NSIPROXIEDCHANNEL
  • 130:   NS_DECL_NSITRACEABLECHANNEL
  • 132:   NS_DECL_NSIAPPLICATIONCACHECHANNEL
  • 134:   nsHttpChannel();
  • 135:   virtual ~nsHttpChannel();
  • 142:   typedef void (nsHttpChannel:: *nsAsyncCallback)(void);
  • 159:   nsRunnableMethod<nsHttpChannel> **retval = nsnull);
  • 186:   nsresult SetupReplacementChannel(nsIURI *, nsIChannel *, PRBool preserveMethod);
  • 296:   // Resumable channel specific data
  • 315:   // If the channel is associated with a cache, and the URI matched
  • 341:   PRUint32 mFallbackChannel : 1;
  • 354:   nsContentEncodings(nsIHttpChannel* aChannel, const char* aEncodingHeader);
  • 360:   // We do not own the buffer. The channel owns it.
  • 365:   // Hold a ref to our channel so that it can't go away and take the
  • 367:   nsCOMPtr<nsIHttpChannel> mChannel;
  • 373:  #endif // nsHttpChannel_h__
netwerk/protocol/http/src/nsHttpResponseHead.cpp
  • 337:   // should stay in sync with the list in nsHttpChannel::ProcessResponse
netwerk/protocol/http/src/nsHttpAuthManager.cpp
  • 39:  #include "nsHttpChannel.h"
netwerk/protocol/http/src/nsHttpPipeline.cpp
  • 270:   // the HTTP channel sooner to continue with its work.
netwerk/protocol/http/src/nsHttpBasicAuth.cpp
  • 73:  nsHttpBasicAuth::ChallengeReceived(nsIHttpChannel *httpChannel,
  • 87:  nsHttpBasicAuth::GenerateCredentials(nsIHttpChannel *httpChannel,
netwerk/protocol/http/src/nsHttpConnectionInfo.cpp
  • 54:   // anonymity of the connection is setup later from nsHttpChannel::AsyncOpen
netwerk/protocol/http/src/nsHttpHeaderArray.h
  • 43:  #include "nsIHttpChannel.h"
netwerk/protocol/http/src/nsHttpDigestAuth.cpp
  • 45:  #include "nsIHttpChannel.h"
  • 112:  nsHttpDigestAuth::GetMethodAndPath(nsIHttpChannel *httpChannel,
  • 119:   rv = httpChannel->GetURI(getter_AddRefs(uri));
  • 144:   rv = httpChannel->GetRequestMethod(httpMethod);
  • 157:   // XXX we should really ask the HTTP channel for this string
  • 174:  nsHttpDigestAuth::ChallengeReceived(nsIHttpChannel *httpChannel,
  • 200:  nsHttpDigestAuth::GenerateCredentials(nsIHttpChannel *httpChannel,
  • 222:   httpChannel->GetResponseHeader(NS_LITERAL_CSTRING("Server"), serverVal);
  • 231:   rv = GetMethodAndPath(httpChannel, isProxyAuth, httpMethod, path);
  • 259:   * TODO: disturbing the channel''s use of it. do i need to copy it
  • 263:   if (http_channel != nsnull)
  • 266:   nsCOMPtr<nsIUploadChannel> uc = do_QueryInterface(http_channel);
netwerk/protocol/http/src/nsHttpDigestAuth.h
  • 110:   nsresult GetMethodAndPath(nsIHttpChannel *, PRBool, nsCString &, nsCString &);
netwerk/protocol/http/src/nsHttpNTLMAuth.cpp
  • 52:  #include "nsIHttpChannel.h"
  • 173:  CanUseSysNTLM(nsIHttpChannel *channel, PRBool isProxyAuth)
  • 190:   channel->GetURI(getter_AddRefs(uri));
  • 214:  nsHttpNTLMAuth::ChallengeReceived(nsIHttpChannel *channel,
  • 246:   if (trySysNTLM && !*continuationState && CanUseSysNTLM(channel, isProxyAuth)) {
  • 283:  nsHttpNTLMAuth::GenerateCredentials(nsIHttpChannel *httpChannel,
netwerk/protocol/http/src/nsHttpChannel.cpp
  • 46:  #include "nsHttpChannel.h"
  • 77:  #include "nsIResumableChannel.h"
  • 80:  #include "nsChannelProperties.h"
  • 90:   nsICachingChannel::LOAD_BYPASS_LOCAL_CACHE))
  • 95:  // nsHttpChannel <public>
  • 98:  nsHttpChannel::nsHttpChannel()
  • 133:   , mFallbackChannel(PR_FALSE)
  • 140:   LOG(("Creating nsHttpChannel @%x\n", this));
  • 147:  nsHttpChannel::~nsHttpChannel()
  • 149:   LOG(("Destroying nsHttpChannel @%x\n", this));
  • 166:  nsHttpChannel::Init(nsIURI *uri,
  • 170:   LOG(("nsHttpChannel::Init [this=%x]\n", this));
  • 255:  // nsHttpChannel <private>
  • 259:  nsHttpChannel::AsyncCall(nsAsyncCallback funcPtr,
  • 260:   nsRunnableMethod<nsHttpChannel> **retval)
  • 264:   nsRefPtr<nsRunnableMethod<nsHttpChannel> > event =
  • 265:   new nsRunnableMethod<nsHttpChannel>(this, funcPtr);
  • 275:  nsHttpChannel::RequestIsConditional()
  • 286:  nsHttpChannel::Connect(PRBool firstTime)
  • 290:   LOG(("nsHttpChannel::Connect [this=%x]\n", this));
  • 313:   // open a cache entry for this channel...
  • 318:   // if this channel is only allowed to pull from the cache, then
  • 323:   if (!mFallbackChannel && !mFallbackKey.IsEmpty()) {
  • 324:   return AsyncCall(&nsHttpChannel::HandleAsyncFallback);
  • 353:   nsRunnableMethod<nsHttpChannel> *event = nsnull;
  • 355:   AsyncCall(&nsHttpChannel::AsyncOnExamineCachedResponse, &event);
  • 391:  nsHttpChannel::AsyncAbort(nsresult status)
  • 393:   LOG(("nsHttpChannel::AsyncAbort [this=%x status=%x]\n", this, status));
  • 398:   nsresult rv = AsyncCall(&nsHttpChannel::HandleAsyncNotifyListener);
  • 409:  nsHttpChannel::HandleAsyncNotifyListener()
  • 416:   mPendingAsyncCallOnResume = &nsHttpChannel::HandleAsyncNotifyListener;
  • 424:  nsHttpChannel::DoNotifyListener()
  • 438:  nsHttpChannel::HandleAsyncRedirect()
  • 444:   mPendingAsyncCallOnResume = &nsHttpChannel::HandleAsyncRedirect;
  • 450:   LOG(("nsHttpChannel::HandleAsyncRedirect [this=%p]\n", this));
  • 453:   // channel could have been canceled, in which case there would be no point
  • 481:  nsHttpChannel::HandleAsyncNotModified()
  • 488:   mPendingAsyncCallOnResume = &nsHttpChannel::HandleAsyncNotModified;
  • 492:   LOG(("nsHttpChannel::HandleAsyncNotModified [this=%p]\n", this));
  • 505:  nsHttpChannel::HandleAsyncFallback()
  • 511:   mPendingAsyncCallOnResume = &nsHttpChannel::HandleAsyncFallback;
  • 517:   LOG(("nsHttpChannel::HandleAsyncFallback [this=%p]\n", this));
  • 520:   // channel could have been canceled, in which case there would be no point
  • 541:  nsHttpChannel::SetupTransaction()
  • 543:   LOG(("nsHttpChannel::SetupTransaction [this=%x]\n", this));
  • 664:   // create wrapper for this channel's notification callbacks
  • 699:  nsHttpChannel::AddCookiesToRequest()
  • 725:  nsHttpChannel::ApplyContentConversions()
  • 730:   LOG(("nsHttpChannel::ApplyContentConversions [this=%x]\n", this));
  • 765:  // NOTE: This function duplicates code from nsBaseChannel. This will go away
  • 766:  // once HTTP uses nsBaseChannel (part of bug 312760)
  • 770:   nsIChannel *chan = static_cast<nsIChannel*>(aClosure);
  • 787:  nsHttpChannel::CallOnStartRequest()
  • 822:   SetPropertyAsInt64(NS_CHANNEL_PROP_CONTENT_LENGTH,
  • 833:   nsIChannel* thisChannel = static_cast<nsIChannel*>(this);
  • 838:   NS_SUCCEEDED(mCachePump->PeekStream(CallTypeSniffers, thisChannel));
  • 842:   mTransactionPump->PeekStream(CallTypeSniffers, thisChannel);
  • 857:  nsHttpChannel::ProcessFailedSSLConnect(PRUint32 httpStatus)
  • 929:  nsHttpChannel::ShouldSSLProxyResponseContinue(PRUint32 httpStatus)
  • 938:   return ( (mLoadFlags & nsIChannel::LOAD_DOCUMENT_URI) &&
  • 947:  nsHttpChannel::ProcessResponse()
  • 952:   LOG(("nsHttpChannel::ProcessResponse [this=%x httpStatus=%u]\n",
  • 1063:  nsHttpChannel::ProcessNormal()
  • 1067:   LOG(("nsHttpChannel::ProcessNormal [this=%x]\n", this));
  • 1162:  nsHttpChannel::PromptTempRedirect()
  • 1196:  nsHttpChannel::ProxyFailover()
  • 1198:   LOG(("nsHttpChannel::ProxyFailover [this=%x]\n", this));
  • 1219:  nsHttpChannel::HandleAsyncReplaceWithProxy()
  • 1227:   &nsHttpChannel::HandleAsyncReplaceWithProxy;
  • 1248:  nsHttpChannel::DoReplaceWithProxy(nsIProxyInfo* pi)
  • 1252:   nsCOMPtr<nsIChannel> newChannel;
  • 1253:   rv = gHttpHandler->NewProxiedChannel(mURI, pi, getter_AddRefs(newChannel));
  • 1257:   rv = SetupReplacementChannel(mURI, newChannel, PR_TRUE);
  • 1262:   PRUint32 flags = nsIChannelEventSink::REDIRECT_INTERNAL;
  • 1263:   rv = gHttpHandler->OnChannelRedirect(this, newChannel, flags);
  • 1267:   // Make sure to do this _after_ calling OnChannelRedirect
  • 1268:   newChannel->SetOriginalURI(mOriginalURI);
  • 1270:   // open new channel
  • 1271:   rv = newChannel->AsyncOpen(mListener, mListenerContext);
  • 1282:  nsHttpChannel::ResolveProxy()
  • 1284:   LOG(("nsHttpChannel::ResolveProxy [this=%x]\n", this));
  • 1297:  nsHttpChannel::ResponseWouldVary()
  • 1357:  // nsHttpChannel <byte-range>
  • 1361:  nsHttpChannel::SetupByteRangeRequest(PRUint32 partialLen)
  • 1387:  nsHttpChannel::ProcessPartialContent()
  • 1394:   LOG(("nsHttpChannel::ProcessPartialContent [this=%x]\n", this));
  • 1444:  nsHttpChannel::OnDoneRe
  • 1448:   LOG(("nsHttpChannel::OnDoneReadingPartialCacheEntry [this=%x]", this));
  • 1481:  // nsHttpChannel <cache>
  • 1485:  nsHttpChannel::ProcessNotModified()
  • 1489:   LOG(("nsHttpChannel::ProcessNotModified [this=%x]\n", this));
  • 1525:  nsHttpChannel::ProcessFallback(PRBool *fallingBack)
  • 1527:   LOG(("nsHttpChannel::ProcessFallback [this=%x]\n", this));
  • 1535:   if (!mApplicationCache || mFallbackKey.IsEmpty() || mFallbackChannel) {
  • 1537:   mApplicationCache.get(), mFallbackKey.get(), mFallbackChannel));
  • 1574:   // Create a new channel to load the fallback entry.
  • 1575:   nsRefPtr<nsIChannel> newChannel;
  • 1576:   rv = gHttpHandler->NewChannel(mURI, getter_AddRefs(newChannel));
  • 1579:   rv = SetupReplacementChannel(mURI, newChannel, PR_TRUE);
  • 1582:   // Make sure the new channel loads from the fallback key.
  • 1583:   nsCOMPtr<nsIHttpChannelInternal> httpInternal =
  • 1584:   do_QueryInterface(newChannel, &rv);
  • 1587:   rv = httpInternal->SetupFallbackChannel(mFallbackKey.get());
  • 1592:   rv = newChannel->SetLoadFlags(newLoadFlags);
  • 1595:   PRUint32 redirectFlags = nsIChannelEventSink::REDIRECT_INTERNAL;
  • 1596:   rv = gHttpHandler->OnChannelRedirect(this, newChannel, redirectFlags);
  • 1600:   // Make sure to do this _after_ calling OnChannelRedirect
  • 1601:   newChannel->SetOriginalURI(mOriginalURI);
  • 1603:   rv = newChannel->AsyncOpen(mListener, mListenerContext);
  • 1606:   // close down this channel
  • 1634:  nsHttpChannel::OpenCacheEntry(PRBool offline, PRBool *delayed)
  • 1641:   LOG(("nsHttpChannel::OpenCacheEntry [this=%x]", this));
  • 1663:   // via nsIResumableChannel.
  • 1761:   if (NS_FAILED(rv) && !mCacheForOfflineUse && !mFallbackChannel) {
  • 1828:   // cache entry is probably in use by another channel).
  • 1840:   LOG(("nsHttpChannel::OpenCacheEntry [this=%x grantedAccess=%d]", this, mCacheAccess));
  • 1847:  nsHttpChannel::OpenOfflineCacheEntryForWriting()
  • 1851:   LOG(("nsHttpChannel::OpenOfflineCacheEntryForWriting [this=%x]", this));
  • 1900:   // is probably in use by another channel). Either the cache is being
  • 1914:  nsHttpChannel::GenerateCacheKey(PRUint32 postID, nsACString &cacheKey)
  • 1933:   const char *spec = mFallbackChannel ? mFallbackKey.get() : mSpec.get();
  • 1952:  nsHttpChannel::UpdateExpirationTime()
  • 2003:  nsHttpChannel::CheckCache()
  • 2007:   LOG(("nsHTTPChannel::CheckCache enter [this=%x entry=%x access=%d]",
  • 2063:   mFallbackChannel)) {
  • 2231:   LOG(("nsHTTPChannel::CheckCache exit [this=%x doValidation=%d]\n", this, doValidation));
  • 2236:  nsHttpChannel::MustValidateBasedOnQueryUrl()
  • 2263:  nsHttpChannel::ShouldUpdateOfflineCacheEntry(PRBool *shouldCacheForOfflineUse)
  • 2306:  // channel-related events.
  • 2308:  nsHttpChannel::ReadFromCache()
  • 2315:   LOG(("nsHttpChannel::ReadFromCache [this=%x] "
  • 2343:   return AsyncCall(&nsHttpChannel::HandleAsyncRedirect);
  • 2357:   return AsyncCall(&nsHttpChannel::HandleAsyncNotModified);
  • 2396:  nsHttpChannel::CloseCacheEntry(PRBool doomOnFailure)
  • 2401:   LOG(("nsHttpChannel::CloseCacheEntry [this=%x]", this));
  • 2437:  nsHttpChannel::CloseOfflineCacheEntry()
  • 2442:   LOG(("nsHttpChannel::CloseOfflineCacheEntry [this=%x]", this));
  • 2475:  nsHttpChannel::InitCacheEntry()
  • 2488:   LOG(("nsHttpChannel::InitCacheEntry [this=%x entry=%x]\n",
  • 2520:  nsHttpChannel::InitOfflineCacheEntry()
  • 2548:  nsHttpChannel::AddCacheEntryHeaders(nsICacheEntryDescriptor *entry)
  • 2622:  nsHttpChannel::StoreAuthorizationMetaData(nsICacheEntryDescriptor *entry)
  • 2640:  nsHttpChannel::FinalizeCacheEntry()
  • 2642:   LOG(("nsHttpChannel::FinalizeCacheEntry [this=%x]\n", this));
  • 2655:  nsHttpChannel::InstallCacheListener(PRUint32 offset)
  • 2687:  nsHttpChannel::InstallOfflineCacheListener()
  • 2714:  nsHttpChannel::ClearBogusContentEncodingIfNeeded()
  • 2738:  // nsHttpChannel <redirect>
  • 2751:  nsHttpChannel::SetupReplacementChannel(nsIURI *newURI,
  • 2752:   nsIChannel *newChannel,
  • 2756:   // if the original channel was using SSL and this channel is not using
  • 2758:   // original channel was not using SSL and has INHIBIT_PERSISTENT_CACHING
  • 2759:   // set, then allow the flag to apply to the redirected channel as well.
  • 2760:   // since we force set INHIBIT_PERSISTENT_CACHING on all HTTPS channels,
  • 2761:   // we only need to check if the original channel was using SSL.
  • 2768:   newChannel->SetLoadGroup(mLoadGroup);
  • 2769:   newChannel->SetNotificationCallbacks(mCallbacks);
  • 2770:   newChannel->SetLoadFlags(newLoadFlags);
  • 2772:   nsCOMPtr<nsIHttpChannel> httpChannel = do_QueryInterface(newChannel);
  • 2773:   if (!httpChannel)
  • 2777:   nsCOMPtr<nsIUploadChannel> uploadChannel = do_QueryInterface(httpChannel);
  • 2778:   if (mUploadStream && uploadChannel) {
  • 2786:   uploadChannel->SetUploadStream(mUploadStream, EmptyCString(), -1);
  • 2791:   uploadChannel->SetUploadStream(mUploadStream,
  • 2798:   httpChannel->SetRequestMethod(nsDependentCString(mRequestHead.Method()));
  • 2800:   // convey the referrer if one was used for this channel to the next one
  • 2802:   httpChannel->SetReferrer(mReferrer);
  • 2804:   httpChannel->SetAllowPipelining(mAllowPipelining);
  • 2806:   httpChannel->SetRedirectionLimit(mRedirectionLimit - 1);
  • 2808:   nsCOMPtr<nsIHttpChannelInternal> httpInternal = do_QueryInterface(newChannel);
  • 2811:   // if this was a top-level document channel, then the new channel
  • 2813:   // just need to pass along our mDocumentURI to the new channel.
  • 2821:   nsCOMPtr<nsIEncodedChannel> encodedChannel = do_QueryInterface(httpChannel);
  • 2822:   if (encodedChannel)
  • 2827:   nsCOMPtr<nsIResumableChannel> resumableChannel(do_QueryInterface(newChannel));
  • 2828:   if (!resumableChannel) {
  • 2829:   NS_WARNING("Got asked to resume, but redirected to non-resumable channel!");
  • 2832:   resumableChannel->ResumeAt(mStartPos, mEntityID);
  • 2836:   nsCOMPtr<nsIApplicationCacheChannel> appCacheChannel =
  • 2837:   do_QueryInterface(newChannel);
  • 2838:   if (appCacheChannel) {
  • 2839:   appCacheChannel->SetApplicationCache(mApplicationCache);
  • 2840:   appCacheChannel->SetInheritApplicationCache(mInheritApplicationCache);
  • 2845:   nsCOMPtr<nsIWritablePropertyBag> bag(do_QueryInterface(newChannel));
  • 2853:  nsHttpChannel::ProcessRedirection(PRUint32 redirectType)
  • 2855:   LOG(("nsHttpChannel::ProcessRedirection [this=%x type=%u]\n",
  • 2881:   nsCOMPtr<nsIChannel> newChannel;
  • 2946:   rv = ioService->NewChannelFromURI(newURI, getter_AddRefs(newChannel));
  • 2949:   rv = SetupReplacementChannel(newURI, newChannel, preserveMethod);
  • 2954:   redirectFlags = nsIChannelEventSink::REDIRECT_PERMANENT;
  • 2956:   redirectFlags = nsIChannelEventSink::REDIRECT_TEMPORARY;
  • 2959:   rv = gHttpHandler->OnChannelRedirect(this, newChannel, redirectFlags);
  • 2963:   // Make sure to do this _after_ calling OnChannelRedirect
  • 2964:   newChannel->SetOriginalURI(mOriginalURI);
  • 2972:   rv = httpEventSink->OnRedirect(this, newChannel);
  • 2978:   // begin loading the new channel
  • 2979:   rv = newChannel->AsyncOpen(mListener, mListenerContext);
  • 2982:   // close down this channel
  • 2995:  // nsHttpChannel <auth>
  • 3054:  nsHttpChannel::GenCredsAndSetEntry(nsIHttpAuthenticator *auth,
  • 3127:  nsHttpChannel::ProcessAuthentication(PRUint32 httpStatus)
  • 3129:   LOG(("nsHttpChannel::ProcessAuthentication [this=%x code=%u]\n",
  • 3184:  nsHttpChannel::PrepareForAuthentication(PRBool proxyAuth)
  • 3186:   LOG(("nsHttpChannel::PrepareForAuthentication [this=%x]\n", this));
  • 3231:  nsHttpChannel::GetCredentials(const char *challenges,
  • 3271:   // received while processing this channel, then skip others until
  • 3320:  nsHttpChannel::GetCredentialsForChallenge(const char *challenge,
  • 3326:   LOG(("nsHttpChannel::GetCredentialsForChallenge [this=%x proxyAuth=%d challenges=%s]\n",
  • 3504:  nsHttpChannel::GetAuthenticator(const char *challenge,
  • 3508:   LOG(("nsHttpChannel::GetAuthenticator [this=%x]\n", this));
  • 3523:  nsHttpChannel::GetIdentityFromURI(PRUint32 authFlags, nsHttpAuthIdentity &ident)
  • 3525:   LOG(("nsHttpChannel::GetIdentityFromURI [this=%x]\n", this));
  • 3548:  nsHttpChannel::ParseRealm(const char *challenge, nsACString &realm)
  • 3603:  nsHttpChannel::PromptForIdentity(PRUint32 level,
  • 3610:   LOG(("nsHttpChannel::PromptForIdentity [this=%x]\n", this));
  • 3662:  nsHttpChannel::ConfirmAuth(const nsString &bundleKey, PRBool doYesNoPrompt)
  • 3666:   // 2) we're not a toplevel channel
  • 3741:  nsHttpChannel::CheckForSuperfluousAuth()
  • 3743:   // we've been called because it has been determined that this channel is
  • 3746:   // we'll give the user an opportunity to abort the channel as this might be
  • 3759:  nsHttpChannel::SetAuthorizationHeader(nsHttpAuthCache *authCache,
  • 3833:   // suppress defensive auth prompting for this channel since we know
  • 3846:  nsHttpChannel::AddAuthorizationHeaders()
  • 3848:   LOG(("nsHttpChannel::AddAuthorizationHeaders? [this=%x]\n", this));
  • 3879:  nsHttpChannel::GetCurrentPath(nsACString &path)
  • 3891:  // nsHttpChannel::nsISupports
  • 3894:  NS_IMPL_ADDREF_INHERITED(nsHttpChannel, nsHashPropertyBag)
  • 3895:  NS_IMPL_RELEASE_INHERITED(nsHttpChannel, nsHashPropertyBag)
  • 3897:  NS_INTERFACE_MAP_BEGIN(nsHttpChannel)
  • 3899:   NS_INTERFACE_MAP_ENTRY(nsIChannel)
  • 3902:   NS_INTERFACE_MAP_ENTRY(nsIHttpChannel)
  • 3903:   NS_INTERFACE_MAP_ENTRY(nsICachingChannel)
  • 3904:   NS_INTERFACE_MAP_ENTRY(nsIUploadChannel)
  • 3906:   NS_INTERFACE_MAP_ENTRY(nsIEncodedChannel)
  • 3907:   NS_INTERFACE_MAP_ENTRY(nsIHttpChannelInternal)
  • 3908:   NS_INTERFACE_MAP_ENTRY(nsIResumableChannel)
  • 3912:   NS_INTERFACE_MAP_ENTRY(nsIProxiedChannel)
  • 3913:   NS_INTERFACE_MAP_ENTRY(nsITraceableChannel)
  • 3915:   NS_INTERFACE_MAP_ENTRY(nsIApplicationCacheChannel)
  • 3919:  // nsHttpChannel::nsIRequest
  • 3923:  nsHttpChannel::GetName(nsACString &aName)
  • 3930:  nsHttpChannel::IsPending(PRBool *value)
  • 3938:  nsHttpChannel::GetStatus(nsresult *aStatus)
  • 3946:  nsHttpChannel::Cancel(nsresult status)
  • 3948:   LOG(("nsHttpChannel::Cancel [this=%x status=%x]\n", this, status));
  • 3967:  nsHttpChannel::Suspend()
  • 3971:   LOG(("nsHttpChannel::Suspend [this=%x]\n", this));
  • 3984:  nsHttpChannel::Resume()
  • 3988:   LOG(("nsHttpChannel::Resume [this=%x]\n", this));
  • 4005:  nsHttpChannel::GetLoadGroup(nsILoadGroup **aLoadGroup)
  • 4013:  nsHttpChannel::SetLoadGroup(nsILoadGroup *aLoadGroup)
  • 4021:  nsHttpChannel::GetLoadFlags(nsLoadFlags *aLoadFlags)
  • 4028:  nsHttpChannel::SetLoadFlags(nsLoadFlags aLoadFlags)
  • 4035:  // nsHttpChannel::nsIChannel
  • 4039:  nsHttpChannel::GetOriginalURI(nsIURI **originalURI)
  • 4047:  nsHttpChannel::SetOriginalURI(nsIURI *originalURI)
  • 4055:  nsHttpChannel::GetURI(nsIURI **URI)
  • 4064:  nsHttpChannel::GetOwner(nsISupports **owner)
  • 4072:  nsHttpChannel::SetOwner(nsISupports *owner)
  • 4079:  nsHttpChannel::GetNotificationCallbacks(nsIInterfaceRequestor **callbacks)
  • 4085:  nsHttpChannel::SetNotificationCallbacks(nsIInterfaceRequestor *callbacks)
  • 4093:  nsHttpChannel::GetSecurityInfo(nsISupports **securityInfo)
  • 4102:  nsHttpChannel::GetContentType(nsACString &value)
  • 4121:  nsHttpChannel::SetContentType(const nsACString &value)
  • 4147:  nsHttpChannel::GetContentCharset(nsACString &value)
  • 4157:  nsHttpChannel::SetContentCharset(const nsACString &value)
  • 4172:  nsHttpChannel::GetContentLength(PRInt32 *value)
  • 4185:  nsHttpChannel::SetContentLength(PRInt32 value)
  • 4187:   NS_NOTYETIMPLEMENTED("nsHttpChannel::SetContentLength");
  • 4192:  nsHttpChannel::Open(nsIInputStream **_retval)
  • 4195:   return NS_ImplementChannelOpen(this, _retval);
  • 4199:  nsHttpChannel::AsyncOpen(nsIStreamListener *listener, nsISupports *context)
  • 4201:   LOG(("nsHttpChannel::AsyncOpen [this=%x]\n", this));
  • 4270:  // nsHttpChannel::nsIHttpChannel
  • 4274:  nsHttpChannel::GetRequestMethod(nsACString &method)
  • 4280:  nsHttpChannel::SetRequestMethod(const nsACString &method)
  • 4299:  nsHttpChannel::GetReferrer(nsIURI **referrer)
  • 4308:  nsHttpChannel::SetReferrer(nsIURI *referrer)
  • 4446:  nsHttpChannel::GetRequestHeader(const nsACString &header, nsACString &value)
  • 4459:  nsHttpChannel::SetRequestHeader(const nsACString &header,
  • 4468:   LOG(("nsHttpChannel::SetRequestHeader [this=%x header=\"%s\" value=\"%s\" merge=%u]\n",
  • 4494:  nsHttpChannel::VisitRequestHeaders(nsIHttpHeaderVisitor *visitor)
  • 4500:  nsHttpChannel::GetUploadStream(nsIInputStream **stream)
  • 4509:  nsHttpChannel::SetUploadStream(nsIInputStream *stream, const nsACString &contentType, PRInt32 contentLength)
  • 4546:  nsHttpChannel::GetResponseStatus(PRUint32 *value)
  • 4556:  nsHttpChannel::GetResponseStatusText(nsACString &value)
  • 4565:  nsHttpChannel::GetRequestSucceeded(PRBool *value)
  • 4576:  nsHttpChannel::GetResponseHeader(const nsACString &header, nsACString &value)
  • 4587:  nsHttpChannel::SetResponseHeader(const nsACString &header,
  • 4591:   LOG(("nsHttpChannel::SetResponseHeader [this=%x header=\"%s\" value=\"%s\" merge=%u]\n",
  • 4614:  nsHttpChannel::VisitResponseHeaders(nsIHttpHeaderVisitor *visitor)
  • 4622:  nsHttpChannel::IsNoStoreResponse(PRBool *value)
  • 4631:  nsHttpChannel::IsNoCacheResponse(PRBool *value)
  • 4642:  nsHttpChannel::GetApplyConversion(PRBool *value)
  • 4650:  nsHttpChannel::SetApplyConversion(PRBool value)
  • 4652:   LOG(("nsHttpChannel::SetApplyConversion [this=%x value=%d]\n", this, value));
  • 4658:  nsHttpChannel::GetAllowPipelining(PRBool *value)
  • 4666:  nsHttpChannel::SetAllowPipelining(PRBool value)
  • 4675:  nsHttpChannel::GetRedirectionLimit(PRUint32 *value)
  • 4683:  nsHttpChannel::SetRedirectionLimit(PRUint32 value)
  • 4690:  nsHttpChannel::GetContentEncodings(nsIUTF8StringEnumerator** aEncodings)
  • 4712:  // nsHttpChannel::nsIHttpChannelInternal
  • 4716:  nsHttpChannel::GetDocumentURI(nsIURI **aDocumentURI)
  • 4725:  nsHttpChannel::SetDocumentURI(nsIURI *aDocumentURI)
  • 4732:  nsHttpChannel::GetForceAllowThirdPartyCookie(PRBool *aForceAllowThirdPartyCookie)
  • 4739:  nsHttpChannel::SetForceAllowThirdPartyCookie(PRBool aForceAllowThirdPartyCookie)
  • 4746:  nsHttpChannel::GetRequestVersion(PRUint32 *major, PRUint32 *minor)
  • 4757:  nsHttpChannel::GetResponseVersion(PRUint32 *major, PRUint32 *minor)
  • 4774:  nsHttpChannel::SetCookie(const char *aCookieHeader)
  • 4799:  nsHttpChannel::SetupFallbackChannel(const char *aFallbackKey)
  • 4801:   LOG(("nsHttpChannel::SetupFallbackChannel [this=%x, key=%s]",
  • 4803:   mFallbackChannel = PR_TRUE;
  • 4810:  // nsHttpChannel::nsISupportsPriority
  • 4814:  nsHttpChannel::GetPriority(PRInt32 *value)
  • 4821:  nsHttpChannel::SetPriority(PRInt32 value)
  • 4833:  nsHttpChannel::AdjustPriority(PRInt32 delta)
  • 4839:  // nsHttpChannel::nsIProtocolProxyCallback
  • 4843:  nsHttpChannel::OnProxyAvailable(nsICancelable *request, nsIURI *uri,
  • 4853:   // Need to replace this channel with a new one. It would be complex to try
  • 4862:  // nsHttpChannel::nsIProxiedChannel
  • 4866:  nsHttpChannel::GetProxyInfo(nsIProxyInfo **result)
  • 4878:  // nsHttpChannel::nsIRequestObserver
  • 4882:  nsHttpChannel::OnStartRequest(nsIRequest *request, nsISupports *ctxt)
  • 4890:   LOG(("nsHttpChannel::OnStartRequest [this=%x request=%x status=%x]\n",
  • 4948:  nsHttpChannel::OnStopRequest(nsIRequest *request, nsISupports *ctxt, nsresult status)
  • 4950:   LOG(("nsHttpChannel::OnStopRequest [this=%x request=%x status=%x]\n",
  • 5052:  // nsHttpChannel::nsIStreamListener
  • 5056:  nsHttpChannel::OnDataAvailable(nsIRequest *request, nsISupports *ctxt,
  • 5060:   LOG(("nsHttpChannel::OnDataAvailable [this=%x request=%x offset=%u count=%u]\n",
  • 5120:  // nsHttpChannel::nsITransportEventSink
  • 5124:  nsHttpChannel::OnTransportStatus(nsITransport *trans, nsresult status,
  • 5156:  // nsHttpChannel::nsICachingChannel
  • 5160:  nsHttpChannel::GetCacheToken(nsISupports **token)
  • 5169:  nsHttpChannel::SetCacheToken(nsISupports *token)
  • 5175:  nsHttpChannel::GetOfflineCacheToken(nsISupports **token)
  • 5184:  nsHttpChannel::SetOfflineCacheToken(nsISupports *token)
  • 5190:  nsHttpChannel::GetCacheKey(nsISupports **key)
  • 5195:   LOG(("nsHttpChannel::GetCacheKey [this=%x]\n", this));
  • 5210:  nsHttpChannel::SetCacheKey(nsISupports *key)
  • 5214:   LOG(("nsHttpChannel::SetCacheKey [this=%x key=%x]\n", this, key));
  • 5233:  nsHttpChannel::GetCacheAsFile(PRBool *value)
  • 5245:  nsHttpChannel::SetCacheAsFile(PRBool value)
  • 5259:  nsHttpChannel::GetCacheForOfflineUse(PRBool *value)
  • 5267:  nsHttpChannel::SetCacheForOfflineUse(PRBool value)
  • 5275:  nsHttpChannel::GetOfflineCacheClientID(nsACString &value)
  • 5283:  nsHttpChannel::SetOfflineCacheClientID(const nsACString &value)
  • 5291:  nsHttpChannel::GetCacheFile(nsIFile **cacheFile)
  • 5299:  nsHttpChannel::IsFromCache(PRBool *value)
  • 5314:  // nsHttpChannel::nsIResumableChannel
  • 5318:  nsHttpChannel::ResumeAt(PRUint64 aStartPos,
  • 5321:   LOG(("nsHttpChannel::ResumeAt [this=%p startPos=%llu id='%s']\n",
  • 5330:  nsHttpChannel::GetEntityID(nsACString& aEntityID)
  • 5375:  // nsHttpChannel::nsICacheListener
  • 5379:  nsHttpChannel::OnCacheEntryAvailable(nsICacheEntryDescriptor *entry,
  • 5383:   LOG(("nsHttpChannel::OnCacheEntryAvailable [this=%x entry=%x "
  • 5386:   // if the channel's already fired onStopRequest, then we should ignore
  • 5400:   LOG(("channel was canceled [this=%x status=%x]\n", this, mStatus));
  • 5404:   // if this channel is only allowed to pull from the cache, then
  • 5411:   // a failure from Connect means that we have to abort the channel.
  • 5421:  nsHttpChannel::DoAuthRetry(nsAHttpConnection *conn)
  • 5423:   LOG(("nsHttpChannel::DoAuthRetry [this=%x]\n", this));
  • 5472:  // nsHttpChannel::nsIApplicationCacheChannel
  • 5475:  nsHttpChannel::GetApplicationCache(nsIApplicationCache **out)
  • 5482:  nsHttpChannel::SetApplicationCache(nsIApplicationCache *appCache)
  • 5491:  nsHttpChannel::GetLoadedFromApplicationCache(PRBool *aLoadedFromApplicationCache)
  • 5498:  nsHttpChannel::GetInheritApplicationCache(PRBool *aInherit)
  • 5505:  nsHttpChannel::SetInheritApplicationCache(PRBool aInherit)
  • 5514:  nsHttpChannel::GetChooseApplicationCache(PRBool *aChoose)
  • 5521:  nsHttpChannel::SetChooseApplicationCache(PRBool aChoose)
  • 5530:  // nsHttpChannel::nsContentEncodings <public>
  • 5533:  nsHttpChannel::nsContentEncodings::nsContentEncodings(nsIHttpChannel* aChannel,
  • 5535:   mEncodingHeader(aEncodingHeader), mChannel(aChannel), mReady(PR_FALSE)
  • 5541:  nsHttpChannel::nsContentEncodings::~nsContentEncodings()
  • 5546:  // nsHttpChannel::nsContentEncodings::nsISimpleEnumerator
  • 5550:  nsHttpChannel::nsContentEncodings::HasMore(PRBool* aMoreEncodings)
  • 5563:  nsHttpChannel::nsContentEncodings::GetNext(nsACString& aNextEncoding)
  • 5620:  // nsHttpChannel::nsContentEncodings::nsISupports
  • 5623:  NS_IMPL_ISUPPORTS1(nsHttpChannel::nsContentEncodings, nsIUTF8StringEnumerator)
  • 5626:  // nsHttpChannel::nsContentEncodings <private>
  • 5630:  nsHttpChannel::nsContentEncodings::PrepareForNext(void)
  • 5672:  // Wrapper class to make replacement of nsHttpChannel's listener
  • 5699:  // nsHttpChannel::nsITraceableChannel
  • 5703:  nsHttpChannel::SetNewListener(nsIStreamListener *aListener, nsIStreamListener **_retval)
  • 5722:  nsHttpChannel::MaybeInvalidateCacheEntryForSubsequentGet()
  • 5770:  nsHttpChannel::DetermineStoragePolicy()
  • 5780:  nsHttpChannel::AsyncOnExamineCachedResponse()
netwerk/protocol/http/src/nsHttpTransaction.h
  • 163:   nsCOMPtr<nsISupports> mChannel;
netwerk/protocol/http/public/nsIHttpHeaderVisitor.idl
  • 50:   * Called by the nsIHttpChannel implementation when visiting request and
netwerk/protocol/http/public/nsIHttpChannel.idl
  • 40:  #include "nsIChannel.idl"
  • 45:   * nsIHttpChannel
  • 54:  interface nsIHttpChannel : nsIChannel
  • 66:   * This attribute may only be set before the channel is opened.
  • 69:   * nsIUploadChannel; however, after setting the upload data, it may be
  • 71:   * for nsIUploadChannel has further details.
  • 73:   * @throws NS_ERROR_IN_PROGRESS if set after the channel has been opened.
  • 79:   * resource from which this channel's URI was obtained (see RFC2616 section
  • 82:   * This attribute may only be set before the channel is opened.
  • 84:   * NOTE: The channel may silently refuse to set the Referer header if the
  • 90:   * @throws NS_ERROR_IN_PROGRESS if set after the channel has been opened.
  • 112:   * This method may only be called before the channel is opened.
  • 130:   * @throws NS_ERROR_IN_PROGRESS if called after the channel has been
  • 147:   * This attribute is a hint to the channel to indicate whether or not
  • 156:   * This attribute may only be set before the channel is opened.
  • 158:   * @throws NS_ERROR_FAILURE if set after the channel has been opened.
  • 163:   * This attribute specifies the number of redirects this channel is allowed
  • 164:   * to make. If zero, the channel will fail to redirect and will generate
  • 167:   * NOTE: An HTTP redirect results in a new channel being created. If the
  • 168:   * new channel supports nsIHttpChannel, then it will be assigned a value
  • 170:   * redirected channel's |redirectionLimit| attribute. The initial value
  • 237:   * channel about HTTP-EQUIV headers found in HTML <META> tags.
netwerk/protocol/http/public/nsIHttpActivityObserver.idl
  • 52:   * @param aHttpChannel
  • 53:   * nsISupports interface for the the http channel that
  • 80:   void observeActivity(in nsISupports aHttpChannel,
netwerk/protocol/http/public/nsIHttpProtocolHandler.idl
  • 143:   * The "subject" of the notification is the nsIHttpChannel instance.
  • 150:   * the notification is the nsIHttpChannel instance.
netwerk/protocol/http/public/nsIHttpEventSink.idl
  • 42:  interface nsIChannel;
  • 43:  interface nsIHttpChannel;
  • 50:   * HTTP channel will try to get this interface from its notificationCallbacks
  • 57:   * @deprecated Newly written code should use nsIChannelEventSink instead of this
  • 65:   * redirection may be to a non-http channel.
  • 69:   void onRedirect(in nsIHttpChannel httpChannel,
  • 70:   in nsIChannel newChannel);
netwerk/protocol/http/public/nsIHttpChannelInternal.idl
  • 49:  interface nsIHttpChannelInternal : nsISupports
  • 52:   * An http channel can own a reference to the document URI
  • 68:   * cookie header, _but_ using the channel's other information
  • 77:   * Setup this channel as an application cache fallback channel.
  • 79:   void setupFallbackChannel(in string aFallbackKey);
netwerk/protocol/http/public/nsIHttpAuthenticator.idl
  • 41:  interface nsIHttpChannel;
  • 60:   * then the user will be prompted by the channel to enter (or revise) their
  • 66:   * @param aChannel
  • 67:   * the http channel that received the challenge.
  • 81:   void challengeReceived(in nsIHttpChannel aChannel,
  • 96:   * @param aChannel
  • 97:   * the http channel requesting credentials
  • 117:   * state held by the channel between consecutive calls to
  • 120:   * the channel.
  • 122:   string generateCredentials(in nsIHttpChannel aChannel,
netwerk/protocol/viewsource/src/nsViewSourceChannel.cpp
  • 41:  #include "nsViewSourceChannel.h"
  • 52:  NS_IMPL_ADDREF(nsViewSourceChannel)
  • 53:  NS_IMPL_RELEASE(nsViewSourceChannel)
  • 56:   non-nullness of mHttpChannel, mCachingChannel, and mUploadChannel.
  • 58:  NS_INTERFACE_MAP_BEGIN(nsViewSourceChannel)
  • 59:   NS_INTERFACE_MAP_ENTRY(nsIViewSourceChannel)
  • 62:   NS_INTERFACE_MAP_ENTRY_CONDITIONAL(nsIHttpChannel, mHttpChannel)
  • 63:   NS_INTERFACE_MAP_ENTRY_CONDITIONAL(nsICachingChannel, mCachingChannel)
  • 64:   NS_INTERFACE_MAP_ENTRY_CONDITIONAL(nsIUploadChannel, mUploadChannel)
  • 65:   NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsIRequest, nsIViewSourceChannel)
  • 66:   NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsIChannel, nsIViewSourceChannel)
  • 67:   NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIViewSourceChannel)
  • 71:  nsViewSourceChannel::Init(nsIURI* uri)
  • 94:   rv = pService->NewChannel(path, nsnull, nsnull, getter_AddRefs(mChannel));
  • 98:   mChannel->SetOriginalURI(mOriginalURI);
  • 99:   mHttpChannel = do_QueryInterface(mChannel);
  • 100:   mCachingChannel = do_QueryInterface(mChannel);
  • 101:   mUploadChannel = do_QueryInterface(mChannel);
  • 110:  nsViewSourceChannel::GetName(nsACString &result)
  • 116:  nsViewSourceChannel::IsPending(PRBool *result)
  • 118:   NS_ENSURE_TRUE(mChannel, NS_ERROR_FAILURE);
  • 120:   return mChannel->IsPending(result);
  • 124:  nsViewSourceChannel::GetStatus(nsresult *status)
  • 126:   NS_ENSURE_TRUE(mChannel, NS_ERROR_FAILURE);
  • 128:   return mChannel->GetStatus(status);
  • 132:  nsViewSourceChannel::Cancel(nsresult status)
  • 134:   NS_ENSURE_TRUE(mChannel, NS_ERROR_FAILURE);
  • 136:   return mChannel->Cancel(status);
  • 140:  nsViewSourceChannel::Suspend(void)
  • 142:   NS_ENSURE_TRUE(mChannel, NS_ERROR_FAILURE);
  • 144:   return mChannel->Suspend();
  • 148:  nsViewSourceChannel::Resume(void)
  • 150:   NS_ENSURE_TRUE(mChannel, NS_ERROR_FAILURE);
  • 152:   return mChannel->Resume();
  • 156:  // nsIChannel methods:
  • 159:  nsViewSourceChannel::GetOriginalURI(nsIURI* *aURI)
  • 168:  nsViewSourceChannel::SetOriginalURI(nsIURI* aURI)
  • 176:  nsViewSourceChannel::GetURI(nsIURI* *aURI)
  • 178:   NS_ENSURE_TRUE(mChannel, NS_ERROR_FAILURE);
  • 181:   nsresult rv = mChannel->GetURI(getter_AddRefs(uri));
  • 185:   // protect ourselves against broken channel implementations
  • 187:   NS_ERROR("inner channel returned NS_OK and a null URI");
  • 200:  nsViewSourceChannel::Open(nsIInputStream **_retval)
  • 202:   NS_ENSURE_TRUE(mChannel, NS_ERROR_FAILURE);
  • 204:   nsresult rv = mChannel->Open(_retval);
  • 213:  nsViewSourceChannel::AsyncOpen(nsIStreamListener *aListener, nsISupports *ctxt)
  • 215:   NS_ENSURE_TRUE(mChannel, NS_ERROR_FAILURE);
  • 221:   * mChannel, since we want to make sure we're in the loadgroup
  • 222:   * when mChannel finishes and fires OnStopRequest()
  • 226:   mChannel->GetLoadGroup(getter_AddRefs(loadGroup));
  • 228:   loadGroup->AddRequest(static_cast<nsIViewSourceChannel*>
  • 231:   nsresult rv = mChannel->AsyncOpen(this, ctxt);
  • 234:   loadGroup->RemoveRequest(static_cast<nsIViewSourceChannel*>
  • 246:   * Both the view source channel and mChannel are added to the
  • 250:   * so it better be the viewsource channel.
  • 253:   * 1) The load flags on mChannel _never_ include LOAD_DOCUMENT_URI
  • 259:  nsViewSourceChannel::GetLoadFlags(PRUint32 *aLoadFlags)
  • 261:   NS_ENSURE_TRUE(mChannel, NS_ERROR_FAILURE);
  • 263:   nsresult rv = mChannel->GetLoadFlags(aLoadFlags);
  • 268:   // fails to deal due to amiguous inheritance. nsIChannel::LOAD_DOCUMENT_URI
  • 271:   *aLoadFlags |= ::nsIChannel::LOAD_DOCUMENT_URI;
  • 277:  nsViewSourceChannel::SetLoadFlags(PRUint32 aLoadFlags)
  • 279:   NS_ENSURE_TRUE(mChannel, NS_ERROR_FAILURE);
  • 282:   // We also want to have _this_ channel, not mChannel to be the
  • 283:   // 'document' channel in the loadgroup.
  • 287:   // nsIChannel::LOAD_DOCUMENT_URI/nsIRequest::LOAD_FROM_CACHE also fails; the
  • 289:   mIsDocument = (aLoadFlags & ::nsIChannel::LOAD_DOCUMENT_URI) ? PR_TRUE : PR_FALSE;
  • 291:   return mChannel->SetLoadFlags((aLoadFlags |
  • 293:   ~::nsIChannel::LOAD_DOCUMENT_URI);
  • 297:  nsViewSourceChannel::GetContentType(nsACString &aContentType)
  • 299:   NS_ENSURE_TRUE(mChannel, NS_ERROR_FAILURE);
  • 308:   rv = mChannel->GetContentType(contentType);
  • 327:  nsViewSourceChannel::SetContentType(const nsACString &aContentType)
  • 332:   // channel's GetContentType(). Returning the string above trips up
  • 334:   // parser depend on nsIViewSourceChannel Vidur proposed the
  • 337:   // The ViewSourceChannel initially returns a content type of
  • 343:   // our channel's GetContentType() and it will get the original
  • 357:  nsViewSourceChannel::GetContentCharset(nsACString &aContentCharset)
  • 359:   NS_ENSURE_TRUE(mChannel, NS_ERROR_FAILURE);
  • 361:   return mChannel->GetContentCharset(aContentCharset);
  • 365:  nsViewSourceChannel::SetContentCharset(const nsACString &aContentCharset)
  • 367:   NS_ENSURE_TRUE(mChannel, NS_ERROR_FAILURE);
  • 369:   return mChannel->SetContentCharset(aContentCharset);
  • 373:  nsViewSourceChannel::GetContentLength(PRInt32 *aContentLength)
  • 375:   NS_ENSURE_TRUE(mChannel, NS_ERROR_FAILURE);
  • 377:   return mChannel->GetContentLength(aContentLength);
  • 381:  nsViewSourceChannel::SetContentLength(PRInt32 aContentLength)
  • 383:   NS_ENSURE_TRUE(mChannel, NS_ERROR_FAILURE);
  • 385:   return mChannel->SetContentLength(aContentLength);
  • 389:  nsViewSourceChannel::GetLoadGroup(nsILoadGroup* *aLoadGroup)
  • 391:   NS_ENSURE_TRUE(mChannel, NS_ERROR_FAILURE);
  • 393:   return mChannel->GetLoadGroup(aLoadGroup);
  • 397:  nsViewSourceChannel::SetLoadGroup(nsILoadGroup* aLoadGroup)
  • 399:   NS_ENSURE_TRUE(mChannel, NS_ERROR_FAILURE);
  • 401:   return mChannel->SetLoadGroup(aLoadGroup);
  • 405:  nsViewSourceChannel::GetOwner(nsISupports* *aOwner)
  • 407:   NS_ENSURE_TRUE(mChannel, NS_ERROR_FAILURE);
  • 409:   return mChannel->GetOwner(aOwner);
  • 413:  nsViewSourceChannel::SetOwner(nsISupports* aOwner)
  • 415:   NS_ENSURE_TRUE(mChannel, NS_ERROR_FAILURE);
  • 417:   return mChannel->SetOwner(aOwner);
  • 421:  nsViewSourceChannel::GetNotificationCallbacks(nsIInterfaceRequestor* *aNotificationCallbacks)
  • 423:   NS_ENSURE_TRUE(mChannel, NS_ERROR_FAILURE);
  • 425:   return mChannel->GetNotificationCallbacks(aNotificationCallbacks);
  • 429:  nsViewSourceChannel::SetNotificationCallbacks(nsIInterfaceRequestor* aNotificationCallbacks)
  • 431:   NS_ENSURE_TRUE(mChannel, NS_ERROR_FAILURE);
  • 433:   return mChannel->SetNotificationCallbacks(aNotificationCallbacks);
  • 437:  nsViewSourceChannel::GetSecurityInfo(nsISupports * *aSecurityInfo)
  • 439:   NS_ENSURE_TRUE(mChannel, NS_ERROR_FAILURE);
  • 441:   return mChannel->GetSecurityInfo(aSecurityInfo);
  • 444:  // nsIViewSourceChannel methods
  • 446:  nsViewSourceChannel::GetOriginalContentType(nsACString &aContentType)
  • 448:   NS_ENSURE_TRUE(mChannel, NS_ERROR_FAILURE);
  • 450:   return mChannel->GetContentType(aContentType);
  • 454:  nsViewSourceChannel::SetOriginalContentType(const nsACString &aContentType)
  • 456:   NS_ENSURE_TRUE(mChannel, NS_ERROR_FAILURE);
  • 461:   return mChannel->SetContentType(aContentType);
  • 466:  nsViewSourceChannel::OnStartRequest(nsIRequest *aRequest, nsISupports *aContext)
  • 469:   // The channel may have gotten redirected... Time to update our info
  • 470:   mChannel = do_QueryInterface(aRequest);
  • 471:   mHttpChannel = do_QueryInterface(aRequest);
  • 472:   mCachingChannel = do_QueryInterface(aRequest);
  • 473:   mUploadChannel = do_QueryInterface(aRequest);
  • 475:   return mListener->OnStartRequest(static_cast<nsIViewSourceChannel*>
  • 482:  nsViewSourceChannel::OnStopRequest(nsIRequest *aRequest, nsISupports* aContext,
  • 486:   if (mChannel)
  • 489:   mChannel->GetLoadGroup(getter_AddRefs(loadGroup));
  • 492:   loadGroup->RemoveRequest(static_cast<nsIViewSourceChannel*>
  • 497:   return mListener->OnStopRequest(static_cast<nsIViewSourceChannel*>
  • 505:  nsViewSourceChannel::OnDataAvailable(nsIRequest *aRequest, nsISupports* aContext,
  • 510:   return mListener->OnDataAvailable(static_cast<nsIViewSourceChannel*>
  • 517:  // nsIHttpChannel methods
  • 519:  // We want to forward most of nsIHttpChannel over to mHttpChannel, but we want
  • 523:  nsViewSourceChannel::GetRequestMethod(nsACString & aRequestMethod)
  • 525:   return !mHttpChannel ? NS_ERROR_NULL_POINTER :
  • 526:   mHttpChannel->GetRequestMethod(aRequestMethod);
  • 530:  nsViewSourceChannel::SetRequestMethod(const nsACString & aRequestMethod)
  • 532:   return !mHttpChannel ? NS_ERROR_NULL_POINTER :
  • 533:   mHttpChannel->SetRequestMethod(aRequestMethod);
  • 537:  nsViewSourceChannel::GetReferrer(nsIURI * *aReferrer)
  • 539:   return !mHttpChannel ? NS_ERROR_NULL_POINTER :
  • 540:   mHttpChannel->GetReferrer(aReferrer);
  • 544:  nsViewSourceChannel::SetReferrer(nsIURI * aReferrer)
  • 546:   return !mHttpChannel ? NS_ERROR_NULL_POINTER :
  • 547:   mHttpChannel->SetReferrer(aReferrer);
  • 551:  nsViewSourceChannel::GetRequestHeader(const nsACString & aHeader,
  • 554:   return !mHttpChannel ? NS_ERROR_NULL_POINTER :
  • 555:   mHttpChannel->GetRequestHeader(aHeader, aValue);
  • 559:  nsViewSourceChannel::SetRequestHeader(const nsACString & aHeader,
  • 563:   return !mHttpChannel ? NS_ERROR_NULL_POINTER :
  • 564:   mHttpChannel->SetRequestHeader(aHeader, aValue, aMerge);
  • 568:  nsViewSourceChannel::VisitRequestHeaders(nsIHttpHeaderVisitor *aVisitor)
  • 570:   return !mHttpChannel ? NS_ERROR_NULL_POINTER :
  • 571:   mHttpChannel->VisitRequestHeaders(aVisitor);
  • 575:  nsViewSourceChannel::GetAllowPipelining(PRBool *aAllowPipelining)
  • 577:   return !mHttpChannel ? NS_ERROR_NULL_POINTER :
  • 578:   mHttpChannel->GetAllowPipelining(aAllowPipelining);
  • 582:  nsViewSourceChannel::SetAllowPipelining(PRBool aAllowPipelining)
  • 584:   return !mHttpChannel ? NS_ERROR_NULL_POINTER :
  • 585:   mHttpChannel->SetAllowPipelining(aAllowPipelining);
  • 589:  nsViewSourceChannel::GetRedirectionLimit(PRUint32 *aRedirectionLimit)
  • 591:   return !mHttpChannel ? NS_ERROR_NULL_POINTER :
  • 592:   mHttpChannel->GetRedirectionLimit(aRedirectionLimit);
  • 596:  nsViewSourceChannel::SetRedirectionLimit(PRUint32 aRedirectionLimit)
  • 598:   return !mHttpChannel ? NS_ERROR_NULL_POINTER :
  • 599:   mHttpChannel->SetRedirectionLimit(aRedirectionLimit);
  • 603:  nsViewSourceChannel::GetResponseStatus(PRUint32 *aResponseStatus)
  • 605:   return !mHttpChannel ? NS_ERROR_NULL_POINTER :
  • 606:   mHttpChannel->GetResponseStatus(aResponseStatus);
  • 610:  nsViewSourceChannel::GetResponseStatusText(nsACString & aResponseStatusText)
  • 612:   return !mHttpChannel ? NS_ERROR_NULL_POINTER :
  • 613:   mHttpChannel->GetResponseStatusText(aResponseStatusText);
  • 617:  nsViewSourceChannel::GetRequestSucceeded(PRBool *aRequestSucceeded)
  • 619:   return !mHttpChannel ? NS_ERROR_NULL_POINTER :
  • 620:   mHttpChannel->GetRequestSucceeded(aRequestSucceeded);
  • 624:  nsViewSourceChannel::GetResponseHeader(const nsACString & aHeader,
  • 627:   if (!mHttpChannel)
  • 636:   return mHttpChannel->GetResponseHeader(aHeader, aValue);
  • 640:  nsViewSourceChannel::SetResponseHeader(const nsACString & header,
  • 643:   return !mHttpChannel ? NS_ERROR_NULL_POINTER :
  • 644:   mHttpChannel->SetResponseHeader(header, value, merge);
  • 648:  nsViewSourceChannel::VisitResponseHeaders(nsIHttpHeaderVisitor *aVisitor)
  • 650:   if (!mHttpChannel)
  • 656:   mHttpChannel->GetResponseHeader(contentTypeStr, contentType);
  • 663:  nsViewSourceChannel::IsNoStoreResponse(PRBool *_retval)
  • 665:   return !mHttpChannel ? NS_ERROR_NULL_POINTER :
  • 666:   mHttpChannel->IsNoStoreResponse(_retval);
  • 670:  nsViewSourceChannel::IsNoCacheResponse(PRBool *_retval)
  • 672:   return !mHttpChannel ? NS_ERROR_NULL_POINTER :
  • 673:   mHttpChannel->IsNoCacheResponse(_retval);
netwerk/protocol/viewsource/src/nsViewSourceChannel.h
  • 39:  #ifndef nsViewSourceChannel_h___
  • 40:  #define nsViewSourceChannel_h___
  • 45:  #include "nsIViewSourceChannel.h"
  • 50:  #include "nsIHttpChannel.h"
  • 51:  #include "nsICachingChannel.h"
  • 52:  #include "nsIUploadChannel.h"
  • 54:  class nsViewSourceChannel : public nsIViewSourceChannel,
  • 56:   public nsIHttpChannel,
  • 57:   public nsICachingChannel,
  • 58:   public nsIUploadChannel
  • 64:   NS_DECL_NSICHANNEL
  • 65:   NS_DECL_NSIVIEWSOURCECHANNEL
  • 68:   NS_DECL_NSIHTTPCHANNEL
  • 69:   NS_FORWARD_SAFE_NSICACHINGCHANNEL(mCachingChannel)
  • 70:   NS_FORWARD_SAFE_NSIUPLOADCHANNEL(mUploadChannel)
  • 72:   // nsViewSourceChannel methods:
  • 73:   nsViewSourceChannel()
  • 80:   nsCOMPtr<nsIChannel> mChannel;
  • 81:   nsCOMPtr<nsIHttpChannel> mHttpChannel;
  • 82:   nsCOMPtr<nsICachingChannel> mCachingChannel;
  • 83:   nsCOMPtr<nsIUploadChannel> mUploadChannel;
  • 91:  #endif /* nsViewSourceChannel_h___ */
netwerk/protocol/viewsource/src/nsViewSourceHandler.cpp
  • 42:  #include "nsViewSourceChannel.h"
  • 127:  nsViewSourceHandler::NewChannel(nsIURI* uri, nsIChannel* *result)
  • 130:   nsViewSourceChannel *channel = new nsViewSourceChannel();
  • 131:   if (!channel)
  • 133:   NS_ADDREF(channel);
  • 135:   nsresult rv = channel->Init(uri);
  • 137:   NS_RELEASE(channel);
  • 141:   *result = static_cast<nsIViewSourceChannel*>(channel);
netwerk/protocol/viewsource/public/nsIViewSourceChannel.idl
  • 39:  #include "nsIChannel.idl"
  • 42:  interface nsIViewSourceChannel : nsIChannel
  • 47:   * nsIViewSourceChannel returns a content type of
netwerk/protocol/data/src/nsDataHandler.cpp
  • 39:  #include "nsDataChannel.h"
  • 136:  nsDataHandler::NewChannel(nsIURI* uri, nsIChannel* *result) {
  • 138:   nsDataChannel* channel = new nsDataChannel(uri);
  • 139:   if (!channel)
  • 141:   NS_ADDREF(channel);
  • 143:   nsresult rv = channel->Init();
  • 145:   NS_RELEASE(channel);
  • 149:   *result = channel;
netwerk/protocol/data/src/nsDataChannel.cpp
  • 40:  #include "nsDataChannel.h"
  • 54:  nsDataChannel::OpenContentStream(PRBool async, nsIInputStream **result,
  • 55:   nsIChannel** channel)
netwerk/protocol/data/src/nsDataChannel.h
  • 41:  #ifndef nsDataChannel_h___
  • 42:  #define nsDataChannel_h___
  • 44:  #include "nsBaseChannel.h"
  • 48:  class nsDataChannel : public nsBaseChannel {
  • 50:   nsDataChannel(nsIURI *uri) {
  • 56:   nsIChannel** channel);
  • 59:  #endif /* nsDataChannel_h___ */
netwerk/protocol/about/src/nsAboutBlank.cpp
  • 50:  nsAboutBlank::NewChannel(nsIURI *aURI, nsIChannel **result)
  • 54:   nsIChannel* channel;
  • 60:   rv = NS_NewInputStreamChannel(&channel, aURI, in,
  • 65:   *result = channel;
netwerk/protocol/about/src/nsAboutCache.cpp
  • 76:  nsAboutCache::NewChannel(nsIURI *aURI, nsIChannel **result)
  • 132:   nsIChannel* channel;
  • 133:   rv = NS_NewInputStreamChannel(&channel, aURI, inStr,
  • 138:   *result = channel;
netwerk/protocol/about/src/nsAboutCacheEntry.cpp
  • 118:  nsAboutCacheEntry::NewChannel(nsIURI *uri, nsIChannel **result)
  • 127:   return NS_NewInputStreamChannel(result, uri, stream,
netwerk/protocol/about/src/nsAboutProtocolHandler.cpp
  • 107:   // about: modules... Since those URIs will never open a channel, might as
  • 156:  nsAboutProtocolHandler::NewChannel(nsIURI* uri, nsIChannel* *result)
  • 165:   rv = aboutMod->NewChannel(uri, result);
  • 254:  nsSafeAboutProtocolHandler::NewChannel(nsIURI* uri, nsIChannel* *result)
netwerk/protocol/about/src/nsAboutBloat.cpp
  • 65:  nsAboutBloat::NewChannel(nsIURI *aURI, nsIChannel **result)
  • 154:   nsIChannel* channel;
  • 155:   rv = NS_NewInputStreamChannel(&channel, aURI, inStr,
  • 160:   *result = channel;
netwerk/protocol/about/src/nsAboutCacheEntry.h
  • 43:  #include "nsIChannel.h"
  • 49:  #include "nsIInputStreamChannel.h"
netwerk/protocol/about/public/nsIAboutModule.idl
  • 41:  interface nsIChannel;
  • 47:   * Constructs a new channel for the about protocol module.
  • 49:   * @param aURI the uri of the new channel
  • 51:   nsIChannel newChannel(in nsIURI aURI);
netwerk/protocol/gopher/src/nsGopherChannel.cpp
  • 42:  #include "nsGopherChannel.h"
  • 85:   nsGopherContentStream(nsGopherChannel *channel)
  • 87:   , mChannel(channel) {
  • 101:   nsRefPtr<nsGopherChannel> mChannel;
  • 203:   nsresult rv = mChannel->URI()->GetAsciiHost(host);
  • 218:   rv = sts->CreateTransport(nsnull, 0, host, port, mChannel->ProxyInfo(),
  • 224:   rv = mSocket->SetEventSink(mChannel, target);
  • 264:   nsresult rv = mChannel->URI()->GetPath(buffer); // unescaped down below
  • 298:   mChannel->GetCallback(prompter);
  • 372:   mChannel->SetContentType(nsDependentCString(contentType));
  • 411:   // confusing consumers of the channel)
  • 413:   rv = mChannel->URI()->GetAsciiSpec(spec);
  • 419:   rv = mChannel->URI()->SetSpec(spec);
  • 435:   rv = mChannel->PushStreamConverter("text/gopher-dir",
  • 441:   rv = mChannel->PushStreamConverter(TEXT_PLAIN, TEXT_HTML, PR_TRUE,
  • 448:   mChannel->URI()->GetSpec(spec);
  • 460:  NS_IMPL_ISUPPORTS_INHERITED1(nsGopherChannel,
  • 461:   nsBaseChannel,
  • 462:   nsIProxiedChannel)
  • 465:  nsGopherChannel::GetProxyInfo(nsIProxyInfo** aProxyInfo)
  • 473:  nsGopherChannel::OpenContentStream(PRBool async, nsIInputStream **result,
  • 474:   nsIChannel** channel)
  • 476:   // Implement nsIChannel::Open in terms of nsIChannel::AsyncOpen
  • 490:  nsGopherChannel::GetStatusArg(nsresult status, nsString &statusArg)
netwerk/protocol/gopher/src/nsGopherHandler.cpp
  • 42:  #include "nsGopherChannel.h"
  • 101:  nsGopherHandler::NewProxiedChannel(nsIURI *uri, nsIProxyInfo *proxyInfo,
  • 102:   nsIChannel **result)
  • 105:   nsGopherChannel *chan = new nsGopherChannel(uri, proxyInfo);
  • 121:  nsGopherHandler::NewChannel(nsIURI *uri, nsIChannel **result)
  • 123:   return NewProxiedChannel(uri, nsnull, result);
netwerk/protocol/gopher/src/nsGopherChannel.h
  • 41:  #ifndef nsGopherChannel_h__
  • 42:  #define nsGopherChannel_h__
  • 44:  #include "nsBaseChannel.h"
  • 46:  #include "nsIProxiedChannel.h"
  • 48:  class nsGopherChannel : public nsBaseChannel, public nsIProxiedChannel {
  • 50:   nsGopherChannel(nsIURI *uri, nsIProxyInfo *pi) : mProxyInfo(pi) {
  • 55:   NS_DECL_NSIPROXIEDCHANNEL
  • 60:   virtual ~nsGopherChannel() {}
  • 63:   nsIChannel** channel);
  • 72:  #endif // !nsGopherChannel_h__
netwerk/protocol/ftp/src/nsFtpConnectionThread.cpp
  • 48:  #include "nsFTPChannel.h"
  • 140:   // parameter can be null cause the channel fills them in.
  • 218:   mChannel->GetFTPEventSink(ftpSink);
  • 268:   if (!mChannel->HasLoadFlag(nsIRequest::LOAD_ANONYMOUS))
  • 269:   gFtpHandler->RemoveConnection(mChannel->URI(), &connection);
  • 291:   rv = mControlConnection->Connect(mChannel->ProxyInfo(), this);
  • 308:   rv = mChannel->URI()->GetAsciiHost(host);
  • 316:   rv = mControlConnection->Connect(mChannel->ProxyInfo(), this);
  • 372:   // channel.
  • 376:   // The command channel dropped for some reason.
  • 684:   if (mChannel->HasLoadFlag(nsIRequest::LOAD_ANONYMOUS))
  • 688:   NS_QueryAuthPrompt2(static_cast<nsIChannel*>(mChannel),
  • 699:   rv = prompter->PromptAuth(mChannel, nsIAuthPrompt2::LEVEL_NONE,
  • 773:   if (mChannel->HasLoadFlag(nsIRequest::LOAD_ANONYMOUS))
  • 777:   NS_QueryAuthPrompt2(static_cast<nsIChannel*>(mChannel),
  • 791:   rv = prompter->PromptAuth(mChannel, nsIAuthPrompt2::LEVEL_NONE,
  • 916:   mChannel->GetCallback(prompter);
  • 1009:   mChannel->SetContentLength64(mFileSize);
  • 1047:   mChannel->SetEntityID(entityID);
  • 1050:   if (!mChannel->ResumeRequested())
  • 1072:   nsCOMPtr<nsIURL> url = (do_QueryInterface(mChannel->URI()));
  • 1079:   return mChannel->SetContentType(
  • 1089:   rv = mChannel->PushStreamConverter("text/ftp-dir",
  • 1112:   NS_ENSURE_TRUE(!mChannel->ResumeRequested(), NS_ERROR_NOT_RESUMABLE);
  • 1114:   mChannel->SetEntityID(EmptyCString());
  • 1196:   restString.AppendInt(PRInt64(mChannel->StartPos()), 10);
  • 1206:   mChannel->SetEntityID(EmptyCString());
  • 1219:   NS_ENSURE_STATE(mChannel->UploadStream());
  • 1223:   nsCOMPtr<nsIURL> url = do_QueryInterface(mChannel->URI());
  • 1416:   // now we know where to connect our data channel
  • 1436:   rv = mChannel->URI()->GetAsciiHost(host);
  • 1442:   port, mChannel->ProxyInfo(),
  • 1457:   // nsIUploadChannel requires the upload stream to support ReadSegments.
  • 1475:   mChannel->UploadStream(),
  • 1503:   FTP_DATA_CHANNEL_SEG_SIZE,
  • 1504:   FTP_DATA_CHANNEL_SEG_COUNT,
  • 1558:   if (mChannel->HasLoadFlag(nsIRequest::LOAD_FROM_CACHE))
  • 1561:   if (mChannel->HasLoadFlag(nsIRequest::LOAD_BYPASS_CACHE))
  • 1564:   if (mChannel->HasLoadFlag(nsIRequest::VALIDATE_ALWAYS))
  • 1568:   if (mChannel->HasLoadFlag(nsIRequest::VALIDATE_ONCE_PER_SESSION)) {
  • 1575:   if (mChannel->HasLoadFlag(nsIRequest::VALIDATE_NEVER))
  • 1599:   nsresult rv = tee->Init(mChannel->StreamListener(), out);
  • 1602:   mChannel->SetStreamListener(tee);
  • 1630:   transport->OpenInputStream(0, FTP_DATA_CHANNEL_SEG_SIZE,
  • 1631:   FTP_DATA_CHANNEL_SEG_COUNT,
  • 1643:  nsFtpState::Init(nsFtpChannel *channel)
  • 1646:   NS_ASSERTION(channel, "FTP: needs a channel");
  • 1648:   mChannel = channel; // a straight ref ptr to the channel
  • 1651:   mSuppliedEntityID = channel->EntityID();
  • 1653:   if (channel->UploadStream())
  • 1658:   nsCOMPtr<nsIURL> url = do_QueryInterface(mChannel->URI());
  • 1662:   rv = mChannel->URI()->GetPath(path);
  • 1677:   rv = mChannel->URI()->GetOriginCharset(originCharset);
  • 1690:   rv = mChannel->URI()->GetUsername(uname);
  • 1704:   rv = mChannel->URI()->GetPassword(password);
  • 1717:   rv = mChannel->URI()->GetPort(&port);
  • 1776:   if (!mChannel->HasLoadFlag(nsIRequest::LOAD_ANONYMOUS))
  • 1777:   rv = gFtpHandler->InsertConnection(mChannel->URI(),
  • 1808:   mChannel->GetCallback(prompter);
  • 1843:   mChannel->GetFTPEventSink(ftpSink);
  • 1996:   mChannel->OnTransportStatus(nsnull, status, progress,
  • 1997:   mFileSize - mChannel->StartPos());
  • 2134:   // make sure the channel knows wassup
  • 2143:   mChannel->PushStreamConverter("text/ftp-dir",
  • 2146:   mChannel->SetEntityID(EmptyCString());
  • 2166:   if (mChannel->UploadStream() || mChannel->ResumeRequested())
  • 2186:   } else if (mChannel->HasLoadFlag(nsIRequest::LOAD_BYPASS_CACHE)) {
  • 2193:   if (mChannel->HasLoadFlag(nsIRequest::INHIBIT_CACHING)) {
  • 2201:   mChannel->URI()->GetAsciiSpec(key);
netwerk/protocol/ftp/src/nsFtpProtocolHandler.cpp
  • 53:  #include "nsFTPChannel.h"
  • 213:  nsFtpProtocolHandler::NewChannel(nsIURI* url, nsIChannel* *result)
  • 215:   return NewProxiedChannel(url, nsnull, result);
  • 219:  nsFtpProtocolHandler::NewProxiedChannel(nsIURI* uri, nsIProxyInfo* proxyInfo,
  • 220:   nsIChannel* *result)
  • 223:   nsFtpChannel *channel = new nsFtpChannel(uri, proxyInfo);
  • 224:   if (!channel)
  • 226:   NS_ADDREF(channel);
  • 228:   nsresult rv = channel->Init();
  • 230:   NS_RELEASE(channel);
  • 234:   *result = channel;
netwerk/protocol/ftp/src/nsFTPChannel.h
  • 41:  #ifndef nsFTPChannel_h___
  • 42:  #define nsFTPChannel_h___
  • 44:  #include "nsBaseChannel.h"
  • 59:  #include "nsIFTPChannel.h"
  • 60:  #include "nsIUploadChannel.h"
  • 62:  #include "nsIProxiedChannel.h"
  • 63:  #include "nsIResumableChannel.h"
  • 66:  #define FTP_COMMAND_CHANNEL_SEG_SIZE 64
  • 67:  #define FTP_COMMAND_CHANNEL_SEG_COUNT 8
  • 69:  #define FTP_DATA_CHANNEL_SEG_SIZE (4*1024)
  • 70:  #define FTP_DATA_CHANNEL_SEG_COUNT 8
  • 72:  class nsFtpChannel : public nsBaseChannel,
  • 73:   public nsIFTPChannel,
  • 74:   public nsIUploadChannel,
  • 75:   public nsIResumableChannel,
  • 76:   public nsIProxiedChannel
  • 80:   NS_DECL_NSIUPLOADCHANNEL
  • 81:   NS_DECL_NSIRESUMABLECHANNEL
  • 82:   NS_DECL_NSIPROXIEDCHANNEL
  • 84:   nsFtpChannel(nsIURI *uri, nsIProxyInfo *pi)
  • 119:   virtual ~nsFtpChannel() {}
  • 121:   nsIChannel** channel);
  • 134:  #endif /* nsFTPChannel_h___ */
netwerk/protocol/ftp/src/nsFTPChannel.cpp
  • 39:  #include "nsFTPChannel.h"
  • 71:  // ftp connection. One is used for the command channel , and
  • 72:  // the other for the data channel. The command channel is the first
  • 73:  // connection made and is used to negotiate the second, data, channel.
  • 74:  // The data channel is driven by the command channel and is either
  • 80:  NS_IMPL_ISUPPORTS_INHERITED4(nsFtpChannel,
  • 81:   nsBaseChannel,
  • 82:   nsIUploadChannel,
  • 83:   nsIResumableChannel,
  • 84:   nsIFTPChannel,
  • 85:   nsIProxiedChannel)
  • 90:  nsFtpChannel::SetUploadStream(nsIInputStream *stream,
  • 104:  nsFtpChannel::GetUploadStream(nsIInputStream **stream)
  • 115:  nsFtpChannel::ResumeAt(PRUint64 aStartPos, const nsACString& aEntityID)
  • 125:  nsFtpChannel::GetEntityID(nsACString& entityID)
  • 136:  nsFtpChannel::GetProxyInfo(nsIProxyInfo** aProxyInfo)
  • 146:  nsFtpChannel::OpenContentStream(PRBool async, nsIInputStream **result,
  • 147:   nsIChannel** channel)
  • 168:  nsFtpChannel::GetStatusArg(nsresult status, nsString &statusArg)
  • 177:  nsFtpChannel::OnCallbacksChanged()
  • 185:  nsFtpChannel::GetFTPEventSink(nsCOMPtr<nsIFTPEventSink> &aResult)
netwerk/protocol/ftp/src/nsFtpConnectionThread.h
  • 43:  #include "nsFTPChannel.h"
  • 58:  #include "nsIFTPChannel.h"
  • 94:  //// Command channel connection setup states
  • 114:  class nsFtpChannel;
  • 116:  // The nsFtpState object is the content stream for the channel. It implements
  • 145:   nsresult Init(nsFtpChannel *channel);
  • 194:   * there. This method is initially called (indirectly) from the channel's
  • 201:   * state of the channel and of the system (e.g., opened for reading if we
  • 218:   * entry will be fed to the channel's listener. This method returns true
  • 233:   * listener chain for the FTP channel. As a result, the cache entry
  • 234:   * receives data as data is pushed to the channel's listener. This method
  • 249:   // ****** channel/transport/stream vars
  • 258:   nsRefPtr<nsFtpChannel> mChannel; // our owning FTP channel we pass through our events
netwerk/protocol/ftp/src/nsFtpControlConnection.cpp
  • 39:  #include "nsFTPChannel.h"
  • 156:   FTP_COMMAND_CHANNEL_SEG_SIZE,
  • 157:   FTP_COMMAND_CHANNEL_SEG_COUNT,
netwerk/protocol/ftp/public/nsIFTPChannel.idl
  • 41:   * This interface may be used to determine if a channel is a FTP channel.
  • 44:  interface nsIFTPChannel : nsISupports
  • 50:   * channel. It allows a consumer to receive a log of the FTP control
netwerk/wifi/src/osx_wifi.h
  • 92:   UInt16 channel; // Channel for the network.
netwerk/streamconv/test/TestStreamConv.cpp
  • 214:   // Build up a channel that represents the content we're
  • 220:   nsCOMPtr<nsIChannel> channel;
  • 225:   rv = NS_NewInputStreamChannel(getter_AddRefs(channel),
  • 232:   nsCOMPtr<nsIRequest> request(do_QueryInterface(channel));
netwerk/streamconv/converters/nsMultiMixedConv.h
  • 41:  #include "nsIChannel.h"
  • 48:  #include "nsIMultiPartChannel.h"
  • 60:  // nsPartChannel is a "dummy" channel which represents an individual part of
  • 63:  // Instances on this channel are passed out to the consumer through the
  • 66:  class nsPartChannel : public nsIChannel,
  • 68:   public nsIMultiPartChannel
  • 71:   nsPartChannel(nsIChannel *aMultipartChannel, PRUint32 aPartID);
  • 78:   NS_DECL_NSICHANNEL
  • 80:   NS_DECL_NSIMULTIPARTCHANNEL
  • 83:   ~nsPartChannel();
  • 86:   nsCOMPtr<nsIChannel> mMultipartChannel;
  • 155:   nsresult SendStart(nsIChannel *aChannel);
  • 158:   nsresult ParseHeaders(nsIChannel *aChannel, char *&aPtr,
  • 172:   nsRefPtr<nsPartChannel> mPartChannel; // the channel for the given part we're processing.
  • 173:   // one channel per part.
netwerk/streamconv/converters/nsUnknownDecoder.cpp
  • 58:  #include "nsIViewSourceChannel.h"
  • 59:  #include "nsIHttpChannel.h"
  • 285:   nsCOMPtr<nsIChannel> channel = do_QueryInterface(aRequest);
  • 286:   if (!channel) {
  • 292:   if (NS_FAILED(channel->GetURI(getter_AddRefs(uri))) || !uri) {
  • 535:   nsCOMPtr<nsIChannel> channel = do_QueryInterface(aRequest);
  • 536:   if (channel) {
  • 538:   nsresult result = channel->GetURI(getter_AddRefs(uri));
  • 605:   nsCOMPtr<nsIViewSourceChannel> viewSourceChannel =
  • 607:   if (viewSourceChannel) {
  • 608:   rv = viewSourceChannel->SetOriginalContentType(mContentType);
  • 610:   nsCOMPtr<nsIChannel> channel = do_QueryInterface(request, &rv);
  • 612:   // Set the new content type on the channel...
  • 613:   rv = channel->SetContentType(mContentType);
  • 617:   NS_ASSERTION(NS_SUCCEEDED(rv), "Unable to set content type on channel!");
  • 672:   nsCOMPtr<nsIHttpChannel> httpChannel = do_QueryInterface(aRequest);
  • 673:   if (!httpChannel) {
  • 677:   // It's an HTTP channel. Check for the text/plain mess
  • 679:   httpChannel->GetResponseHeader(NS_LITERAL_CSTRING("Content-Type"),
  • 682:   httpChannel->GetContentType(contentType);
  • 704:   httpChannel->GetResponseHeader(NS_LITERAL_CSTRING("Content-Encoding"),
netwerk/streamconv/converters/nsGopherDirListingConv.h
  • 48:  #include "nsIChannel.h"
  • 50:  #include "nsIChannel.h"
netwerk/streamconv/converters/nsHTTPCompressConv.cpp
  • 44:  #include "nsIChannel.h"
netwerk/streamconv/converters/nsIndexedToHTML.cpp
  • 155:   nsCOMPtr<nsIChannel> channel = do_QueryInterface(request);
  • 157:   rv = channel->GetURI(getter_AddRefs(uri));
  • 160:   channel->SetContentType(NS_LITERAL_CSTRING("application/xhtml+xml"));
  • 262:   // default behavior for other protocols is to assume the channel's
  • 843:   nsCOMPtr<nsIChannel> channel = do_QueryInterface(aRequest);
  • 845:   rv = channel->GetURI(getter_AddRefs(uri));
netwerk/streamconv/converters/nsFTPDirListingConv.h
  • 41:  #include "nsIChannel.h"
netwerk/streamconv/converters/nsFTPDirListingConv.cpp
  • 120:   nsCOMPtr<nsIChannel> channel = do_QueryInterface(request, &rv);
  • 161:   rv = channel->GetURI(getter_AddRefs(uri));
  • 208:   // as the http-index channel now.
netwerk/streamconv/converters/nsUnknownDecoder.h
  • 42:  #include "nsIChannel.h"
netwerk/streamconv/converters/nsBinHexDecoder.h
  • 56:  #include "nsIChannel.h"
netwerk/streamconv/converters/nsBinHexDecoder.cpp
  • 214:   // okay we've figured out the file name....set the content type on the channel
  • 493:  // content type and set it on the channel associated with the request. If the
  • 505:   nsCOMPtr<nsIChannel> channel(do_QueryInterface(aRequest, &rv));
  • 523:   channel->SetContentType(contentType);
  • 525:   channel->SetContentType(NS_LITERAL_CSTRING(UNKNOWN_CONTENT_TYPE));
netwerk/streamconv/converters/nsTXTToHTMLConv.cpp
  • 88:   nsCOMPtr<nsIChannel> channel = do_QueryInterface(request);
  • 89:   if (channel)
  • 90:   channel->SetContentType(NS_LITERAL_CSTRING("text/html"));
  • 91:   // else, assume there is a channel somewhere that knows what it is doing!
netwerk/streamconv/converters/nsMultiMixedConv.cpp
  • 42:  #include "nsIHttpChannel.h"
  • 49:  #include "nsIHttpChannelInternal.h"
  • 70:  nsPartChannel::nsPartChannel(nsIChannel *aMultipartChannel, PRUint32 aPartID) :
  • 79:   mMultipartChannel = aMultipartChannel;
  • 81:   // Inherit the load flags from the original channel...
  • 82:   mMultipartChannel->GetLoadFlags(&mLoadFlags);
  • 84:   mMultipartChannel->GetLoadGroup(getter_AddRefs(mLoadGroup));
  • 87:  nsPartChannel::~nsPartChannel()
  • 91:  void nsPartChannel::InitializeByteRange(PRInt64 aStart, PRInt64 aEnd)
  • 104:  NS_IMPL_ADDREF(nsPartChannel)
  • 105:  NS_IMPL_RELEASE(nsPartChannel)
  • 107:  NS_INTERFACE_MAP_BEGIN(nsPartChannel)
  • 108:   NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIChannel)
  • 110:   NS_INTERFACE_MAP_ENTRY(nsIChannel)
  • 112:   NS_INTERFACE_MAP_ENTRY(nsIMultiPartChannel)
  • 120:  nsPartChannel::GetName(nsACString &aResult)
  • 122:   return mMultipartChannel->GetName(aResult);
  • 126:  nsPartChannel::IsPending(PRBool *aResult)
  • 129:   // the underlying multipart channel... This is not exactly right,
  • 131:   return mMultipartChannel->IsPending(aResult);
  • 135:  nsPartChannel::GetStatus(nsresult *aResult)
  • 142:   rv = mMultipartChannel->GetStatus(aResult);
  • 149:  nsPartChannel::Cancel(nsresult aStatus)
  • 152:   // multipart channel...
  • 153:   // XXX but we should stop sending data for _this_ part channel!
  • 159:  nsPartChannel::Suspend(void)
  • 162:   // multipart channel...
  • 168:  nsPartChannel::Resume(void)
  • 171:   // multipart channel...
  • 177:  // nsIChannel implementation
  • 181:  nsPartChannel::GetOriginalURI(nsIURI * *aURI)
  • 183:   return mMultipartChannel->GetOriginalURI(aURI);
  • 187:  nsPartChannel::SetOriginalURI(nsIURI *aURI)
  • 189:   return mMultipartChannel->SetOriginalURI(aURI);
  • 193:  nsPartChannel::GetURI(nsIURI * *aURI)
  • 195:   return mMultipartChannel->GetURI(aURI);
  • 199:  nsPartChannel::Open(nsIInputStream **result)
  • 201:   // This channel cannot be opened!
  • 206:  nsPartChannel::AsyncOpen(nsIStreamListener *aListener, nsISupports *aContext)
  • 208:   // This channel cannot be opened!
  • 213:  nsPartChannel::GetLoadFlags(nsLoadFlags *aLoadFlags)
  • 220:  nsPartChannel::SetLoadFlags(nsLoadFlags aLoadFlags)
  • 227:  nsPartChannel::GetLoadGroup(nsILoadGroup* *aLoadGroup)
  • 236:  nsPartChannel::SetLoadGroup(nsILoadGroup* aLoadGroup)
  • 244:  nsPartChannel::GetOwner(nsISupports* *aOwner)
  • 246:   return mMultipartChannel->GetOwner(aOwner);
  • 250:  nsPartChannel::SetOwner(nsISupports* aOwner)
  • 252:   return mMultipartChannel->SetOwner(aOwner);
  • 256:  nsPartChannel::GetNotificationCallbacks(nsIInterfaceRequestor* *aCallbacks)
  • 258:   return mMultipartChannel->GetNotificationCallbacks(aCallbacks);
  • 262:  nsPartChannel::SetNotificationCallbacks(nsIInterfaceRequestor* aCallbacks)
  • 264:   return mMultipartChannel->SetNotificationCallbacks(aCallbacks);
  • 268:  nsPartChannel::GetSecurityInfo(nsISupports * *aSecurityInfo)
  • 270:   return mMultipartChannel->GetSecurityInfo(aSecurityInfo);
  • 274:  nsPartChannel::GetContentType(nsACString &aContentType)
  • 281:  nsPartChannel::SetContentType(const nsACString &aContentType)
  • 289:  nsPartChannel::GetContentCharset(nsACString &aContentCharset)
  • 296:  nsPartChannel::SetContentCharset(const nsACString &aContentCharset)
  • 303:  nsPartChannel::GetContentLength(PRInt32 *aContentLength)
  • 310:  nsPartChannel::SetContentLength(PRInt32 aContentLength)
  • 317:  nsPartChannel::GetContentDisposition(nsACString &aContentDisposition)
  • 324:  nsPartChannel::SetContentDisposition(const nsACString &aContentDisposition)
  • 331:  nsPartChannel::GetPartID(PRUint32 *aPartID)
  • 338:  nsPartChannel::GetIsLastPart(PRBool *aIsLastPart)
  • 349:  nsPartChannel::GetIsByteRangeRequest(PRBool *aIsByteRangeRequest)
  • 358:  nsPartChannel::GetStartRange(PRInt64 *aStartRange)
  • 366:  nsPartChannel::GetEndRange(PRInt64 *aEndRange)
  • 373:  nsPartChannel::GetBaseChannel(nsIChannel ** aReturn)
  • 377:   *aReturn = mMultipartChannel;
  • 433:   nsCOMPtr<nsIChannel> channel = do_QueryInterface(request, &rv);
  • 499:   rv = ParseHeaders(channel, cursor, bufLen, &done);
  • 504:   rv = SendStart(channel);
  • 537:   rv = ParseHeaders(channel, cursor, bufLen, &done);
  • 540:   rv = SendStart(channel);
  • 580:   // of a "part" (ie. mPartChannel exists) don't bother
  • 582:   // if we don't have a channel already, then we don't even
  • 585:   if (!mPartChannel || !(cursor[bufLen-1] == nsCRT::LF) )
  • 618:   nsCOMPtr<nsIChannel> channel = do_QueryInterface(request, &rv);
  • 621:   // ask the HTTP channel for the content-type and extract the boundary from it.
  • 622:   nsCOMPtr<nsIHttpChannel> httpChannel = do_QueryInterface(channel, &rv);
  • 624:   rv = httpChannel->GetResponseHeader(NS_LITERAL_CSTRING("content-type"), delimiter);
  • 627:   // try asking the channel directly
  • 628:   rv = channel->GetContentType(delimiter);
  • 664:   if (mPartChannel) {
  • 665:   mPartChannel->SetIsLastPart();
  • 667:   // we've already called SendStart() (which sets up the mPartChannel,
  • 680:   // the middle of sending data. if we were, mPartChannel,
  • 734:  nsMultiMixedConv::SendStart(nsIChannel *aChannel) {
  • 740:   // if we already have an mPartChannel, that means we never sent a Stop()
  • 742:   NS_ASSERTION(!mPartChannel, "tisk tisk, shouldn't be overwriting a channel");
  • 744:   nsPartChannel *newChannel;
  • 745:   newChannel = new nsPartChannel(aChannel, mCurrentPartID++);
  • 746:   if (!newChannel)
  • 750:   newChannel->InitializeByteRange(mByteRangeStart, mByteRangeEnd);
  • 755:   // Set up the new part channel...
  • 756:   mPartChannel = newChannel;
  • 758:   rv = mPartChannel->SetContentType(mContentType);
  • 761:   rv = mPartChannel->SetContentLength(mContentLength); // XXX Truncates 64-bit!
  • 764:   rv = mPartChannel->SetContentDisposition(mContentDisposition);
  • 768:   mPartChannel->GetLoadFlags(&loadFlags);
  • 769:   loadFlags |= nsIChannel::LOAD_REPLACE;
  • 770:   mPartChannel->SetLoadFlags(loadFlags);
  • 773:   (void)mPartChannel->GetLoadGroup(getter_AddRefs(loadGroup));
  • 775:   // Add the new channel to the load group (if any)
  • 777:   rv = loadGroup->AddRequest(mPartChannel, nsnull);
  • 781:   // Let's start off the load. NOTE: we don't forward on the channel passed
  • 782:   // into our OnDataAvailable() as it's the root channel for the raw stream.
  • 783:   return mFinalListener->OnStartRequest(mPartChannel, mContext);
  • 791:   if (mPartChannel) {
  • 792:   rv = mFinalListener->OnStopRequest(mPartChannel, mContext, aStatus);
  • 793:   // don't check for failure here, we need to remove the channel from
  • 796:   // Remove the channel from its load group (if any)
  • 798:   (void) mPartChannel->GetLoadGroup(getter_AddRefs(loadGroup));
  • 800:   (void) loadGroup->RemoveRequest(mPartChannel, mContext, aStatus);
  • 803:   mPartChannel = 0;
  • 812:   if (!mPartChannel) return NS_ERROR_FAILURE; // something went wrong w/ processing
  • 839:   return mFinalListener->OnDataAvailable(mPartChannel, mContext, inStream, offset, aLen);
  • 856:  nsMultiMixedConv::ParseHeaders(nsIChannel *aChannel, char *&aPtr,
  • 907:   nsCOMPtr<nsIHttpChannelInternal> httpInternal =
  • 908:   do_QueryInterface(aChannel);
netwerk/streamconv/converters/nsDirIndexParser.cpp
  • 52:  #include "nsIChannel.h"
netwerk/streamconv/converters/nsGopherDirListingConv.cpp
  • 131:   nsCOMPtr<nsIChannel> channel = do_QueryInterface(request);
  • 132:   NS_ENSURE_STATE(channel);
  • 135:   channel->GetURI(getter_AddRefs(uri));
  • 181:   // as the http-index channel now.
netwerk/build/nsNetCID.h
  • 257:  // component implementing nsIInputStreamChannel.
  • 258:  #define NS_INPUTSTREAMCHANNEL_CLASSNAME \
  • 259:   "nsInputStreamChannel"
  • 260:  #define NS_INPUTSTREAMCHANNEL_CONTRACTID \
  • 261:   "@mozilla.org/network/input-stream-channel;1"
  • 262:  #define NS_INPUTSTREAMCHANNEL_CID \
  • 880:   * Must implement nsIChannelEventSink
  • 882:  #define NS_GLOBAL_CHANNELEVENTSINK_CONTRACTID \
  • 883:   "@mozilla.org/netwerk/global-channel-event-sink;1"
  • 919:   * nsIChannelEventSink about all redirects that happen and have the opportunity
  • 923:  #define NS_CHANNEL_EVENT_SINK_CATEGORY "net-channel-event-sinks"
  • 928:   * Services should not set the MIME type on the channel directly, but return the
  • 932:   * Note that only channels with the LOAD_CALL_CONTENT_SNIFFERS flag will call
  • 938:   * Not all channels may implement content sniffing. See also
  • 939:   * nsIChannel::LOAD_CALL_CONTENT_SNIFFERS.
netwerk/build/nsNetModule.cpp
  • 107:  #include "nsInputStreamChannel.h"
  • 108:  NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsInputStreamChannel, Init)
  • 698:   { NS_INPUTSTREAMCHANNEL_CLASSNAME,
  • 699:   NS_INPUTSTREAMCHANNEL_CID,
  • 700:   NS_INPUTSTREAMCHANNEL_CONTRACTID,
  • 701:   nsInputStreamChannelConstructor },
netwerk/base/src/nsSyncStreamListener.cpp
  • 107:   // channel to be canceled, and as a result our OnStopRequest method
netwerk/base/src/nsUnicharStreamLoader.h
  • 44:  #include "nsIChannel.h"
  • 73:   nsCOMPtr<nsIChannel> mChannel;
netwerk/base/src/nsInputStreamChannel.cpp
  • 38:  #include "nsInputStreamChannel.h"
  • 41:  // nsInputStreamChannel
  • 44:  nsInputStreamChannel::OpenContentStream(PRBool async, nsIInputStream **result,
  • 45:   nsIChannel** channel)
  • 72:  // nsInputStreamChannel::nsISupports
  • 74:  NS_IMPL_ISUPPORTS_INHERITED1(nsInputStreamChannel,
  • 75:   nsBaseChannel,
  • 76:   nsIInputStreamChannel)
  • 79:  // nsInputStreamChannel::nsIInputStreamChannel
  • 82:  nsInputStreamChannel::SetURI(nsIURI *uri)
  • 85:   nsBaseChannel::SetURI(uri);
  • 90:  nsInputStreamChannel::GetContentStream(nsIInputStream **stream)
  • 97:  nsInputStreamChannel::SetContentStream(nsIInputStream *stream)
netwerk/base/src/nsStreamLoader.cpp
  • 40:  #include "nsIChannel.h"
  • 85:   nsCOMPtr<nsIChannel> chan( do_QueryInterface(request) );
netwerk/base/src/nsIOService.cpp
  • 50:  #include "nsInputStreamChannel.h"
  • 172:   , mChannelEventSinks(NS_CHANNEL_EVENT_SINK_CATEGORY)
  • 299:  nsIOService::OnChannelRedirect(nsIChannel* oldChan, nsIChannel* newChan,
  • 302:   nsCOMPtr<nsIChannelEventSink> sink =
  • 303:   do_GetService(NS_GLOBAL_CHANNELEVENTSINK_CONTRACTID);
  • 305:   nsresult rv = sink->OnChannelRedirect(oldChan, newChan, flags);
  • 311:   const nsCOMArray<nsIChannelEventSink>& entries =
  • 312:   mChannelEventSinks.GetEntries();
  • 315:   nsresult rv = entries[i]->OnChannelRedirect(oldChan, newChan, flags);
  • 440:   // read from a channel created by the default protocol handler.
  • 530:  nsIOService::NewChannelFromURI(nsIURI *aURI, nsIChannel **result)
  • 534:   NS_TIMELINE_MARK_URI("nsIOService::NewChannelFromURI(%s)", aURI);
  • 568:   // we are going to proxy this channel using an http proxy
  • 575:   return pph->NewProxiedChannel(aURI, pi, result);
  • 579:   return handler->NewChannel(aURI, result);
  • 583:  nsIOService::NewChannel(const nsACString &aSpec, const char *aCharset, nsIURI *aBaseURI, nsIChannel **result)
  • 590:   return NewChannelFromURI(uri, result);
netwerk/base/src/nsBaseChannel.cpp
  • 38:  #include "nsBaseChannel.h"
  • 39:  #include "nsChannelProperties.h"
  • 45:  #include "nsIHttpChannel.h"
  • 46:  #include "nsIChannelEventSink.h"
  • 84:  // nsBaseChannel
  • 86:  nsBaseChannel::nsBaseChannel()
  • 98:  nsBaseChannel::Redirect(nsIChannel *newChannel, PRUint32 redirectFlags,
  • 99:   PRBool openNewChannel)
  • 105:   newChannel->SetLoadGroup(mLoadGroup);
  • 106:   newChannel->SetNotificationCallbacks(mCallbacks);
  • 107:   newChannel->SetLoadFlags(mLoadFlags | LOAD_REPLACE);
  • 109:   nsCOMPtr<nsIWritablePropertyBag> bag = ::do_QueryInterface(newChannel);
  • 114:   // we support nsIHttpEventSink if we are an HTTP channel and if this is not
  • 120:   nsresult rv = gIOService->OnChannelRedirect(this, newChannel, redirectFlags);
  • 124:   // Backwards compat for non-internal redirects from a HTTP channel.
  • 125:   if (!(redirectFlags & nsIChannelEventSink::REDIRECT_INTERNAL)) {
  • 126:   nsCOMPtr<nsIHttpChannel> httpChannel = do_QueryInterface();
  • 127:   if (httpChannel) {
  • 131:   rv = httpEventSink->OnRedirect(httpChannel, newChannel);
  • 138:   nsCOMPtr<nsIChannelEventSink> channelEventSink;
  • 140:   GetCallback(channelEventSink);
  • 141:   if (channelEventSink) {
  • 142:   rv = channelEventSink->OnChannelRedirect(this, newChannel, redirectFlags);
  • 147:   // Make sure to do this _after_ making all the OnChannelRedirect calls
  • 148:   newChannel->SetOriginalURI(OriginalURI());
  • 150:   // If we fail to open the new channel, then we want to leave this channel
  • 151:   // unaffected, so we defer tearing down our channel until we have succeeded
  • 154:   if (openNewChannel) {
  • 155:   rv = newChannel->AsyncOpen(mListener, mListenerContext);
  • 160:   // close down this channel
  • 169:  nsBaseChannel::HasContentTypeHint() const
  • 176:  nsBaseChannel::SetContentLength64(PRInt64 len)
  • 179:   // It has the drawback of being copied if we redirect this channel.
  • 180:   // Maybe it is time for nsIChannel2.
  • 181:   SetPropertyAsInt64(NS_CHANNEL_PROP_CONTENT_LENGTH, len);
  • 185:  nsBaseChannel::ContentLength64()
  • 188:   nsresult rv = GetPropertyAsInt64(NS_CHANNEL_PROP_CONTENT_LENGTH, &len);
  • 193:  nsBaseChannel::PushStreamConverter(const char *fromType,
  • 222:  nsBaseChannel::BeginPumpingData()
  • 225:   nsCOMPtr<nsIChannel> channel;
  • 227:   getter_AddRefs(channel));
  • 231:   NS_ASSERTION(!stream || !channel, "Got both a channel and a stream?");
  • 233:   if (channel) {
  • 234:   rv = NS_DispatchToCurrentThread(new RedirectRunnable(this, channel));
  • 240:   // By assigning mPump, we flag this channel as pending (see IsPending). It's
  • 255:  nsBaseChannel::HandleAsyncRedirect(nsIChannel* newChannel)
  • 260:   nsresult rv = Redirect(newChannel,
  • 261:   nsIChannelEventSink::REDIRECT_TEMPORARY,
  • 288:  // nsBaseChannel::nsISupports
  • 290:  NS_IMPL_ISUPPORTS_INHERITED6(nsBaseChannel,
  • 293:   nsIChannel,
  • 300:  // nsBaseChannel::nsIRequest
  • 303:  nsBaseChannel::GetName(nsACString &result)
  • 313:  nsBaseChannel::IsPending(PRBool *result)
  • 320:  nsBaseChannel::GetStatus(nsresult *status)
  • 331:  nsBaseChannel::Cancel(nsresult status)
  • 346:  nsBaseChannel::Suspend()
  • 353:  nsBaseChannel::Resume()
  • 360:  nsBaseChannel::GetLoadFlags(nsLoadFlags *aLoadFlags)
  • 367:  nsBaseChannel::SetLoadFlags(nsLoadFlags aLoadFlags)
  • 374:  nsBaseChannel::GetLoadGroup(nsILoadGroup **aLoadGroup)
  • 381:  nsBaseChannel::SetLoadGroup(nsILoadGroup *aLoadGroup)
  • 389:  // nsBaseChannel::nsIChannel
  • 392:  nsBaseChannel::GetOriginalURI(nsIURI **aURI)
  • 400:  nsBaseChannel::SetOriginalURI(nsIURI *aURI)
  • 408:  nsBaseChannel::GetURI(nsIURI **aURI)
  • 415:  nsBaseChannel::GetOwner(nsISupports **aOwner)
  • 422:  nsBaseChannel::SetOwner(nsISupports *aOwner)
  • 429:  nsBaseChannel::GetNotificationCallbacks(nsIInterfaceRequestor **aCallbacks)
  • 436:  nsBaseChannel::SetNotificationCallbacks(nsIInterfaceRequestor *aCallbacks)
  • 444:  nsBaseChannel::GetSecurityInfo(nsISupports **aSecurityInfo)
  • 451:  nsBaseChannel::GetContentType(nsACString &aContentType)
  • 458:  nsBaseChannel::SetContentType(const nsACString &aContentType)
  • 467:  nsBaseChannel::GetContentCharset(nsACString &aContentCharset)
  • 474:  nsBaseChannel::SetContentCharset(const nsACString &aContentCharset)
  • 481:  nsBaseChannel::GetContentLength(PRInt32 *aContentLength)
  • 492:  nsBaseChannel::SetContentLength(PRInt32 aContentLength)
  • 499:  nsBaseChannel::Open(nsIInputStream **result)
  • 505:   nsCOMPtr<nsIChannel> chan;
  • 507:   NS_ASSERTION(!chan || !*result, "Got both a channel and a stream?");
  • 509:   rv = Redirect(chan, nsIChannelEventSink::REDIRECT_INTERNAL, PR_FALSE);
  • 514:   return NS_ImplementChannelOpen(this, result);
  • 522:  nsBaseChannel::AsyncOpen(nsIStreamListener *listener, nsISupports *ctxt)
  • 568:  // nsBaseChannel::nsITransportEventSink
  • 571:  nsBaseChannel::OnTransportStatus(nsITransport *transport, nsresult status,
  • 602:  // nsBaseChannel::nsIInterfaceRequestor
  • 605:  nsBaseChannel::GetInterface(const nsIID &iid, void **result)
  • 612:  // nsBaseChannel::nsIRequestObserver
  • 617:   nsIChannel *chan = static_cast<nsIChannel*>(aClosure);
  • 636:   nsIChannel *chan = static_cast<nsIChannel*>(aClosure);
  • 650:  nsBaseChannel::OnStartRequest(nsIRequest *request, nsISupports *ctxt)
  • 655:   mPump->PeekStream(CallUnknownTypeSniffer, static_cast<nsIChannel*>(this));
  • 661:   mPump->PeekStream(CallTypeSniffers, static_cast<nsIChannel*>(this));
  • 669:  nsBaseChannel::OnStopRequest(nsIRequest *request, nsISupports *ctxt,
  • 698:  // nsBaseChannel::nsIStreamListener
  • 701:  nsBaseChannel::OnDataAvailable(nsIRequest *request, nsISupports *ctxt,
netwerk/base/src/nsLoadGroup.cpp
  • 294:   // prevents any new channels from being added during the operation.
  • 507:   // in particular, nsIChannel::LOAD_DOCUMENT_URI...
  • 542:   // Do not add the channel, if the loadgroup is being canceled...
  • 547:   LOG(("LOADGROUP [%x]: AddChannel() ABORTED because LoadGroup is"
netwerk/base/src/nsBaseContentStream.h
  • 47:  // used to satisfy the nsBaseChannel::OpenContentStream method.
netwerk/base/src/nsLoadGroup.h
  • 42:  #include "nsIChannel.h"
netwerk/base/src/nsPACMan.h
  • 44:  #include "nsIChannelEventSink.h"
  • 75:   , public nsIChannelEventSink
  • 142:   NS_DECL_NSICHANNELEVENTSINK
netwerk/base/src/nsDownloader.cpp
  • 39:  #include "nsICachingChannel.h"
  • 107:   nsCOMPtr<nsICachingChannel> caching = do_QueryInterface(request, &rv);
  • 146:   nsCOMPtr<nsICachingChannel> caching = do_QueryInterface(request, &status);
netwerk/base/src/nsIOService.h
  • 56:  #include "nsIChannelEventSink.h"
  • 98:   // Called by channels before a redirect happens. This notifies the global
  • 100:   nsresult OnChannelRedirect(nsIChannel* oldChan, nsIChannel* newChan,
  • 153:   nsCategoryCache<nsIChannelEventSink> mChannelEventSinks;
netwerk/base/src/nsIncrementalDownload.cpp
  • 42:  #include "nsIChannelEventSink.h"
  • 54:  #include "nsChannelProperties.h"
  • 59:  // network channel when the download is already complete.
  • 64:  // network channel when the response to a range request is 200 instead of 206.
  • 127:   , public nsIChannelEventSink
  • 138:   NS_DECL_NSICHANNELEVENTSINK
  • 151:   nsresult ClearRequestHeader(nsIHttpChannel *channel);
  • 159:   nsCOMPtr<nsIChannel> mChannel;
  • 261:   NS_ASSERTION(!mChannel, "how can we have a channel?");
  • 271:   nsCOMPtr<nsIChannel> channel;
  • 272:   nsresult rv = NS_NewChannel(getter_AddRefs(channel), mFinalURI, nsnull,
  • 277:   nsCOMPtr<nsIHttpChannel> http = do_QueryInterface(channel, &rv);
  • 299:   rv = channel->AsyncOpen(this, nsnull);
  • 303:   // Wait to assign mChannel when we know we are going to succeed. This is
  • 305:   // mChannel and this until we know for a fact that AsyncOpen has succeeded,
  • 307:   mChannel = channel;
  • 338:   nsIChannelEventSink,
  • 380:   if (mChannel) {
  • 381:   mChannel->Cancel(mStatus);
  • 536:   nsCOMPtr<nsIHttpChannel> http = do_QueryInterface(request, &rv);
  • 560:   mChannel = nsnull;
  • 609:   rv = props->GetPropertyAsInt64(NS_CHANNEL_PROP_CONTENT_LENGTH,
  • 650:   // Not a real error; just a trick to kill off the channel without our
  • 671:   mChannel = nsnull;
  • 742:   if (iid.Equals(NS_GET_IID(nsIChannelEventSink))) {
  • 744:   *result = static_cast<nsIChannelEventSink *>(this);
  • 756:  nsIncrementalDownload::ClearRequestHeader(nsIHttpChannel *channel)
  • 758:   NS_ENSURE_ARG(channel);
  • 762:   return channel->SetRequestHeader(NS_LITERAL_CSTRING("Accept-Encoding"),
  • 766:  // nsIChannelEventSink
  • 769:  nsIncrementalDownload::OnChannelRedirect(nsIChannel *oldChannel,
  • 770:   nsIChannel *newChannel,
  • 776:   nsCOMPtr<nsIHttpChannel> http = do_QueryInterface(oldChannel);
  • 779:   nsCOMPtr<nsIHttpChannel> newHttpChannel = do_QueryInterface(newChannel);
  • 780:   NS_ENSURE_STATE(newHttpChannel);
  • 784:   nsresult rv = ClearRequestHeader(newHttpChannel);
  • 792:   rv = newHttpChannel->SetRequestHeader(rangeHdr, rangeVal, PR_FALSE);
  • 797:   nsCOMPtr<nsIChannelEventSink> sink = do_GetInterface(mObserver);
  • 799:   rv = sink->OnChannelRedirect(oldChannel, newChannel, flags);
  • 801:   // Update mChannel, so we can Cancel the new channel.
  • 803:   mChannel = newChannel;
netwerk/base/src/nsUnicharStreamLoader.cpp
  • 42:  #include "nsIChannel.h"
  • 63:   mChannel = nsnull; // Leave this null till OnStopRequest
  • 87:  /* readonly attribute nsIChannel channel; */
  • 89:  nsUnicharStreamLoader::GetChannel(nsIChannel **aChannel)
  • 91:   NS_IF_ADDREF(*aChannel = mChannel);
  • 117:   // if we trigger this assertion, then it means that the channel called
  • 125:   // Make sure mChannel points to the channel that we ended up with
  • 126:   mChannel = do_QueryInterface(request);
  • 173:   mChannel = nsnull;
netwerk/base/src/nsInputStreamChannel.h
  • 38:  #ifndef nsInputStreamChannel_h__
  • 39:  #define nsInputStreamChannel_h__
  • 41:  #include "nsBaseChannel.h"
  • 42:  #include "nsIInputStreamChannel.h"
  • 46:  class nsInputStreamChannel : public nsBaseChannel
  • 47:   , public nsIInputStreamChannel
  • 51:   NS_DECL_NSIINPUTSTREAMCHANNEL
  • 53:   nsInputStreamChannel() {}
  • 56:   virtual ~nsInputStreamChannel() {}
  • 59:   nsIChannel** channel);
  • 65:  #endif // !nsInputStreamChannel_h__
netwerk/base/src/nsPACMan.cpp
  • 45:  #include "nsIHttpChannel.h"
  • 57:  // a HTTP request. For other types of channels, just return true.
  • 66:   nsCOMPtr<nsIHttpChannel> httpChannel = do_QueryInterface(request);
  • 67:   if (httpChannel)
  • 68:   httpChannel->GetRequestSucceeded(&result);
  • 305:   nsCOMPtr<nsIChannel> channel;
  • 308:   ios->NewChannelFromURI(mPACURI, getter_AddRefs(channel));
  • 310:   if (channel) {
  • 311:   channel->SetLoadFlags(nsIRequest::LOAD_BYPASS_CACHE);
  • 312:   channel->SetNotificationCallbacks(this);
  • 313:   if (NS_SUCCEEDED(channel->AsyncOpen(mLoader, nsnull)))
  • 393:   nsIChannelEventSink)
  • 419:   nsCOMPtr<nsIChannel> channel = do_QueryInterface(request);
  • 420:   if (channel) {
  • 422:   channel->GetURI(getter_AddRefs(uri));
  • 467:   if (iid.Equals(NS_GET_IID(nsIChannelEventSink))) {
  • 469:   *result = static_cast<nsIChannelEventSink *>(this);
  • 477:  nsPACMan::OnChannelRedirect(nsIChannel *oldChannel, nsIChannel *newChannel,
  • 480:   return newChannel->GetURI(getter_AddRefs(mPACURI));
netwerk/base/src/nsBaseChannel.h
  • 38:  #ifndef nsBaseChannel_h__
  • 39:  #define nsBaseChannel_h__
  • 47:  #include "nsIChannel.h"
  • 58:  // nsBaseChannel is designed to be subclassed. The subclass is responsible for
  • 60:  // nsIChannel::AsyncOpen and nsIChannel::Open implementations.
  • 62:  // nsBaseChannel implements nsIInterfaceRequestor to provide a convenient way
  • 63:  // for subclasses to query both the nsIChannel::notificationCallbacks and
  • 66:  // nsBaseChannel implements nsITransportEventSink to support progress & status
  • 69:  class nsBaseChannel : public nsHashPropertyBag
  • 70:   , public nsIChannel
  • 78:   NS_DECL_NSICHANNEL
  • 82:   nsBaseChannel();
  • 84:   // This method must be called to initialize the basechannel instance.
  • 93:   virtual ~nsBaseChannel() {}
  • 97:   // true when called from nsIChannel::AsyncOpen and false otherwise. When
  • 105:   // NS_ERROR_NOT_IMPLEMENTED to cause the basechannel to implement Open in
  • 106:   // terms of AsyncOpen (see NS_ImplementChannelOpen).
  • 107:   // A callee is allowed to return an nsIChannel instead of an nsIInputStream.
  • 108:   // That case will be treated as a redirect to the new channel. By default
  • 109:   // *channel will be set to null by the caller, so callees who don't want to
  • 112:   nsIChannel** channel) = 0;
  • 114:   // The basechannel calls this method from its OnTransportStatus method to
  • 126:   // Called when the callbacks available to this channel may have changed.
  • 134:   // Redirect to another channel. This method takes care of notifying
  • 135:   // observers of this redirect as well as of opening the new channel, if asked
  • 138:   // redirect could not be performed (no channel was opened; this channel
  • 140:   // defined on nsIChannelEventSink.
  • 141:   nsresult Redirect(nsIChannel *newChannel, PRUint32 redirectFlags,
  • 142:   PRBool openNewChannel);
  • 150:   // The URI member should be initialized before the channel is used, and then
  • 151:   // it should never be changed again until the channel is destroyed.
  • 185:   // Set the content length that should be reported for this channel. Pass -1
  • 190:   // Helper function for querying the channel's notification callbacks.
  • 197:   return nsQueryInterface(static_cast<nsIChannel *>(this));
  • 205:   // base channel via nsITransportEventSink, then it may set this flag to cause
  • 206:   // the base channel to synthesize progress events when it receives data from
  • 213:   // and the channel's listener. The following methods make that possible.
  • 221:   // Pushes a new stream converter in front of the channel's stream listener.
  • 224:   // channel's content-length property will be assigned a value of -1. This is
  • 239:   // Called when the callbacks available to this channel may have changed.
  • 248:   void HandleAsyncRedirect(nsIChannel* newChannel);
  • 253:   RedirectRunnable(nsBaseChannel* chan, nsIChannel* newChannel)
  • 254:   : mChannel(chan), mNewChannel(newChannel)
  • 256:   NS_PRECONDITION(newChannel, "Must have channel to redirect to");
  • 261:   mChannel->HandleAsyncRedirect(mNewChannel);
  • 266:   nsRefPtr<nsBaseChannel> mChannel;
  • 267:   nsCOMPtr<nsIChannel> mNewChannel;
  • 291:  #endif // !nsBaseChannel_h__
netwerk/base/src/nsURIChecker.cpp
  • 43:  #include "nsIHttpChannel.h"
  • 50:  ServerIsNES3x(nsIHttpChannel *httpChannel)
  • 53:   httpChannel->GetResponseHeader(NS_LITERAL_CSTRING("Server"), server);
  • 68:   nsIChannelEventSink,
  • 95:   NS_ASSERTION(mChannel, "no channel");
  • 98:   nsresult rv = mChannel->GetStatus(&status);
  • 105:   nsCOMPtr<nsIHttpChannel> httpChannel = do_QueryInterface(mChannel);
  • 106:   if (!httpChannel)
  • 110:   rv = httpChannel->GetResponseStatus(&responseStatus);
  • 123:   if (mAllowHead && ServerIsNES3x(httpChannel)) {
  • 126:   // save the current value of mChannel in case we can't issue
  • 128:   nsCOMPtr<nsIChannel> lastChannel = mChannel;
  • 133:   rv = lastChannel->GetOriginalURI(getter_AddRefs(uri));
  • 134:   rv |= lastChannel->GetLoadFlags(&loadFlags);
  • 137:   // parameters that may have been set on lastChannel??
  • 142:   rv = mChannel->SetLoadFlags(loadFlags);
  • 145:   // if we succeeded in loading the new channel, then we
  • 153:   // to access our baseChannel attribute if they want.
  • 154:   mChannel = lastChannel;
  • 173:   rv = ios->NewChannelFromURI(aURI, getter_AddRefs(mChannel));
  • 178:   // See if it's an http channel, which needs special treatment:
  • 179:   nsCOMPtr<nsIHttpChannel> httpChannel = do_QueryInterface(mChannel);
  • 180:   if (httpChannel) {
  • 181:   // We can have an HTTP channel that has a non-HTTP URL if
  • 189:   httpChannel->SetRequestMethod(NS_LITERAL_CSTRING("HEAD"));
  • 205:   NS_ENSURE_TRUE(mChannel, NS_ERROR_NOT_INITIALIZED);
  • 209:   mChannel->SetNotificationCallbacks(this);
  • 212:   nsresult rv = mChannel->AsyncOpen(this, nsnull);
  • 214:   mChannel = nsnull;
  • 225:  nsURIChecker::GetBaseChannel(nsIChannel **aChannel)
  • 227:   NS_ENSURE_TRUE(mChannel, NS_ERROR_NOT_INITIALIZED);
  • 228:   NS_ADDREF(*aChannel = mChannel);
  • 239:   NS_ENSURE_TRUE(mChannel, NS_ERROR_NOT_INITIALIZED);
  • 240:   return mChannel->GetName(aName);
  • 260:   NS_ENSURE_TRUE(mChannel, NS_ERROR_NOT_INITIALIZED);
  • 261:   return mChannel->Cancel(status);
  • 267:   NS_ENSURE_TRUE(mChannel, NS_ERROR_NOT_INITIALIZED);
  • 268:   return mChannel->Suspend();
  • 274:   NS_ENSURE_TRUE(mChannel, NS_ERROR_NOT_INITIALIZED);
  • 275:   return mChannel->Resume();
  • 281:   NS_ENSURE_TRUE(mChannel, NS_ERROR_NOT_INITIALIZED);
  • 282:   return mChannel->GetLoadGroup(aLoadGroup);
  • 288:   NS_ENSURE_TRUE(mChannel, NS_ERROR_NOT_INITIALIZED);
  • 289:   return mChannel->SetLoadGroup(aLoadGroup);
  • 295:   NS_ENSURE_TRUE(mChannel, NS_ERROR_NOT_INITIALIZED);
  • 296:   return mChannel->GetLoadFlags(aLoadFlags);
  • 302:   NS_ENSURE_TRUE(mChannel, NS_ERROR_NOT_INITIALIZED);
  • 303:   return mChannel->SetLoadFlags(aLoadFlags);
  • 313:   NS_ASSERTION(aRequest == mChannel, "unexpected request");
  • 329:   if (mChannel == request) {
  • 330:   // break reference cycle between us and the channel (see comment in
  • 332:   mChannel = nsnull;
  • 366:  // nsIChannelEventSink methods:
  • 370:  nsURIChecker::OnChannelRedirect(nsIChannel *aOldChannel,
  • 371:   nsIChannel *aNewChannel,
  • 374:   // We have a new channel
  • 375:   mChannel = aNewChannel;
netwerk/base/src/nsNetStrings.cpp
  • 38:  #include "nsChannelProperties.h"
  • 43:   : NS_LITERAL_STRING_INIT(kContentLength, NS_CHANNEL_PROP_CONTENT_LENGTH_STR),
  • 44:   NS_LITERAL_STRING_INIT(kContentDisposition, NS_CHANNEL_PROP_CONTENT_DISPOSITION_STR)
netwerk/base/src/nsInputStreamPump.h
  • 120:  #endif // !nsInputStreamChannel_h__
netwerk/base/src/nsURIChecker.h
  • 43:  #include "nsIChannel.h"
  • 45:  #include "nsIChannelEventSink.h"
  • 55:   public nsIChannelEventSink,
  • 67:   NS_DECL_NSICHANNELEVENTSINK
  • 71:   nsCOMPtr<nsIChannel> mChannel;
netwerk/base/public/nsIAuthPrompt2.idl
  • 41:  interface nsIChannel;
  • 76:   * @param aChannel
  • 77:   * The channel that requires authentication.
  • 96:   boolean promptAuth(in nsIChannel aChannel,
  • 117:   nsICancelable asyncPromptAuth(in nsIChannel aChannel,
netwerk/base/public/nsIStreamLoader.idl
  • 50:   * @param ctxt the context parameter of the underlying channel
  • 51:   * @param status the status of the underlying channel
  • 67:   * Asynchronously loads a channel into a memory buffer.
  • 71:   * on the channel with the nsIStreamLoader as the listener. The context
netwerk/base/public/nsIURIChecker.idl
  • 43:  interface nsIChannel;
  • 60:   * This method creates the channel that will be used to verify the URI.
  • 69:   * Returns the base channel that will be used to verify the URI.
  • 71:   readonly attribute nsIChannel baseChannel;
  • 76:   * OnStartRequest is fired, the baseChannel attribute will have been
  • 77:   * updated to reflect the final channel used (corresponding to any redirects
netwerk/base/public/nsIUnicharStreamLoader.idl
  • 43:  interface nsIChannel;
  • 52:   * @param aContext the context parameter of the underlying channel
  • 70:   * @param aContext the context parameter of the underlying channel
  • 71:   * @param aStatus the status of the underlying channel
  • 89:   * Asynchronously load a channel, converting the data to UTF-16.
  • 93:   * loaded. Then call asyncOpen() on the channel with the nsIUnicharStreamLoader
  • 114:   * The channel attribute is only valid inside the onDetermineCharset
  • 117:   readonly attribute nsIChannel channel;
netwerk/base/public/nsIFileURL.idl
  • 23:   * Darin Fisher <darin@netscape.com> (extracted from nsIFileChannel.idl)
netwerk/base/public/nsIIncrementalDownload.idl
  • 134:   * channel's notification callbacks, which allows it to provide a
  • 135:   * nsIAuthPrompt implementation if needed by the channel, for example.
netwerk/base/public/nsITraceableChannel.idl
  • 44:   * A channel implementing this interface allows one to intercept its data by
  • 48:  interface nsITraceableChannel : nsISupports
  • 51:   * Replace the channel's listener with a new one, and return the listener
  • 52:   * the channel used to have. The new listener intercepts OnStartRequest,
  • 55:   * the channel's listener, a chain of listeners is created.
  • 62:   * Note2: A channel may restrict when the listener can be replaced.
netwerk/base/public/nsIChannel.idl
  • 46:   * The nsIChannel interface allows clients to construct "GET" requests for
  • 47:   * specific protocols, and manage them in a uniform way. Once a channel is
  • 48:   * created (via nsIIOService::newChannel), parameters for that request may
  • 49:   * be set by using the channel attributes, or by QI'ing to a subclass of
  • 50:   * nsIChannel for protocol-specific parameters. Then, the URI can be fetched
  • 51:   * by calling nsIChannel::open or nsIChannel::asyncOpen.
  • 53:   * After a request has been completed, the channel is still valid for accessing
  • 54:   * protocol-specific results. For example, QI'ing to nsIHttpChannel allows
  • 60:  interface nsIChannel : nsIRequest
  • 63:   * The original URI used to construct the channel. This is used in
  • 71:   * from nsIHttpChannel).
  • 76:   * The URI corresponding to the channel. Its value is immutable.
  • 82:   * channel. Used by the security manager to grant or deny privileges to
  • 83:   * mobile code loaded from this channel.
  • 86:   * holding a strong reference to the channel, care must be taken to
  • 87:   * explicitly drop its reference to the channel.
  • 92:   * The notification callbacks for the channel. This is set by clients, who
  • 94:   * notifications. If this value is NULL, the channel implementation may use
  • 95:   * the notification callbacks from its load group. The channel may also
  • 102:   * When the channel is done, it must not continue holding references to
  • 105:   * NOTE: A channel implementation should take care when "caching" an
  • 113:   * Transport-level security information (if any) corresponding to the channel.
  • 118:   * The MIME type of the channel's content if available.
  • 124:   * Setting contentType before the channel has been opened provides a hint
  • 125:   * to the channel as to what the MIME type is. The channel may ignore this
  • 129:   * is called will override the type determined by the channel.
  • 138:   * the contentCharset attribute of the channel.
  • 140:   * Any implementation of nsIChannel must follow these rules.
  • 145:   * The character set of the channel's content if available and if applicable.
  • 153:   * The length of the data associated with the channel if available. A value
  • 157:   * as 64-bit value by QIing the channel to nsIPropertyBag2,
  • 158:   * if that interface is exposed by the channel.
  • 163:   * Synchronously open the channel.
  • 165:   * @return blocking input stream to the channel's data.
  • 167:   * NOTE: nsIChannel implementations are not required to implement this
  • 171:   * NOTE: Implementations should throw NS_ERROR_IN_PROGRESS if the channel
  • 177:   * Asynchronously open this channel. Data is fed to the specified stream
  • 181:   * channel promises to call at least onStartRequest and onStopRequest.
  • 184:   * this channel, an appropriate onChannelRedirect notification needs to be
  • 189:   * If the channel's and loadgroup's notification callbacks do not provide
  • 190:   * an nsIChannelEventSink when onChannelRedirect would be called, that's
  • 191:   * equivalent to having called onChannelRedirect.
  • 193:   * If asyncOpen returns successfully, the channel is responsible for
  • 195:   * called onChannelRedirect.
  • 201:   * channel is reopened.
  • 205:   * @see nsIChannelEventSink for onChannelRedirect
  • 210:   * Channel specific load flags:
  • 213:   * derivatives (e.g., see nsICachingChannel).
  • 217:   * Set (e.g., by the docshell) to indicate whether or not the channel
  • 229:   * This flag is set to indicate that this channel is replacing another
  • 230:   * channel. This means that:
  • 232:   * 1) the stream listener this channel will be notifying was initially
  • 233:   * passed to the asyncOpen method of some other channel
  • 237:   * 2) this channel's URI is a better identifier of the resource being
  • 238:   * accessed than this channel's originalURI.
  • 241:   * single channel has multiple parts to it (and thus can follow
  • 248:   * Set (e.g., by the docshell) to indicate whether or not the channel
  • 260:   * If this flag is set, the channel should call the content sniffers as
  • 263:   * Note: Channels may ignore this flag; however, new channel implementations
netwerk/base/public/nsINestedURI.idl
  • 52:   * and opening a channel on such a sanitize: URI gets the data from
netwerk/base/public/nsIRequest.idl
  • 62:   * (e.g. nsIChannel implementations are only pending once asyncOpen
netwerk/base/public/nsIProxiedProtocolHandler.idl
  • 41:  interface nsIChannel;
  • 48:   /** Create a new channel with the given proxyInfo
  • 51:   nsIChannel newProxiedChannel(in nsIURI uri, in nsIProxyInfo proxyInfo);
netwerk/base/public/nsIIOService.idl
  • 41:  interface nsIChannel;
  • 96:   * Creates a channel for a given URI.
  • 98:   * @param aURI nsIURI from which to make a channel
  • 99:   * @return reference to the new nsIChannel object
  • 101:   nsIChannel newChannelFromURI(in nsIURI aURI);
  • 104:   * Equivalent to newChannelFromURI(newURI(...))
  • 106:   nsIChannel newChannel(in AUTF8String aSpec,
netwerk/base/public/nsIChannelEventSink.idl
  • 44:  interface nsIChannel;
  • 47:   * Implement this interface to receive control over various channel events.
  • 48:   * Channels will try to get this interface from a channel's
  • 56:  interface nsIChannelEventSink : nsISupports
  • 60:   * continue to use the URI of the old channel.
  • 68:   * the URI of the new channel (This might be an HTTP 301 reponse).
  • 77:   * server, but is specific to the channel implementation.
  • 87:   * @param oldChannel
  • 88:   * The channel that's being redirected.
  • 89:   * @param newChannel
  • 90:   * The new channel. This channel is not opened yet.
  • 98:   * request for the new channel will be made.
  • 100:   void onChannelRedirect(in nsIChannel oldChannel,
  • 101:   in nsIChannel newChannel,
netwerk/base/public/nsIMultiPartChannel.idl
  • 41:  interface nsIChannel;
  • 44:   * An interface to access the the base channel
  • 45:   * associated with a MultiPartChannel.
  • 49:  interface nsIMultiPartChannel : nsISupports
  • 52:   * readonly attribute to access the underlying channel
  • 54:   readonly attribute nsIChannel baseChannel;
  • 70:   * Set to true when onStopRequest is received from the base channel.
netwerk/base/public/nsNetError.h
  • 114:   * Returned from nsIChannel::asyncOpen to indicate that OnDataAvailable will
  • 127:   * Implementations of nsIChannel::asyncOpen will commonly return this error
  • 128:   * if the channel has already been opened (and has not yet been closed).
  • 134:   * Returned from nsIChannel::asyncOpen when trying to open the channel again
  • 237:   * not a type expected by the channel (for nested channels such as the JAR
  • 238:   * channel).
  • 286:   * If a channel is configured to speak to a proxy server, then it will
netwerk/base/public/nsIUploadChannel.idl
  • 43:   * nsIUploadChannel
  • 45:   * A channel may optionally implement this interface if it supports the
  • 47:   * prior to the invocation of asyncOpen on the channel.
  • 52:  interface nsIUploadChannel : nsISupports
  • 55:   * Sets a stream to be uploaded by this channel.
  • 70:   * The stream to be uploaded by this channel.
  • 87:   * Get the stream (to be) uploaded by this channel.
netwerk/base/public/nsChannelProperties.h
  • 37:  #ifndef nsChannelProperties_h__
  • 38:  #define nsChannelProperties_h__
  • 47:   * This file contains constants for properties channels can expose.
  • 49:   * or nsIPropertyBag2 interface on a channel and reading the value.
  • 54:   * Content-Length of a channel. Used instead of the nsIChannel.contentLength
  • 59:  #define NS_CHANNEL_PROP_CONTENT_LENGTH_STR "content-length"
  • 62:   * MIME Content-Disposition header of channel.
  • 66:  #define NS_CHANNEL_PROP_CONTENT_DISPOSITION_STR "content-disposition"
  • 69:  #define NS_CHANNEL_PROP_CONTENT_LENGTH gNetStrings->kContentLength
  • 70:  #define NS_CHANNEL_PROP_CONTENT_DISPOSITION gNetStrings->kContentDisposition
  • 72:  #define NS_CHANNEL_PROP_CONTENT_LENGTH \
  • 73:   NS_LITERAL_STRING(NS_CHANNEL_PROP_CONTENT_LENGTH_STR)
  • 74:  #define NS_CHANNEL_PROP_CONTENT_DISPOSITION \
  • 75:   NS_LITERAL_STRING(NS_CHANNEL_PROP_CONTENT_DISPOSITION_STR)
netwerk/base/public/nsIProtocolHandler.idl
  • 41:  interface nsIChannel;
  • 98:   * Constructs a new channel from the given URI for this protocol handler.
  • 100:   nsIChannel newChannel(in nsIURI aURI);
  • 213:   * Loading channels from this protocol has side-effects that make
  • 219:   * Channels using this protocol never call OnDataAvailable
  • 252:   * ftp, etc.). nsIIOService::newChannelFromURI will feed URIs from this
netwerk/base/public/nsNetUtil.h
  • 64:  #include "nsIChannel.h"
  • 65:  #include "nsChannelProperties.h"
  • 66:  #include "nsIInputStreamChannel.h"
  • 69:  #include "nsIHttpChannel.h"
  • 100:  #include "nsIChannelEventSink.h"
  • 169:  NS_NewChannel(nsIChannel **result,
  • 180:   nsCOMPtr<nsIChannel> chan;
  • 181:   rv = ioService->NewChannelFromURI(uri, getter_AddRefs(chan));
  • 196:  // For now, works only with JARChannel. Future: with all channels that may
  • 197:  // have Content-Disposition header (JAR, nsIHttpChannel, and nsIMultiPartChannel).
  • 199:  NS_GetContentDisposition(nsIRequest *channel,
  • 202:   nsCOMPtr<nsIPropertyBag2> props(do_QueryInterface(channel));
  • 204:   return props->GetPropertyAsACString(NS_CHANNEL_PROP_CONTENT_DISPOSITION,
  • 220:   nsIChannel **channelOut = nsnull)
  • 223:   nsCOMPtr<nsIChannel> channel;
  • 224:   rv = NS_NewChannel(getter_AddRefs(channel), uri, ioService,
  • 228:   rv = channel->Open(&stream);
  • 231:   if (channelOut) {
  • 232:   *channelOut = nsnull;
  • 233:   channel.swap(*channelOut);
  • 250:   nsCOMPtr<nsIChannel> channel;
  • 251:   rv = NS_NewChannel(getter_AddRefs(channel), uri, ioService,
  • 254:   rv = channel->AsyncOpen(listener, context);
  • 387:  NS_NewInputStreamChannel(nsIChannel **result,
  • 394:   nsCOMPtr<nsIInputStreamChannel> isc =
  • 395:   do_CreateInstance(NS_INPUTSTREAMCHANNEL_CONTRACTID, &rv);
  • 402:   nsCOMPtr<nsIChannel> chan = do_QueryInterface(isc, &rv);
  • 417:  NS_NewInputStreamChannel(nsIChannel **result,
  • 422:   return NS_NewInputStreamChannel(result, uri, stream, contentType, nsnull);
  • 426:  NS_NewInputStreamChannel(nsIChannel **result,
  • 432:   return NS_NewInputStreamChannel(result, uri, stream, contentType,
  • 548:   nsCOMPtr<nsIChannel> channel;
  • 549:   rv = NS_NewChannel(getter_AddRefs(channel),
  • 556:   nsCOMPtr<nsIHttpChannel> httpChannel(do_QueryInterface(channel));
  • 557:   if (httpChannel)
  • 558:   httpChannel->SetReferrer(referrer);
  • 561:   rv = channel->AsyncOpen(*result, context);
  • 600:   * Implement the nsIChannel::Open(nsIInputStream**) method using the channel's
  • 607:  NS_ImplementChannelOpen(nsIChannel *channel,
  • 615:   rv = channel->AsyncOpen(listener, nsnull);
  • 751:   * Obtains the referrer for a given channel. This first tries to obtain the
  • 753:   * work and the channel is an nsIHTTPChannel, we check it's referrer property.
  • 758:  NS_GetReferrerFromChannel(nsIChannel *channel,
  • 764:   nsCOMPtr<nsIPropertyBag2> props(do_QueryInterface(channel));
  • 777:   // nsIHttpChannel (if we can QI to it)
  • 779:   nsCOMPtr<nsIHttpChannel> chan(do_QueryInterface(channel));
  • 1024:  // returns an input stream compatible with nsIUploadChannel::SetUploadStream()
  • 1103:   * querying interfaces from a channel's notification callbacks. It first
  • 1104:   * searches the channel's notificationCallbacks attribute, and if the interface
  • 1106:   * the channel's loadGroup.
  • 1109:  NS_QueryNotificationCallbacks(nsIChannel *channel,
  • 1113:   NS_PRECONDITION(channel, "null channel");
  • 1117:   channel->GetNotificationCallbacks(getter_AddRefs(cbs));
  • 1123:   channel->GetLoadGroup(getter_AddRefs(loadGroup));
  • 1134:  NS_QueryNotificationCallbacks(nsIChannel *channel,
  • 1137:   NS_QueryNotificationCallbacks(channel, NS_GET_TEMPLATE_IID(T),
  • 1143:   * nsIChannel implementations.
  • 1205:   * Gets an nsIAuthPrompt2 from a channel. Use this instead of
  • 1209:  NS_QueryAuthPrompt2(nsIChannel *aChannel,
  • 1214:   // We want to use any auth prompt we can find on the channel's callbacks,
  • 1217:   // that would prefer a loadgroup's nsIAuthPrompt2 over a channel's
  • 1220:   aChannel->GetNotificationCallbacks(getter_AddRefs(callbacks));
  • 1228:   aChannel->GetLoadGroup(getter_AddRefs(group));
  • 1260:  NS_QueryNotificationCallbacks(const nsCOMPtr<nsIChannel> &aChannel,
  • 1263:   NS_QueryNotificationCallbacks(aChannel.get(), aResult);
  • 1441:   * Get the "final" URI for a channel. This is either the same as GetURI or
  • 1442:   * GetOriginalURI, depending on whether this channel has
  • 1443:   * nsIChanel::LOAD_REPLACE set. For channels without that flag set, the final
  • 1445:   * channel URI.
  • 1448:  NS_GetFinalChannelURI(nsIChannel* channel, nsIURI** uri)
  • 1452:   nsresult rv = channel->GetLoadFlags(&loadFlags);
  • 1455:   if (loadFlags & nsIChannel::LOAD_REPLACE) {
  • 1456:   return channel->GetURI(uri);
  • 1459:   return channel->GetOriginalURI(uri);
  • 1601:  NS_IsInternalSameURIRedirect(nsIChannel *aOldChannel,
  • 1602:   nsIChannel *aNewChannel,
  • 1605:   if (!(aFlags & nsIChannelEventSink::REDIRECT_INTERNAL)) {
  • 1610:   aOldChannel->GetURI(getter_AddRefs(oldURI));
  • 1611:   aNewChannel->GetURI(getter_AddRefs(newURI));
netwerk/base/public/nsIApplicationCacheChannel.idl
  • 44:   * Interface implemented by channels that support application caches.
  • 47:  interface nsIApplicationCacheChannel : nsIApplicationCacheContainer
  • 58:   * When true, the channel will ask its notification callbacks for
  • 68:   * When true, the channel will choose an application cache if one
netwerk/base/public/nsIProgressEventSink.idl
  • 46:   * This interface is used to asynchronously convey channel status and progress
  • 47:   * information that is generally not critical to the processing of the channel.
  • 51:   * An implementation of this interface can be passed to a channel via the
  • 52:   * channel's notificationCallbacks attribute. See nsIChannel for more info.
  • 54:   * The channel will begin passing notifications to the progress event sink
  • 56:   * the channel calls its listener's onStopRequest method or once the channel
  • 59:   * NOTE: This interface is actually not specific to channels and may be used
  • 72:   * the request being observed (may QI to nsIChannel).
  • 74:   * if aRequest is a channel, then this parameter is the listener
  • 75:   * context passed to nsIChannel::asyncOpen.
  • 93:   * the request being observed (may QI to nsIChannel).
  • 95:   * if aRequest is a channel, then this parameter is the listener
  • 96:   * context passed to nsIChannel::asyncOpen.
  • 99:   * state of the channel (usually the state of the underlying
netwerk/base/public/nsIResumableChannel.idl
  • 42:  interface nsIResumableChannel : nsISupports {
  • 44:   * Prepare this channel for resuming. The request will not start until
  • 52:   * During OnStartRequest, this channel will have a status of
  • 56:   * Similarly, the status of this channel during OnStartRequest may be
netwerk/base/public/nsIProxiedChannel.idl
  • 43:   * An interface for accessing the proxy info that a channel was
  • 49:  interface nsIProxiedChannel : nsISupports
  • 52:   * Gets the proxy info the channel was constructed with. null or a
netwerk/base/public/nsIInputStreamChannel.idl
  • 38:  #include "nsIChannel.idl"
  • 43:   * nsIInputStreamChannel
  • 45:   * This interface provides methods to initialize an input stream channel.
  • 46:   * The input stream channel serves as a data pump for an input stream.
  • 49:  interface nsIInputStreamChannel : nsISupports
  • 52:   * Sets the URI for this channel. This must be called before the
  • 53:   * channel is opened, and it may only be called once.
  • 60:   * This stream contains the data that will be pushed to the channel's
  • 65:   * This attribute must be set before the channel is opened, and it may
  • 68:   * @throws NS_ERROR_IN_PROGRESS if the setter is called after the channel
netwerk/base/public/nsIEncodedChannel.idl
  • 42:   * A channel interface which allows special handling of encoded content
  • 46:  interface nsIEncodedChannel : nsISupports
  • 50:   * encodings on the channel. The enumerator returns nsISupportsCString
  • 52:   * channel and then we work our way inward. "identity" is skipped and not
  • 59:   * Modifying the Content-Encoding header on the channel will cause
netwerk/base/public/nsIProtocolProxyService.idl
  • 46:  interface nsIChannel;
  • 91:   * resolve may be passed to the newProxiedChannel method to create a
  • 92:   * nsIChannel to the given URI that uses the specified proxy.
  • 104:   * @see nsIProxiedProtocolHandler::newProxiedChannel
netwerk/base/public/nsICachingChannel.idl
  • 44:   * A channel may optionally implement this interface to allow clients
  • 54:  interface nsICachingChannel : nsISupports
  • 61:   * A cache token retrieved from a particular instance of nsICachingChannel
  • 62:   * could be set on another instance of nsICachingChannel provided the
  • 64:   * nsICachingChannel would be expected to only read from the cache entry
  • 83:   * for this channel. Holding a reference to this key does NOT prevent
  • 86:   * A cache key retrieved from a particular instance of nsICachingChannel
  • 87:   * could be set on another instance of nsICachingChannel provided the
  • 89:   * channel instance was created with the same URI. The implementation of
  • 90:   * nsICachingChannel would be expected to use the cache entry identified
  • 94:   * The cache key may be NULL indicating that the URI of the channel is
  • 103:   * is usually only settable during the processing of a channel's
  • 105:   * particular implementation of nsICachingChannel.
  • 113:   * opening the channel.
  • 131:   * TRUE if this channel's data is being loaded from the cache. This value
  • 132:   * is undefined before the channel fires its OnStartRequest notification
  • 133:   * and after the channel fires its OnStopRequest notification.
  • 138:   * Caching channel specific load flags:
  • 189:   * stream listener can check nsICachingChannel::isFromCache to determine
netwerk/base/public/nsISimpleStreamListener.idl
  • 52:   * @param aSink data will be read from the channel to this output stream.