2007-03-22 10:30:00 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
|
|
|
*
|
2012-05-21 04:12:37 -07:00
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
#ifndef nsIconChannel_h___
|
|
|
|
#define nsIconChannel_h___
|
|
|
|
|
2012-01-02 12:23:41 -08:00
|
|
|
#include "mozilla/Attributes.h"
|
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
#include "nsCOMPtr.h"
|
|
|
|
#include "nsXPIDLString.h"
|
|
|
|
#include "nsIChannel.h"
|
|
|
|
#include "nsILoadGroup.h"
|
|
|
|
#include "nsIInterfaceRequestor.h"
|
|
|
|
#include "nsIInterfaceRequestorUtils.h"
|
|
|
|
#include "nsIURI.h"
|
|
|
|
#include "nsIInputStreamPump.h"
|
|
|
|
#include "nsIStreamListener.h"
|
|
|
|
|
|
|
|
class nsIFile;
|
|
|
|
|
2012-01-02 12:23:41 -08:00
|
|
|
class nsIconChannel MOZ_FINAL : public nsIChannel, public nsIStreamListener
|
2007-03-22 10:30:00 -07:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_NSIREQUEST
|
|
|
|
NS_DECL_NSICHANNEL
|
|
|
|
NS_DECL_NSIREQUESTOBSERVER
|
|
|
|
NS_DECL_NSISTREAMLISTENER
|
|
|
|
|
|
|
|
nsIconChannel();
|
|
|
|
virtual ~nsIconChannel();
|
|
|
|
|
|
|
|
nsresult Init(nsIURI* uri);
|
|
|
|
|
|
|
|
protected:
|
|
|
|
nsCOMPtr<nsIURI> mUrl;
|
|
|
|
nsCOMPtr<nsIURI> mOriginalURI;
|
2012-10-22 10:51:07 -07:00
|
|
|
int64_t mContentLength;
|
2007-03-22 10:30:00 -07:00
|
|
|
nsCOMPtr<nsILoadGroup> mLoadGroup;
|
|
|
|
nsCOMPtr<nsIInterfaceRequestor> mCallbacks;
|
|
|
|
nsCOMPtr<nsISupports> mOwner;
|
|
|
|
|
|
|
|
nsCOMPtr<nsIInputStreamPump> mPump;
|
|
|
|
nsCOMPtr<nsIStreamListener> mListener;
|
|
|
|
|
2012-08-22 08:56:38 -07:00
|
|
|
nsresult ExtractIconInfoFromUrl(nsIFile ** aLocalFile, uint32_t * aDesiredImageSize, nsACString &aContentType, nsACString &aFileExtension);
|
2011-09-28 23:19:26 -07:00
|
|
|
nsresult MakeInputStream(nsIInputStream** _retval, bool nonBlocking);
|
2007-03-22 10:30:00 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
#define ID_ICO_FILE 5800
|
|
|
|
#define ID_ICO_FOLDER 5801
|
|
|
|
|
|
|
|
#endif /* nsIconChannel_h___ */
|