netwerk/base/src/nsStreamListenerTee.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/netwerk/base/src/nsStreamListenerTee.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,36 @@
     1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.7 +
     1.8 +#ifndef nsStreamListenerTee_h__
     1.9 +#define nsStreamListenerTee_h__
    1.10 +
    1.11 +#include "nsIStreamListenerTee.h"
    1.12 +#include "nsIThreadRetargetableStreamListener.h"
    1.13 +#include "nsIInputStreamTee.h"
    1.14 +#include "nsIOutputStream.h"
    1.15 +#include "nsCOMPtr.h"
    1.16 +#include "nsIEventTarget.h"
    1.17 +
    1.18 +class nsStreamListenerTee : public nsIStreamListenerTee
    1.19 +                          , public nsIThreadRetargetableStreamListener
    1.20 +{
    1.21 +public:
    1.22 +    NS_DECL_THREADSAFE_ISUPPORTS
    1.23 +    NS_DECL_NSIREQUESTOBSERVER
    1.24 +    NS_DECL_NSISTREAMLISTENER
    1.25 +    NS_DECL_NSITHREADRETARGETABLESTREAMLISTENER
    1.26 +    NS_DECL_NSISTREAMLISTENERTEE
    1.27 +
    1.28 +    nsStreamListenerTee() { }
    1.29 +    virtual ~nsStreamListenerTee() { }
    1.30 +
    1.31 +private:
    1.32 +    nsCOMPtr<nsIInputStreamTee>  mInputTee;
    1.33 +    nsCOMPtr<nsIOutputStream>    mSink;
    1.34 +    nsCOMPtr<nsIStreamListener>  mListener;
    1.35 +    nsCOMPtr<nsIRequestObserver> mObserver;
    1.36 +    nsCOMPtr<nsIEventTarget>     mEventTarget;
    1.37 +};
    1.38 +
    1.39 +#endif

mercurial