Backed out changeset 2450366cf7ca (bug 1891629) for causing win msix mochitest failures
[gecko.git] / dom / quota / PQuota.ipdl
blob0eb6fb11ed9ee12dff4657ed1a834d8c1f105c33
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 file,
3  * You can obtain one at http://mozilla.org/MPL/2.0/. */
5 include protocol PBackground;
6 include protocol PQuotaRequest;
7 include protocol PQuotaUsageRequest;
9 include PBackgroundSharedTypes;
11 include "mozilla/dom/quota/SerializationHelpers.h";
13 using mozilla::OriginAttributesPattern
14   from "mozilla/OriginAttributes.h";
16 using mozilla::dom::quota::PersistenceType
17   from "mozilla/dom/quota/PersistenceType.h";
19 using mozilla::dom::quota::Client::Type
20   from "mozilla/dom/quota/Client.h";
22 using mozilla::dom::ContentParentId
23   from "mozilla/dom/ipc/IdType.h";
25 namespace mozilla {
27 namespace ipc {
29 union BoolResponse
31   nsresult;
32   bool;
35 } // namespace ipc
37 namespace dom {
38 namespace quota {
40 struct StorageNameParams
44 struct InitializePersistentOriginParams
46   PrincipalInfo principalInfo;
49 struct InitializeTemporaryOriginParams
51   PersistenceType persistenceType;
52   PrincipalInfo principalInfo;
55 struct GetFullOriginMetadataParams
57   PersistenceType persistenceType;
58   PrincipalInfo principalInfo;
61 struct AllUsageParams
63   bool getAll;
66 struct OriginUsageParams
68   PrincipalInfo principalInfo;
69   bool fromMemory;
72 union UsageRequestParams
74   AllUsageParams;
75   OriginUsageParams;
78 struct ClearResetOriginParams
80   PrincipalInfo principalInfo;
81   PersistenceType persistenceType;
82   bool persistenceTypeIsExplicit;
83   Type clientType;
84   bool clientTypeIsExplicit;
87 struct ResetOriginParams
89   ClearResetOriginParams commonParams;
92 struct PersistedParams
94   PrincipalInfo principalInfo;
97 struct PersistParams
99   PrincipalInfo principalInfo;
102 struct EstimateParams
104   PrincipalInfo principalInfo;
107 struct ListOriginsParams
111 union RequestParams
113   StorageNameParams;
114   InitializePersistentOriginParams;
115   InitializeTemporaryOriginParams;
116   GetFullOriginMetadataParams;
117   ResetOriginParams;
118   PersistedParams;
119   PersistParams;
120   EstimateParams;
121   ListOriginsParams;
124 [ChildImpl=virtual, ParentImpl=virtual]
125 protocol PQuota
127   manager PBackground;
129   manages PQuotaRequest;
130   manages PQuotaUsageRequest;
132 parent:
133   async __delete__();
135   async PQuotaUsageRequest(UsageRequestParams params);
137   async PQuotaRequest(RequestParams params);
139   async StorageInitialized()
140       returns(BoolResponse response);
142   async TemporaryStorageInitialized()
143       returns(BoolResponse response);
145   async InitializeStorage()
146       returns(BoolResponse response);
148   async InitializePersistentClient(PrincipalInfo principalInfo,
149                                    Type clientType)
150       returns(BoolResponse response);
152   async InitializeTemporaryClient(PersistenceType persistenceType,
153                                   PrincipalInfo principalInfo,
154                                   Type clientType)
155       returns(BoolResponse response);
157   async InitializeTemporaryStorage()
158       returns(BoolResponse response);
160   async ClearStoragesForOrigin(PersistenceType? persistenceType,
161                                PrincipalInfo principalInfo,
162                                Type? clientType)
163       returns(BoolResponse response);
165   async ClearStoragesForOriginPrefix(PersistenceType? persistenceType,
166                                      PrincipalInfo principalInfo)
167       returns(BoolResponse response);
169   // This can only be called from some other thread in the parent process!
170   async ClearStoragesForOriginAttributesPattern(OriginAttributesPattern pattern)
171       returns(BoolResponse response);
173   async ClearStoragesForPrivateBrowsing()
174       returns(BoolResponse response);
176   async ClearStorage()
177       returns(BoolResponse response);
179   async ShutdownStorage()
180       returns(BoolResponse response);
182   async StartIdleMaintenance();
184   async StopIdleMaintenance();
186   async AbortOperationsForProcess(ContentParentId contentParentId);
189 } // namespace quota
190 } // namespace dom
191 } // namespace mozilla