netwerk/base/src/nsSyncStreamListener.h

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     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 nsSyncStreamListener_h__
     6 #define nsSyncStreamListener_h__
     8 #include "nsISyncStreamListener.h"
     9 #include "nsIInputStream.h"
    10 #include "nsIOutputStream.h"
    11 #include "nsCOMPtr.h"
    12 #include "mozilla/Attributes.h"
    14 //-----------------------------------------------------------------------------
    16 class nsSyncStreamListener MOZ_FINAL : public nsISyncStreamListener
    17                                      , public nsIInputStream
    18 {
    19 public:
    20     NS_DECL_ISUPPORTS
    21     NS_DECL_NSIREQUESTOBSERVER
    22     NS_DECL_NSISTREAMLISTENER
    23     NS_DECL_NSISYNCSTREAMLISTENER
    24     NS_DECL_NSIINPUTSTREAM
    26     nsSyncStreamListener()
    27         : mStatus(NS_OK)
    28         , mKeepWaiting(false)
    29         , mDone(false) {}
    31     nsresult Init();
    33 private:
    34     ~nsSyncStreamListener() {}
    36     nsresult WaitForData();
    38     nsCOMPtr<nsIInputStream>    mPipeIn;
    39     nsCOMPtr<nsIOutputStream>   mPipeOut;
    40     nsresult                    mStatus;
    41     bool                        mKeepWaiting;
    42     bool                        mDone;
    43 };
    45 #endif // nsSyncStreamListener_h__

mercurial