1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/netwerk/base/public/nsIProtocolProxyCallback.idl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,42 @@ 1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.5 +/* vim:set ts=2 sw=2 sts=2 et cindent: */ 1.6 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.7 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.8 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.9 + 1.10 +#include "nsISupports.idl" 1.11 + 1.12 +interface nsIChannel; 1.13 +interface nsIProxyInfo; 1.14 +interface nsICancelable; 1.15 + 1.16 +/** 1.17 + * This interface serves as a closure for nsIProtocolProxyService's 1.18 + * asyncResolve method. 1.19 + */ 1.20 +[scriptable, uuid(fbb6eff6-0cc2-4d99-8d6f-0a12b462bdeb)] 1.21 +interface nsIProtocolProxyCallback : nsISupports 1.22 +{ 1.23 + /** 1.24 + * This method is called when proxy info is available or when an error 1.25 + * in the proxy resolution occurs. 1.26 + * 1.27 + * @param aRequest 1.28 + * The value returned from asyncResolve. 1.29 + * @param aChannel 1.30 + * The channel passed to asyncResolve. 1.31 + * @param aProxyInfo 1.32 + * The resulting proxy info or null if there is no associated proxy 1.33 + * info for aURI. As with the result of nsIProtocolProxyService's 1.34 + * resolve method, a null result implies that a direct connection 1.35 + * should be used. 1.36 + * @param aStatus 1.37 + * The status of the callback. This is a failure code if the request 1.38 + * could not be satisfied, in which case the value of aStatus 1.39 + * indicates the reason for the failure and aProxyInfo will be null. 1.40 + */ 1.41 + void onProxyAvailable(in nsICancelable aRequest, 1.42 + in nsIChannel aChannel, 1.43 + in nsIProxyInfo aProxyInfo, 1.44 + in nsresult aStatus); 1.45 +};