Line data Source code
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/. */
4 :
5 : #ifndef nsStreamListenerTee_h__
6 : #define nsStreamListenerTee_h__
7 :
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 :
15 : namespace mozilla {
16 : namespace net {
17 :
18 : class nsStreamListenerTee : public nsIStreamListenerTee
19 : , public nsIThreadRetargetableStreamListener
20 : {
21 : public:
22 : NS_DECL_THREADSAFE_ISUPPORTS
23 : NS_DECL_NSIREQUESTOBSERVER
24 : NS_DECL_NSISTREAMLISTENER
25 : NS_DECL_NSITHREADRETARGETABLESTREAMLISTENER
26 : NS_DECL_NSISTREAMLISTENERTEE
27 :
28 2 : nsStreamListenerTee() { }
29 :
30 : private:
31 6 : virtual ~nsStreamListenerTee() { }
32 :
33 : nsCOMPtr<nsIInputStreamTee> mInputTee;
34 : nsCOMPtr<nsIOutputStream> mSink;
35 : nsCOMPtr<nsIStreamListener> mListener;
36 : nsCOMPtr<nsIRequestObserver> mObserver;
37 : nsCOMPtr<nsIEventTarget> mEventTarget;
38 : };
39 :
40 : } // namespace net
41 : } // namespace mozilla
42 :
43 : #endif
|