summaryrefslogtreecommitdiffstats
path: root/netwerk/ipc/PNecko.ipdl
blob: d9d88352cc29efe5d3d1d6c7ecae057864677eb6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set sw=2 ts=8 et tw=80 ft=cpp : */

/* 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/. */

include protocol PContent;
include protocol PHttpChannel;
include protocol PCookieService;
include protocol PBrowser;
include protocol PWyciwygChannel;
include protocol PFTPChannel;
include protocol PWebSocket;
include protocol PWebSocketEventListener;
include protocol PTCPSocket;
include protocol PTCPServerSocket;
include protocol PUDPSocket;
include protocol PDNSRequest;
include protocol PChannelDiverter;
include protocol PBlob; //FIXME: bug #792908
include protocol PFileDescriptorSet;
include protocol PDataChannel;
include protocol PTransportProvider;
include protocol PSendStream;

include protocol PRtspController;
include protocol PRtspChannel;
include URIParams;
include InputStreamParams;
include NeckoChannelParams;
include PBrowserOrId;
include protocol PAltDataOutputStream;

using class IPC::SerializedLoadContext from "SerializedLoadContext.h";
using mozilla::dom::TabId from "mozilla/dom/ipc/IdType.h";
using class IPC::Principal from "mozilla/dom/PermissionMessageUtils.h";

namespace mozilla {
namespace net {

//-------------------------------------------------------------------
nested(upto inside_cpow) sync protocol PNecko
{
  manager PContent;
  manages PHttpChannel;
  manages PCookieService;
  manages PWyciwygChannel;
  manages PFTPChannel;
  manages PWebSocket;
  manages PWebSocketEventListener;
  manages PTCPSocket;
  manages PTCPServerSocket;
  manages PUDPSocket;
  manages PDNSRequest;
  manages PDataChannel;
  manages PRtspController;
  manages PRtspChannel;
  manages PChannelDiverter;
  manages PTransportProvider;
  manages PAltDataOutputStream;

parent:
  async __delete__();

  nested(inside_cpow) async PCookieService();
  async PHttpChannel(PBrowserOrId browser,
                     SerializedLoadContext loadContext,
                     HttpChannelCreationArgs args);
  async PWyciwygChannel();
  async PFTPChannel(PBrowserOrId browser, SerializedLoadContext loadContext,
                    FTPChannelCreationArgs args);

  async PWebSocket(PBrowserOrId browser, SerializedLoadContext loadContext,
                   uint32_t aSerialID);
  async PTCPServerSocket(uint16_t localPort, uint16_t backlog, bool useArrayBuffers);
  async PUDPSocket(Principal principal, nsCString filter);

  async PDNSRequest(nsCString hostName, uint32_t flags, nsCString networkInterface);

  async PWebSocketEventListener(uint64_t aInnerWindowID);

  /* Predictor Methods */
  async PredPredict(OptionalURIParams targetURI, OptionalURIParams sourceURI,
                    uint32_t reason, SerializedLoadContext loadContext,
                    bool hasVerifier);
  async PredLearn(URIParams targetURI, OptionalURIParams sourceURI,
                  uint32_t reason, SerializedLoadContext loadContext);
  async PredReset();

  async SpeculativeConnect(URIParams uri, Principal principal, bool anonymous);
  async HTMLDNSPrefetch(nsString hostname, uint16_t flags);
  async CancelHTMLDNSPrefetch(nsString hostname, uint16_t flags, nsresult reason);

  /**
   * channelId is used to establish a connection between redirect channels in
   * the parent and the child when we're redirecting to a data: URI.
   */
  async PDataChannel(uint32_t channelId);

  async PRtspController();
  async PRtspChannel(RtspChannelConnectArgs args);
  async PChannelDiverter(ChannelDiverterArgs channel);

  /**
   * These are called from the child with the results of the auth prompt.
   * callbackId is the id that was passed in PBrowser::AsyncAuthPrompt,
   * corresponding to an nsIAuthPromptCallback
   */
  async OnAuthAvailable(uint64_t callbackId, nsString user,
                        nsString password, nsString domain);
  async OnAuthCancelled(uint64_t callbackId, bool userCancel);

  async RemoveRequestContext(nsCString rcid);

  async PAltDataOutputStream(nsCString type, PHttpChannel channel);

child:
  /*
   * Bring up the http auth prompt for a nested remote mozbrowser.
   * NestedFrameId is the id corresponding to the PBrowser.  It is the same id
   * that was passed to the PBrowserOrId param in to the PHttpChannel constructor
   */
  async AsyncAuthPromptForNestedFrame(TabId nestedFrameId, nsCString uri,
                                      nsString realm, uint64_t callbackId);

  /* Predictor Methods */
  async PredOnPredictPrefetch(URIParams uri, uint32_t httpStatus);
  async PredOnPredictPreconnect(URIParams uri);
  async PredOnPredictDNS(URIParams uri);

  async SpeculativeConnectRequest();

  async PTransportProvider();

both:
  // Actually we need PTCPSocket() for parent. But ipdl disallows us having different
  // signatures on parent and child. So when constructing the parent side object, we just 
  // leave host/port unused.
  async PTCPSocket(nsString host, uint16_t port);
};


} // namespace net
} // namespace mozilla