no bug - Import translations from android-l10n r=release a=l10n CLOSED TREE
[gecko.git] / ipc / glue / PBackground.ipdl
blobd0fe4b173146be2d7309c5df0d63ba913bc14082
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 PIdleScheduler;
30 include protocol PRemoteWorker;
31 include protocol PRemoteWorkerController;
32 include protocol PRemoteWorkerService;
33 include protocol PSharedWorker;
34 include protocol PTemporaryIPCBlob;
35 include protocol PFileCreator;
36 include protocol PMessagePort;
37 include protocol PCameras;
38 include protocol PLockManager;
39 include protocol PMIDIManager;
40 include protocol PMIDIPort;
41 include protocol PQuota;
42 include protocol PServiceWorker;
43 include protocol PServiceWorkerContainer;
44 include protocol PServiceWorkerManager;
45 include protocol PServiceWorkerRegistration;
46 include protocol PWebAuthnTransaction;
47 include protocol PUDPSocket;
48 include protocol PVsync;
49 include protocol PRemoteDecoderManager;
50 include protocol PWebTransport;
51 include protocol PFetch;
53 include ClientIPCTypes;
54 include DOMTypes;
55 include IPCBlob;
56 include IPCServiceWorkerDescriptor;
57 include IPCServiceWorkerRegistrationDescriptor;
58 include PBackgroundLSSharedTypes;
59 include PBackgroundSharedTypes;
60 include PBackgroundIDBSharedTypes;
61 include PFileSystemParams;
62 include ProtocolTypes;
63 include RemoteWorkerTypes;
64 include MIDITypes;
66 include "mozilla/dom/cache/IPCUtils.h";
67 include "mozilla/dom/quota/SerializationHelpers.h";
68 include "mozilla/dom/PermissionMessageUtils.h";
69 include "mozilla/layers/LayersMessageUtils.h";
71 using mozilla::dom::cache::Namespace
72   from "mozilla/dom/cache/Types.h";
74 using class mozilla::dom::SSCacheCopy from "mozilla/dom/PBackgroundSessionStorageCache.h";
76 using mozilla::RemoteDecodeIn from "mozilla/RemoteDecoderManagerChild.h";
78 using mozilla::camera::CamerasAccessStatus from "mozilla/media/CamerasTypes.h";
80 namespace mozilla {
81 namespace ipc {
83 [NeedsOtherPid, ChildImpl=virtual, ParentImpl=virtual, ChildProc=anydom]
84 sync protocol PBackground
86   manages PBackgroundIDBFactory;
87   manages PBackgroundIndexedDBUtils;
88   manages PBackgroundSDBConnection;
89   manages PBackgroundLSDatabase;
90   manages PBackgroundLSObserver;
91   manages PBackgroundLSRequest;
92   manages PBackgroundLSSimpleRequest;
93   manages PBackgroundLocalStorageCache;
94   manages PBackgroundSessionStorageManager;
95   manages PBackgroundSessionStorageService;
96   manages PBackgroundStorage;
97   manages PBackgroundTest;
98   manages PBroadcastChannel;
99   manages PCache;
100   manages PCacheStorage;
101   manages PCacheStreamControl;
102   manages PClientManager;
103   manages PEndpointForReport;
104   manages PFileSystemRequest;
105   manages PGamepadEventChannel;
106   manages PGamepadTestChannel;
107   manages PHttpBackgroundChannel;
108   manages PIdleScheduler;
109   manages PLockManager;
110   manages PRemoteWorker;
111   manages PRemoteWorkerController;
112   manages PRemoteWorkerService;
113   manages PSharedWorker;
114   manages PTemporaryIPCBlob;
115   manages PFileCreator;
116   manages PMessagePort;
117   manages PCameras;
118   manages PQuota;
119   manages PServiceWorker;
120   manages PServiceWorkerContainer;
121   manages PServiceWorkerManager;
122   manages PServiceWorkerRegistration;
123   manages PWebAuthnTransaction;
124   manages PUDPSocket;
125   manages PVsync;
126   manages PFetch;
128 parent:
129   // Only called at startup during mochitests to check the basic infrastructure.
130   async PBackgroundTest(nsCString testArg);
132   async PBackgroundIDBFactory(LoggingInfo loggingInfo,
133                               nsCString systemLocale);
135   async PBackgroundIndexedDBUtils();
137   // Use only for testing!
138   async FlushPendingFileDeletions();
140   async PBackgroundSDBConnection(PersistenceType persistenceType,
141                                  PrincipalInfo principalInfo);
143   async PBackgroundLSDatabase(PrincipalInfo principalInfo,
144                               uint32_t privateBrowsingId,
145                               uint64_t datastoreId);
147   async PBackgroundLSObserver(uint64_t observerId);
149   /**
150    * Issue an asynchronous request that will be used in a synchronous fashion
151    * through complex machinations described in `PBackgroundLSRequest.ipdl` and
152    * `LSObject.h`.
153    */
154   async PBackgroundLSRequest(LSRequestParams params);
156   /**
157    * Issues a simple, non-cancelable asynchronous request that's used in an
158    * asynchronous fashion by callers.  (LSRequest is not simple because it used
159    * in a synchronous fashion which leads to complexities regarding cancelation,
160    * see `PBackgroundLSRequest.ipdl` for details.)
161    */
162   async PBackgroundLSSimpleRequest(LSSimpleRequestParams params);
164   async PBackgroundLocalStorageCache(PrincipalInfo principalInfo,
165                                      nsCString originKey,
166                                      uint32_t privateBrowsingId);
168   async PBackgroundSessionStorageManager(uint64_t aTopContextId);
170   async PBackgroundSessionStorageService();
172   async PBackgroundStorage(nsString profilePath, uint32_t privateBrowsingId);
174   /**
175    * Finish the setup of a new PFileSystemManager top level protocol.
176    */
177   async CreateFileSystemManagerParent(
178       PrincipalInfo principalInfo,
179       Endpoint<PFileSystemManagerParent> aParentEndpoint)
180       returns(nsresult rv);
182   /**
183    * Finish the setup of a new PWebTransport top level protocol.
184    */
185   async CreateWebTransportParent(
186       nsString aURL,
187       nullable nsIPrincipal aPrincipal,
188       IPCClientInfo?  aClientInfo,
189       bool aDedicated,
190       bool aRequireUnreliable,
191       uint32_t aCongestionControl,
192       WebTransportHash[] aServerCertHashes,
193       Endpoint<PWebTransportParent> aParentEndpoint)
194       returns(nsresult rv, uint8_t aReliability); // Actually WebTransportReliabityMode enum
196   async PVsync();
198   async PCameras();
200   async PUDPSocket(PrincipalInfo? pInfo, nsCString filter);
201   async PBroadcastChannel(PrincipalInfo pInfo, nsCString origin, nsString channel);
203   async PServiceWorkerManager();
205   async ShutdownServiceWorkerRegistrar();
207   async PCacheStorage(Namespace aNamespace, PrincipalInfo aPrincipalInfo);
209   async PMessagePort(nsID uuid, nsID destinationUuid, uint32_t sequenceId);
211   async MessagePortForceClose(nsID uuid, nsID destinationUuid, uint32_t sequenceId);
213   async PQuota();
215   async ShutdownQuotaManager();
217   async ShutdownBackgroundSessionStorageManagers();
219   async PropagateBackgroundSessionStorageManager(uint64_t currentTopContextId, uint64_t targetTopContextId);
221   async RemoveBackgroundSessionStorageManager(uint64_t topContextId);
223   async GetSessionStorageManagerData(
224       uint64_t aTopContextId, uint32_t aSizeLimit, bool aCancelSessionStoreTimer)
225       returns(SSCacheCopy[] aCacheCopy);
227   async LoadSessionStorageManagerData(uint64_t aTopContextId, SSCacheCopy[] aOriginCacheCopy);
229   async PFileSystemRequest(FileSystemParams params);
231   async PGamepadEventChannel();
233   async PGamepadTestChannel();
235   async PHttpBackgroundChannel(uint64_t channelId);
237   async PWebAuthnTransaction();
239   async PSharedWorker(RemoteWorkerData data,
240                       uint64_t windowID,
241                       MessagePortIdentifier portIdentifier);
243   async PTemporaryIPCBlob();
245   async PFileCreator(nsString aFullPath, nsString aType, nsString aName,
246                      int64_t? lastModified, bool aExistenceCheck,
247                      bool aIsFromNsIFile);
249   async PClientManager();
251   async CreateMIDIManager(Endpoint<PMIDIManagerParent> aEndpoint);
252   async CreateMIDIPort(Endpoint<PMIDIPortParent> aEndpoint,
253                        MIDIPortInfo portInfo, bool sysexEnabled);
254   async HasMIDIDevice() returns (bool hasDevice);
256   // This method is used to propagate storage activities from the child actor
257   // to the parent actor. See StorageActivityService.
258   async StorageActivity(PrincipalInfo principalInfo);
260   async PServiceWorker(IPCServiceWorkerDescriptor aDescriptor);
262   async PRemoteWorkerController(RemoteWorkerData aData);
264   async PRemoteWorkerService();
266   async PServiceWorkerContainer();
268   async PServiceWorkerRegistration(IPCServiceWorkerRegistrationDescriptor aDescriptor);
270   async PEndpointForReport(nsString aGroupName, PrincipalInfo aPrincipalInfo);
272   async RemoveEndpoint(nsString aGroupName, nsCString aEndpointURL,
273                        PrincipalInfo aPrincipalInfo);
275   async PIdleScheduler();
277   async EnsureRDDProcessAndCreateBridge()
278       returns (nsresult rv, Endpoint<PRemoteDecoderManagerChild> aEndpoint);
280   async EnsureUtilityProcessAndCreateBridge(RemoteDecodeIn aLocation)
281       returns (nsresult rv, Endpoint<PRemoteDecoderManagerChild> aEndpoint);
283   async PLockManager(nsIPrincipal aPrincipalInfo, nsID aClientId);
285   async PFetch();
287   async RequestCameraAccess(bool aAllowPermissionRequest) returns (CamerasAccessStatus rv);
289 child:
290   async PCache();
291   async PCacheStreamControl();
293   async PRemoteWorker(RemoteWorkerData data);
296 } // namespace ipc
297 } // namespace mozilla