Bug 1796811 - Update in-tree zlib to version 1.2.13. r=aosmond
[gecko.git] / ipc / glue / PBackground.ipdl
blob24c6ea3b6cf739b815bd5eca3496b94b49ecba9b
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2  * License, v. 2.0. If a copy of the MPL was not distributed with this
3  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 include protocol PBackgroundDataBridge;
6 include protocol PBackgroundIDBFactory;
7 include protocol PBackgroundIndexedDBUtils;
8 include protocol PBackgroundSDBConnection;
9 include protocol PBackgroundLSDatabase;
10 include protocol PBackgroundLSObserver;
11 include protocol PBackgroundLSRequest;
12 include protocol PBackgroundLSSimpleRequest;
13 include protocol PBackgroundLocalStorageCache;
14 include protocol PBackgroundSessionStorageManager;
15 include protocol PBackgroundSessionStorageService;
16 include protocol PBackgroundStorage;
17 include protocol PBackgroundTest;
18 include protocol PBroadcastChannel;
19 include protocol PCache;
20 include protocol PCacheStorage;
21 include protocol PCacheStreamControl;
22 include protocol PClientManager;
23 include protocol PEndpointForReport;
24 include protocol PFileSystemManager;
25 include protocol PFileSystemRequest;
26 include protocol PGamepadEventChannel;
27 include protocol PGamepadTestChannel;
28 include protocol PHttpBackgroundChannel;
29 include protocol PIPCClientCerts;
30 include protocol PIdleScheduler;
31 include protocol PMediaTransport;
32 include protocol PRemoteWorker;
33 include protocol PRemoteWorkerController;
34 include protocol PRemoteWorkerService;
35 include protocol PSharedWorker;
36 include protocol PTemporaryIPCBlob;
37 include protocol PFileCreator;
38 include protocol PMessagePort;
39 include protocol PCameras;
40 include protocol PLockManager;
41 include protocol PMIDIManager;
42 include protocol PMIDIPort;
43 include protocol PQuota;
44 include protocol PSelectTLSClientAuthCert;
45 include protocol PServiceWorker;
46 include protocol PServiceWorkerContainer;
47 include protocol PServiceWorkerManager;
48 include protocol PServiceWorkerRegistration;
49 include protocol PWebAuthnTransaction;
50 include protocol PUDPSocket;
51 include protocol PVerifySSLServerCert;
52 include protocol PVsync;
53 include protocol PRemoteDecoderManager;
54 include protocol PWebSocketConnection;
56 include DOMTypes;
57 include IPCBlob;
58 include IPCServiceWorkerDescriptor;
59 include IPCServiceWorkerRegistrationDescriptor;
60 include PBackgroundLSSharedTypes;
61 include PBackgroundSharedTypes;
62 include PBackgroundIDBSharedTypes;
63 include PFileSystemParams;
64 include ProtocolTypes;
65 include PSMIPCTypes;
66 include RemoteWorkerTypes;
67 include MIDITypes;
69 include "mozilla/dom/cache/IPCUtils.h";
70 include "mozilla/dom/quota/SerializationHelpers.h";
71 include "mozilla/dom/PermissionMessageUtils.h";
72 include "mozilla/layers/LayersMessageUtils.h";
74 using mozilla::dom::cache::Namespace
75   from "mozilla/dom/cache/Types.h";
77 using class mozilla::dom::SSCacheCopy from "mozilla/dom/PBackgroundSessionStorageCache.h";
79 using mozilla::RemoteDecodeIn from "mozilla/RemoteDecoderManagerChild.h";
81 namespace mozilla {
82 namespace ipc {
84 [NeedsOtherPid, ChildImpl=virtual, ParentImpl=virtual]
85 sync protocol PBackground
87   manages PBackgroundDataBridge;
88   manages PBackgroundIDBFactory;
89   manages PBackgroundIndexedDBUtils;
90   manages PBackgroundSDBConnection;
91   manages PBackgroundLSDatabase;
92   manages PBackgroundLSObserver;
93   manages PBackgroundLSRequest;
94   manages PBackgroundLSSimpleRequest;
95   manages PBackgroundLocalStorageCache;
96   manages PBackgroundSessionStorageManager;
97   manages PBackgroundSessionStorageService;
98   manages PBackgroundStorage;
99   manages PBackgroundTest;
100   manages PBroadcastChannel;
101   manages PCache;
102   manages PCacheStorage;
103   manages PCacheStreamControl;
104   manages PClientManager;
105   manages PEndpointForReport;
106   manages PFileSystemRequest;
107   manages PGamepadEventChannel;
108   manages PGamepadTestChannel;
109   manages PHttpBackgroundChannel;
110   manages PIPCClientCerts;
111   manages PIdleScheduler;
112   manages PLockManager;
113   manages PMediaTransport;
114   manages PRemoteWorker;
115   manages PRemoteWorkerController;
116   manages PRemoteWorkerService;
117   manages PSharedWorker;
118   manages PTemporaryIPCBlob;
119   manages PFileCreator;
120   manages PMessagePort;
121   manages PCameras;
122   manages PMIDIManager;
123   manages PMIDIPort;
124   manages PQuota;
125   manages PSelectTLSClientAuthCert;
126   manages PServiceWorker;
127   manages PServiceWorkerContainer;
128   manages PServiceWorkerManager;
129   manages PServiceWorkerRegistration;
130   manages PWebAuthnTransaction;
131   manages PWebSocketConnection;
132   manages PUDPSocket;
133   manages PVerifySSLServerCert;
134   manages PVsync;
136 parent:
137   // Only called at startup during mochitests to check the basic infrastructure.
138   async PBackgroundTest(nsCString testArg);
140   async PBackgroundDataBridge(uint64_t channelID);
142   async PBackgroundIDBFactory(LoggingInfo loggingInfo);
144   async PBackgroundIndexedDBUtils();
146   // Use only for testing!
147   async FlushPendingFileDeletions();
149   async PBackgroundSDBConnection(PersistenceType persistenceType,
150                                  PrincipalInfo principalInfo);
152   async PBackgroundLSDatabase(PrincipalInfo principalInfo,
153                               uint32_t privateBrowsingId,
154                               uint64_t datastoreId);
156   async PBackgroundLSObserver(uint64_t observerId);
158   /**
159    * Issue an asynchronous request that will be used in a synchronous fashion
160    * through complex machinations described in `PBackgroundLSRequest.ipdl` and
161    * `LSObject.h`.
162    */
163   async PBackgroundLSRequest(LSRequestParams params);
165   /**
166    * Issues a simple, non-cancelable asynchronous request that's used in an
167    * asynchronous fashion by callers.  (LSRequest is not simple because it used
168    * in a synchronous fashion which leads to complexities regarding cancelation,
169    * see `PBackgroundLSRequest.ipdl` for details.)
170    */
171   async PBackgroundLSSimpleRequest(LSSimpleRequestParams params);
173   /**
174    * Asynchronously propagates the "last-pb-context-exited" observer
175    * notification to LocalStorage NextGen implementation so it can clear
176    * retained private-browsing in-memory Datastores.  Using a (same-process)
177    * IPC message avoids the need for the main-thread nsIObserver to have a
178    * reference to the PBackground thread and directly dispatch a runnable to it.
179    */
180   async LSClearPrivateBrowsing();
182   async PBackgroundLocalStorageCache(PrincipalInfo principalInfo,
183                                      nsCString originKey,
184                                      uint32_t privateBrowsingId);
186   async PBackgroundSessionStorageManager(uint64_t aTopContextId);
188   async PBackgroundSessionStorageService();
190   async PBackgroundStorage(nsString profilePath, uint32_t privateBrowsingId);
192   /**
193    * Finish the setup of a new PFileSystemManager top level protocol.
194    */
195   async CreateFileSystemManagerParent(
196       PrincipalInfo principalInfo,
197       Endpoint<PFileSystemManagerParent> aParentEndpoint)
198       returns(nsresult rv);
200   async PVsync();
202   async PCameras();
204   async PUDPSocket(PrincipalInfo? pInfo, nsCString filter);
205   async PBroadcastChannel(PrincipalInfo pInfo, nsCString origin, nsString channel);
207   async PServiceWorkerManager();
209   async ShutdownServiceWorkerRegistrar();
211   async PCacheStorage(Namespace aNamespace, PrincipalInfo aPrincipalInfo);
213   async PMessagePort(nsID uuid, nsID destinationUuid, uint32_t sequenceId);
215   async MessagePortForceClose(nsID uuid, nsID destinationUuid, uint32_t sequenceId);
217   async PQuota();
219   async ShutdownQuotaManager();
221   async ShutdownBackgroundSessionStorageManagers();
223   async PropagateBackgroundSessionStorageManager(uint64_t currentTopContextId, uint64_t targetTopContextId);
225   async RemoveBackgroundSessionStorageManager(uint64_t topContextId);
227   async GetSessionStorageManagerData(
228       uint64_t aTopContextId, uint32_t aSizeLimit, bool aCancelSessionStoreTimer)
229       returns(SSCacheCopy[] aCacheCopy);
231   async LoadSessionStorageManagerData(uint64_t aTopContextId, SSCacheCopy[] aOriginCacheCopy);
233   async PFileSystemRequest(FileSystemParams params);
235   async PGamepadEventChannel();
237   async PGamepadTestChannel();
239   async PHttpBackgroundChannel(uint64_t channelId);
241   async PWebAuthnTransaction();
243   async PSharedWorker(RemoteWorkerData data,
244                       uint64_t windowID,
245                       MessagePortIdentifier portIdentifier);
247   async PTemporaryIPCBlob();
249   async PFileCreator(nsString aFullPath, nsString aType, nsString aName,
250                      int64_t? lastModified, bool aExistenceCheck,
251                      bool aIsFromNsIFile);
253   async PClientManager();
255   async PMIDIManager();
256   async PMIDIPort(MIDIPortInfo portInfo, bool sysexEnabled);
258   // This method is used to propagate storage activities from the child actor
259   // to the parent actor. See StorageActivityService.
260   async StorageActivity(PrincipalInfo principalInfo);
262   async PServiceWorker(IPCServiceWorkerDescriptor aDescriptor);
264   async PRemoteWorkerController(RemoteWorkerData aData);
266   async PRemoteWorkerService();
268   async PServiceWorkerContainer();
270   async PServiceWorkerRegistration(IPCServiceWorkerRegistrationDescriptor aDescriptor);
272   async PEndpointForReport(nsString aGroupName, PrincipalInfo aPrincipalInfo);
274   async RemoveEndpoint(nsString aGroupName, nsCString aEndpointURL,
275                        PrincipalInfo aPrincipalInfo);
277   async PIdleScheduler();
279   async PMediaTransport();
281   async PSelectTLSClientAuthCert(nsCString aHostName,
282                                  OriginAttributes aOriginAttributes,
283                                  int32_t aPort,
284                                  uint32_t aProviderFlags,
285                                  uint32_t aProviderTlsFlags,
286                                  ByteArray aServerCertBytes,
287                                  ByteArray[] aCANames);
289   async PVerifySSLServerCert(ByteArray[] aPeerCertChain,
290                              nsCString aHostName,
291                              int32_t aPort,
292                              OriginAttributes aOriginAttributes,
293                              ByteArray? aStapledOCSPResponse,
294                              ByteArray? aSctsFromTLSExtension,
295                              DelegatedCredentialInfoArg? aDcInfo,
296                              uint32_t aProviderFlags,
297                              uint32_t aCertVerifierFlags);
299   async EnsureRDDProcessAndCreateBridge()
300       returns (nsresult rv, Endpoint<PRemoteDecoderManagerChild> aEndpoint);
302   async EnsureUtilityProcessAndCreateBridge(RemoteDecodeIn aLocation)
303       returns (nsresult rv, Endpoint<PRemoteDecoderManagerChild> aEndpoint);
305   async PWebSocketConnection(uint32_t aListenerId);
307   async PLockManager(ContentPrincipalInfo aPrincipalInfo, nsID aClientId);
309   async PIPCClientCerts();
311 child:
312   async PCache();
313   async PCacheStreamControl();
315   async PRemoteWorker(RemoteWorkerData data);
318 } // namespace ipc
319 } // namespace mozilla