image/decoders/icon/qt/nsIconChannel.h

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 /* vim:set ts=2 sw=2 sts=2 cin et: */
michael@0 2 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 3 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 5
michael@0 6 #ifndef nsIconChannel_h_
michael@0 7 #define nsIconChannel_h_
michael@0 8
michael@0 9 #include "mozilla/Attributes.h"
michael@0 10
michael@0 11 #include "nsIChannel.h"
michael@0 12 #include "nsIStreamListener.h"
michael@0 13 #include "nsIURI.h"
michael@0 14 #include "nsIIconURI.h"
michael@0 15 #include "nsCOMPtr.h"
michael@0 16
michael@0 17 /**
michael@0 18 * This class is the gnome implementation of nsIconChannel. It basically asks
michael@0 19 * qt for an icon, and creates a new channel for
michael@0 20 * that file to which all calls will be proxied.
michael@0 21 */
michael@0 22 class nsIconChannel MOZ_FINAL : public nsIChannel {
michael@0 23 public:
michael@0 24 NS_DECL_ISUPPORTS
michael@0 25 NS_FORWARD_NSIREQUEST(mRealChannel->)
michael@0 26 NS_FORWARD_NSICHANNEL(mRealChannel->)
michael@0 27
michael@0 28 nsIconChannel() {}
michael@0 29 ~nsIconChannel() {}
michael@0 30
michael@0 31 /**
michael@0 32 * Called by nsIconProtocolHandler after it creates this channel.
michael@0 33 * Must be called before calling any other function on this object.
michael@0 34 * If this method fails, no other function must be called on this object.
michael@0 35 */
michael@0 36 NS_HIDDEN_(nsresult) Init(nsIURI* aURI);
michael@0 37 private:
michael@0 38 /**
michael@0 39 * The channel to the temp icon file (e.g. to /tmp/2qy9wjqw.html).
michael@0 40 * Will always be non-null after a successful Init.
michael@0 41 */
michael@0 42 nsCOMPtr<nsIChannel> mRealChannel;
michael@0 43 };
michael@0 44
michael@0 45 #endif

mercurial