Merge mozilla-central to autoland. CLOSED TREE
[gecko.git] / netwerk / base / nsStreamListenerTee.h
blob87328e02cd5b69c7f00792c6dec3f3d1c6f0a51d
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #ifndef nsStreamListenerTee_h__
6 #define nsStreamListenerTee_h__
8 #include "nsIStreamListenerTee.h"
9 #include "nsIThreadRetargetableStreamListener.h"
10 #include "nsIInputStreamTee.h"
11 #include "nsIOutputStream.h"
12 #include "nsCOMPtr.h"
13 #include "nsIEventTarget.h"
14 #include "nsIMultiPartChannel.h"
16 namespace mozilla {
17 namespace net {
19 class nsStreamListenerTee : public nsIStreamListenerTee,
20 public nsIMultiPartChannelListener {
21 public:
22 NS_DECL_THREADSAFE_ISUPPORTS
23 NS_DECL_NSIREQUESTOBSERVER
24 NS_DECL_NSISTREAMLISTENER
25 NS_DECL_NSITHREADRETARGETABLESTREAMLISTENER
26 NS_DECL_NSISTREAMLISTENERTEE
27 NS_DECL_NSIMULTIPARTCHANNELLISTENER
29 nsStreamListenerTee() = default;
31 private:
32 virtual ~nsStreamListenerTee() = default;
34 nsCOMPtr<nsIInputStreamTee> mInputTee;
35 nsCOMPtr<nsIOutputStream> mSink;
36 nsCOMPtr<nsIStreamListener> mListener;
37 nsCOMPtr<nsIRequestObserver> mObserver;
38 nsCOMPtr<nsIEventTarget> mEventTarget;
39 bool mIsMultiPart = false;
42 } // namespace net
43 } // namespace mozilla
45 #endif