2012-04-25 05:54:42 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
|
2012-05-21 04:12:37 -07:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2012-04-25 05:54:42 -07:00
|
|
|
|
|
|
|
#ifndef mozilla_net_NullHttpTransaction_h
|
|
|
|
#define mozilla_net_NullHttpTransaction_h
|
|
|
|
|
|
|
|
#include "nsAHttpTransaction.h"
|
|
|
|
#include "nsAHttpConnection.h"
|
|
|
|
#include "nsIInterfaceRequestor.h"
|
|
|
|
#include "nsHttpConnectionInfo.h"
|
|
|
|
#include "nsHttpRequestHead.h"
|
2012-06-05 20:18:25 -07:00
|
|
|
#include "mozilla/Attributes.h"
|
2012-04-25 05:54:42 -07:00
|
|
|
|
|
|
|
// This is the minimal nsAHttpTransaction implementation. A NullHttpTransaction
|
|
|
|
// can be used to drive connection level semantics (such as SSL handshakes
|
|
|
|
// tunnels) so that a nsHttpConnection becomes fully established in
|
2012-06-22 12:06:00 -07:00
|
|
|
// anticipation of a real transaction needing to use it soon.
|
2012-04-25 05:54:42 -07:00
|
|
|
|
|
|
|
namespace mozilla { namespace net {
|
|
|
|
|
2012-06-05 20:18:25 -07:00
|
|
|
class NullHttpTransaction MOZ_FINAL : public nsAHttpTransaction
|
2012-04-25 05:54:42 -07:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_NSAHTTPTRANSACTION
|
|
|
|
|
|
|
|
NullHttpTransaction(nsHttpConnectionInfo *ci,
|
|
|
|
nsIInterfaceRequestor *callbacks,
|
2012-11-29 17:34:35 -08:00
|
|
|
uint32_t caps);
|
2012-04-25 05:54:42 -07:00
|
|
|
~NullHttpTransaction();
|
|
|
|
|
|
|
|
nsHttpConnectionInfo *ConnectionInfo() { return mConnectionInfo; }
|
|
|
|
|
2012-06-21 18:14:40 -07:00
|
|
|
// An overload of nsAHttpTransaction::IsNullTransaction()
|
|
|
|
bool IsNullTransaction() { return true; }
|
|
|
|
|
2012-04-25 05:54:42 -07:00
|
|
|
private:
|
|
|
|
|
|
|
|
nsresult mStatus;
|
2012-11-29 17:34:35 -08:00
|
|
|
uint32_t mCaps;
|
2012-04-25 05:54:42 -07:00
|
|
|
nsRefPtr<nsAHttpConnection> mConnection;
|
|
|
|
nsCOMPtr<nsIInterfaceRequestor> mCallbacks;
|
|
|
|
nsRefPtr<nsHttpConnectionInfo> mConnectionInfo;
|
|
|
|
nsHttpRequestHead *mRequestHead;
|
2012-05-22 13:12:40 -07:00
|
|
|
bool mIsDone;
|
2012-04-25 05:54:42 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
}} // namespace mozilla::net
|
|
|
|
|
|
|
|
#endif // mozilla_net_NullHttpTransaction_h
|