michael@0: /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "nsISupports.idl" michael@0: michael@0: interface nsIURI; michael@0: interface nsIInterfaceRequestor; michael@0: michael@0: [scriptable, uuid(fa580a8d-f4a4-47c5-8ade-4f9786e8d1de)] michael@0: interface nsISpeculativeConnect : nsISupports michael@0: { michael@0: /** michael@0: * Called as a hint to indicate a new transaction for the URI is likely coming michael@0: * soon. The implementer may use this information to start a TCP michael@0: * and/or SSL level handshake for that resource immediately so that it is michael@0: * ready and/or progressed when the transaction is actually submitted. michael@0: * michael@0: * No obligation is taken on by the implementer, nor is the submitter obligated michael@0: * to actually open the new channel. michael@0: * michael@0: * @param aURI the URI of the hinted transaction michael@0: * @param aCallbacks any security callbacks for use with SSL for interfaces michael@0: * such as nsIBadCertListener. May be null. michael@0: * michael@0: */ michael@0: void speculativeConnect(in nsIURI aURI, michael@0: in nsIInterfaceRequestor aCallbacks); michael@0: michael@0: }; michael@0: michael@0: /** michael@0: * This is used to override the default values for various values (documented michael@0: * inline) to determine whether or not to actually make a speculative michael@0: * connection. michael@0: */ michael@0: [builtinclass, uuid(2b6d6fb6-ab28-4f4c-af84-bfdbb7866d72)] michael@0: interface nsISpeculativeConnectionOverrider : nsISupports michael@0: { michael@0: /** michael@0: * Used to determine the maximum number of unused speculative connections michael@0: * we will have open for a host at any one time michael@0: */ michael@0: [infallible] readonly attribute unsigned long parallelSpeculativeConnectLimit; michael@0: michael@0: /** michael@0: * Used to loosen the restrictions nsHttpConnectionMgr::RestrictConnections michael@0: * to allow more speculative connections when we're unsure if a host will michael@0: * connect via SPDY or not. michael@0: */ michael@0: [infallible] readonly attribute boolean ignorePossibleSpdyConnections; michael@0: michael@0: /** michael@0: * Used to determine if we will ignore the existence of any currently idle michael@0: * connections when we decide whether or not to make a speculative michael@0: * connection. michael@0: */ michael@0: [infallible] readonly attribute boolean ignoreIdle; michael@0: };