netwerk/base/src/nsURIChecker.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/netwerk/base/src/nsURIChecker.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,47 @@
     1.4 +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
     1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.8 +
     1.9 +#ifndef nsURIChecker_h__
    1.10 +#define nsURIChecker_h__
    1.11 +
    1.12 +#include "nsIURIChecker.h"
    1.13 +#include "nsIChannel.h"
    1.14 +#include "nsIStreamListener.h"
    1.15 +#include "nsIChannelEventSink.h"
    1.16 +#include "nsIInterfaceRequestor.h"
    1.17 +#include "nsCOMPtr.h"
    1.18 +
    1.19 +//-----------------------------------------------------------------------------
    1.20 +
    1.21 +class nsURIChecker : public nsIURIChecker,
    1.22 +                     public nsIStreamListener,
    1.23 +                     public nsIChannelEventSink,
    1.24 +                     public nsIInterfaceRequestor
    1.25 +{
    1.26 +public:
    1.27 +    nsURIChecker();
    1.28 +    virtual ~nsURIChecker() {}
    1.29 +
    1.30 +    NS_DECL_ISUPPORTS
    1.31 +    NS_DECL_NSIURICHECKER
    1.32 +    NS_DECL_NSIREQUEST
    1.33 +    NS_DECL_NSIREQUESTOBSERVER
    1.34 +    NS_DECL_NSISTREAMLISTENER
    1.35 +    NS_DECL_NSICHANNELEVENTSINK
    1.36 +    NS_DECL_NSIINTERFACEREQUESTOR
    1.37 +
    1.38 +protected:
    1.39 +    nsCOMPtr<nsIChannel>         mChannel;
    1.40 +    nsCOMPtr<nsIRequestObserver> mObserver;
    1.41 +    nsCOMPtr<nsISupports>        mObserverContext;
    1.42 +    nsresult                     mStatus;
    1.43 +    bool                         mIsPending;
    1.44 +    bool                         mAllowHead;
    1.45 +
    1.46 +    void     SetStatusAndCallBack(nsresult aStatus);
    1.47 +    nsresult CheckStatus();
    1.48 +};
    1.49 +
    1.50 +#endif // nsURIChecker_h__

mercurial