Source code

Revision control

Other Tools

1
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
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
%{C++
10
namespace mozilla {
11
namespace net {
12
class ADivertableParentChannel;
13
}
14
}
15
%}
16
17
[ptr] native ADivertableParentChannelPtr(mozilla::net::ADivertableParentChannel);
18
19
/** When we are diverting messages from the child to the parent. The
20
* nsHttpChannel and nsFtpChannel must know that there is a ChannelParent to
21
* be able to suspend message delivery if the channel is suspended.
22
*/
23
[uuid(c073d79f-2503-4dff-ba87-d3071f8b433b)]
24
interface nsIChannelWithDivertableParentListener : nsISupports
25
{
26
/**
27
* Informs nsHttpChannel or nsFtpChannel that a ParentChannel starts
28
* diverting messages. During this time all suspend/resume calls to the
29
* channel must also suspend the ParentChannel by calling
30
* SuspendMessageDiversion/ResumeMessageDiversion.
31
*/
32
void MessageDiversionStarted(in ADivertableParentChannelPtr aParentChannel);
33
34
/**
35
* The message diversion has finished the calls to
36
* SuspendMessageDiversion/ResumeMessageDiversion are not necessary anymore.
37
*/
38
void MessageDiversionStop();
39
40
/**
41
* Internal versions of Suspend/Resume that suspend (or resume) the channel
42
* but do not suspend the ParentChannel's IPDL message queue.
43
*/
44
void SuspendInternal();
45
void ResumeInternal();
46
};