michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- michael@0: * michael@0: * This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef nsIconChannel_h___ michael@0: #define nsIconChannel_h___ michael@0: michael@0: #include "mozilla/Attributes.h" michael@0: michael@0: #include "nsCOMPtr.h" michael@0: #include "nsXPIDLString.h" michael@0: #include "nsIChannel.h" michael@0: #include "nsILoadGroup.h" michael@0: #include "nsIInterfaceRequestor.h" michael@0: #include "nsIInterfaceRequestorUtils.h" michael@0: #include "nsIInputStreamPump.h" michael@0: #include "nsIStreamListener.h" michael@0: #include "nsIURI.h" michael@0: michael@0: class nsIFile; michael@0: michael@0: class nsIconChannel MOZ_FINAL : public nsIChannel, public nsIStreamListener michael@0: { michael@0: public: michael@0: NS_DECL_THREADSAFE_ISUPPORTS michael@0: NS_DECL_NSIREQUEST michael@0: NS_DECL_NSICHANNEL michael@0: NS_DECL_NSIREQUESTOBSERVER michael@0: NS_DECL_NSISTREAMLISTENER michael@0: michael@0: nsIconChannel(); michael@0: virtual ~nsIconChannel(); michael@0: michael@0: nsresult Init(nsIURI* uri); michael@0: michael@0: protected: michael@0: nsCOMPtr mUrl; michael@0: nsCOMPtr mOriginalURI; michael@0: int64_t mContentLength; michael@0: nsCOMPtr mLoadGroup; michael@0: nsCOMPtr mCallbacks; michael@0: nsCOMPtr mOwner; michael@0: michael@0: nsCOMPtr mPump; michael@0: nsCOMPtr mListener; michael@0: michael@0: nsresult MakeInputStream(nsIInputStream** _retval, bool nonBlocking); michael@0: michael@0: nsresult ExtractIconInfoFromUrl(nsIFile ** aLocalFile, uint32_t * aDesiredImageSize, michael@0: nsACString &aContentType, nsACString &aFileExtension); michael@0: }; michael@0: michael@0: #endif /* nsIconChannel_h___ */