Source code

Revision control

Other Tools

1
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2
/* vim:set ts=2 sw=2 sts=2 et cindent: */
3
/* This Source Code Form is subject to the terms of the Mozilla Public
4
* License, v. 2.0. If a copy of the MPL was not distributed with this
5
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6
7
#include "nsISupports.idl"
8
9
interface nsIChannel;
10
interface nsIProxyInfo;
11
interface nsICancelable;
12
13
/**
14
* This interface serves as a closure for nsIProtocolProxyService's
15
* asyncResolve method.
16
*/
17
[scriptable, uuid(fbb6eff6-0cc2-4d99-8d6f-0a12b462bdeb)]
18
interface nsIProtocolProxyCallback : nsISupports
19
{
20
/**
21
* This method is called when proxy info is available or when an error
22
* in the proxy resolution occurs.
23
*
24
* @param aRequest
25
* The value returned from asyncResolve.
26
* @param aChannel
27
* The channel passed to asyncResolve.
28
* @param aProxyInfo
29
* The resulting proxy info or null if there is no associated proxy
30
* info for aURI. As with the result of nsIProtocolProxyService's
31
* resolve method, a null result implies that a direct connection
32
* should be used.
33
* @param aStatus
34
* The status of the callback. This is a failure code if the request
35
* could not be satisfied, in which case the value of aStatus
36
* indicates the reason for the failure and aProxyInfo will be null.
37
*/
38
void onProxyAvailable(in nsICancelable aRequest,
39
in nsIChannel aChannel,
40
in nsIProxyInfo aProxyInfo,
41
in nsresult aStatus);
42
};