image/decoders/icon/mac/nsIconChannel.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/image/decoders/icon/mac/nsIconChannel.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,55 @@
     1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*-
     1.5 + *
     1.6 + * This Source Code Form is subject to the terms of the Mozilla Public
     1.7 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.8 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.9 +
    1.10 +#ifndef nsIconChannel_h___
    1.11 +#define nsIconChannel_h___
    1.12 +
    1.13 +#include "mozilla/Attributes.h"
    1.14 +
    1.15 +#include "nsCOMPtr.h"
    1.16 +#include "nsXPIDLString.h"
    1.17 +#include "nsIChannel.h"
    1.18 +#include "nsILoadGroup.h"
    1.19 +#include "nsIInterfaceRequestor.h"
    1.20 +#include "nsIInterfaceRequestorUtils.h"
    1.21 +#include "nsIInputStreamPump.h"
    1.22 +#include "nsIStreamListener.h"
    1.23 +#include "nsIURI.h"
    1.24 +
    1.25 +class nsIFile;
    1.26 +
    1.27 +class nsIconChannel MOZ_FINAL : public nsIChannel, public nsIStreamListener
    1.28 +{
    1.29 +public:
    1.30 +  NS_DECL_THREADSAFE_ISUPPORTS
    1.31 +  NS_DECL_NSIREQUEST
    1.32 +  NS_DECL_NSICHANNEL
    1.33 +  NS_DECL_NSIREQUESTOBSERVER
    1.34 +  NS_DECL_NSISTREAMLISTENER
    1.35 +
    1.36 +  nsIconChannel();
    1.37 +  virtual ~nsIconChannel();
    1.38 +
    1.39 +  nsresult Init(nsIURI* uri);
    1.40 +
    1.41 +protected:
    1.42 +  nsCOMPtr<nsIURI> mUrl;
    1.43 +  nsCOMPtr<nsIURI> mOriginalURI;
    1.44 +  int64_t          mContentLength;
    1.45 +  nsCOMPtr<nsILoadGroup> mLoadGroup;
    1.46 +  nsCOMPtr<nsIInterfaceRequestor> mCallbacks;
    1.47 +  nsCOMPtr<nsISupports>  mOwner; 
    1.48 +  
    1.49 +  nsCOMPtr<nsIInputStreamPump> mPump;
    1.50 +  nsCOMPtr<nsIStreamListener>  mListener;
    1.51 +  
    1.52 +  nsresult MakeInputStream(nsIInputStream** _retval, bool nonBlocking);
    1.53 +  
    1.54 +  nsresult ExtractIconInfoFromUrl(nsIFile ** aLocalFile, uint32_t * aDesiredImageSize,
    1.55 +                           nsACString &aContentType, nsACString &aFileExtension);
    1.56 +};
    1.57 +
    1.58 +#endif /* nsIconChannel_h___ */

mercurial