image/decoders/icon/mac/nsIconChannel.h

changeset 0
6474c204b198
equal deleted inserted replaced
-1:000000000000 0:35ce01dced9a
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2 *
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6
7 #ifndef nsIconChannel_h___
8 #define nsIconChannel_h___
9
10 #include "mozilla/Attributes.h"
11
12 #include "nsCOMPtr.h"
13 #include "nsXPIDLString.h"
14 #include "nsIChannel.h"
15 #include "nsILoadGroup.h"
16 #include "nsIInterfaceRequestor.h"
17 #include "nsIInterfaceRequestorUtils.h"
18 #include "nsIInputStreamPump.h"
19 #include "nsIStreamListener.h"
20 #include "nsIURI.h"
21
22 class nsIFile;
23
24 class nsIconChannel MOZ_FINAL : public nsIChannel, public nsIStreamListener
25 {
26 public:
27 NS_DECL_THREADSAFE_ISUPPORTS
28 NS_DECL_NSIREQUEST
29 NS_DECL_NSICHANNEL
30 NS_DECL_NSIREQUESTOBSERVER
31 NS_DECL_NSISTREAMLISTENER
32
33 nsIconChannel();
34 virtual ~nsIconChannel();
35
36 nsresult Init(nsIURI* uri);
37
38 protected:
39 nsCOMPtr<nsIURI> mUrl;
40 nsCOMPtr<nsIURI> mOriginalURI;
41 int64_t mContentLength;
42 nsCOMPtr<nsILoadGroup> mLoadGroup;
43 nsCOMPtr<nsIInterfaceRequestor> mCallbacks;
44 nsCOMPtr<nsISupports> mOwner;
45
46 nsCOMPtr<nsIInputStreamPump> mPump;
47 nsCOMPtr<nsIStreamListener> mListener;
48
49 nsresult MakeInputStream(nsIInputStream** _retval, bool nonBlocking);
50
51 nsresult ExtractIconInfoFromUrl(nsIFile ** aLocalFile, uint32_t * aDesiredImageSize,
52 nsACString &aContentType, nsACString &aFileExtension);
53 };
54
55 #endif /* nsIconChannel_h___ */

mercurial