2015-11-22 12:43:55 +03:00
|
|
|
/* 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 PBackground;
|
|
|
|
include protocol PQuotaRequest;
|
|
|
|
include protocol PQuotaUsageRequest;
|
|
|
|
|
|
|
|
include PBackgroundSharedTypes;
|
|
|
|
|
|
|
|
include "mozilla/dom/quota/SerializationHelpers.h";
|
|
|
|
|
2019-02-23 19:39:49 +03:00
|
|
|
using mozilla::OriginAttributesPattern
|
|
|
|
from "mozilla/OriginAttributes.h";
|
|
|
|
|
2015-11-22 12:43:55 +03:00
|
|
|
using mozilla::dom::quota::PersistenceType
|
|
|
|
from "mozilla/dom/quota/PersistenceType.h";
|
|
|
|
|
2018-11-29 23:47:58 +03:00
|
|
|
using mozilla::dom::quota::Client::Type
|
|
|
|
from "mozilla/dom/quota/Client.h";
|
|
|
|
|
2019-02-23 19:17:21 +03:00
|
|
|
using mozilla::dom::ContentParentId
|
|
|
|
from "mozilla/dom/ipc/IdType.h";
|
|
|
|
|
2015-11-22 12:43:55 +03:00
|
|
|
namespace mozilla {
|
2023-09-12 15:40:40 +03:00
|
|
|
|
|
|
|
namespace ipc {
|
|
|
|
|
|
|
|
union BoolResponse
|
|
|
|
{
|
|
|
|
nsresult;
|
|
|
|
bool;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace ipc
|
|
|
|
|
2015-11-22 12:43:55 +03:00
|
|
|
namespace dom {
|
|
|
|
namespace quota {
|
|
|
|
|
2020-05-05 09:25:18 +03:00
|
|
|
struct StorageNameParams
|
|
|
|
{
|
|
|
|
};
|
|
|
|
|
2020-11-19 17:38:17 +03:00
|
|
|
struct InitializePersistentOriginParams
|
|
|
|
{
|
|
|
|
PrincipalInfo principalInfo;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct InitializeTemporaryOriginParams
|
|
|
|
{
|
|
|
|
PersistenceType persistenceType;
|
|
|
|
PrincipalInfo principalInfo;
|
|
|
|
};
|
|
|
|
|
2021-09-22 22:08:33 +03:00
|
|
|
struct GetFullOriginMetadataParams
|
|
|
|
{
|
|
|
|
PersistenceType persistenceType;
|
|
|
|
PrincipalInfo principalInfo;
|
|
|
|
};
|
|
|
|
|
2017-03-22 14:14:04 +03:00
|
|
|
struct AllUsageParams
|
|
|
|
{
|
|
|
|
bool getAll;
|
|
|
|
};
|
|
|
|
|
2017-03-22 14:13:48 +03:00
|
|
|
struct OriginUsageParams
|
2015-11-22 12:43:55 +03:00
|
|
|
{
|
|
|
|
PrincipalInfo principalInfo;
|
2019-08-22 23:51:09 +03:00
|
|
|
bool fromMemory;
|
2015-11-22 12:43:55 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
union UsageRequestParams
|
|
|
|
{
|
2017-03-22 14:14:04 +03:00
|
|
|
AllUsageParams;
|
2017-03-22 14:13:48 +03:00
|
|
|
OriginUsageParams;
|
2015-11-22 12:43:55 +03:00
|
|
|
};
|
|
|
|
|
2018-11-29 23:48:11 +03:00
|
|
|
struct ClearResetOriginParams
|
2015-11-22 12:43:55 +03:00
|
|
|
{
|
|
|
|
PrincipalInfo principalInfo;
|
|
|
|
PersistenceType persistenceType;
|
|
|
|
bool persistenceTypeIsExplicit;
|
2018-11-29 23:47:58 +03:00
|
|
|
Type clientType;
|
|
|
|
bool clientTypeIsExplicit;
|
2018-11-29 23:48:11 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
struct ResetOriginParams
|
|
|
|
{
|
|
|
|
ClearResetOriginParams commonParams;
|
2015-11-22 12:43:55 +03:00
|
|
|
};
|
|
|
|
|
2016-08-25 05:19:31 +03:00
|
|
|
struct PersistedParams
|
|
|
|
{
|
|
|
|
PrincipalInfo principalInfo;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct PersistParams
|
|
|
|
{
|
|
|
|
PrincipalInfo principalInfo;
|
|
|
|
};
|
|
|
|
|
2019-08-22 23:51:09 +03:00
|
|
|
struct EstimateParams
|
|
|
|
{
|
|
|
|
PrincipalInfo principalInfo;
|
|
|
|
};
|
|
|
|
|
2019-10-02 10:57:52 +03:00
|
|
|
struct ListOriginsParams
|
2019-03-20 20:54:08 +03:00
|
|
|
{
|
|
|
|
};
|
|
|
|
|
2015-11-22 12:43:55 +03:00
|
|
|
union RequestParams
|
|
|
|
{
|
2020-05-05 09:25:18 +03:00
|
|
|
StorageNameParams;
|
2020-11-19 17:38:17 +03:00
|
|
|
InitializePersistentOriginParams;
|
|
|
|
InitializeTemporaryOriginParams;
|
2021-09-22 22:08:33 +03:00
|
|
|
GetFullOriginMetadataParams;
|
2018-11-29 23:48:11 +03:00
|
|
|
ResetOriginParams;
|
2016-08-25 05:19:31 +03:00
|
|
|
PersistedParams;
|
|
|
|
PersistParams;
|
2019-08-22 23:51:09 +03:00
|
|
|
EstimateParams;
|
2019-10-02 10:57:52 +03:00
|
|
|
ListOriginsParams;
|
2015-11-22 12:43:55 +03:00
|
|
|
};
|
|
|
|
|
2024-01-19 23:23:20 +03:00
|
|
|
[ChildImpl=virtual, ParentImpl=virtual]
|
2015-11-22 12:43:55 +03:00
|
|
|
protocol PQuota
|
|
|
|
{
|
|
|
|
manager PBackground;
|
|
|
|
|
|
|
|
manages PQuotaRequest;
|
|
|
|
manages PQuotaUsageRequest;
|
|
|
|
|
|
|
|
parent:
|
2016-01-27 00:51:53 +03:00
|
|
|
async __delete__();
|
2015-11-22 12:43:55 +03:00
|
|
|
|
2016-01-27 00:51:53 +03:00
|
|
|
async PQuotaUsageRequest(UsageRequestParams params);
|
2015-11-22 12:43:55 +03:00
|
|
|
|
2016-01-27 00:51:53 +03:00
|
|
|
async PQuotaRequest(RequestParams params);
|
2015-11-22 12:43:55 +03:00
|
|
|
|
2023-12-08 08:55:03 +03:00
|
|
|
async StorageInitialized()
|
|
|
|
returns(BoolResponse response);
|
|
|
|
|
|
|
|
async TemporaryStorageInitialized()
|
|
|
|
returns(BoolResponse response);
|
|
|
|
|
2023-09-13 19:41:56 +03:00
|
|
|
async InitializeStorage()
|
|
|
|
returns(BoolResponse response);
|
2023-10-12 17:55:59 +03:00
|
|
|
|
|
|
|
async InitializePersistentClient(PrincipalInfo principalInfo,
|
|
|
|
Type clientType)
|
|
|
|
returns(BoolResponse response);
|
|
|
|
|
|
|
|
async InitializeTemporaryClient(PersistenceType persistenceType,
|
|
|
|
PrincipalInfo principalInfo,
|
|
|
|
Type clientType)
|
|
|
|
returns(BoolResponse response);
|
2023-12-08 08:55:05 +03:00
|
|
|
|
|
|
|
async InitializeTemporaryStorage()
|
|
|
|
returns(BoolResponse response);
|
2023-09-13 19:41:56 +03:00
|
|
|
|
2023-09-25 19:28:38 +03:00
|
|
|
async ClearStoragesForOrigin(PersistenceType? persistenceType,
|
|
|
|
PrincipalInfo principalInfo,
|
2023-09-25 19:28:39 +03:00
|
|
|
Type? clientType)
|
2023-09-25 19:28:38 +03:00
|
|
|
returns(BoolResponse response);
|
|
|
|
|
2023-09-25 19:28:38 +03:00
|
|
|
async ClearStoragesForOriginPrefix(PersistenceType? persistenceType,
|
|
|
|
PrincipalInfo principalInfo)
|
|
|
|
returns(BoolResponse response);
|
|
|
|
|
2023-09-25 19:28:38 +03:00
|
|
|
// This can only be called from some other thread in the parent process!
|
|
|
|
async ClearStoragesForOriginAttributesPattern(OriginAttributesPattern pattern)
|
|
|
|
returns(BoolResponse response);
|
|
|
|
|
2023-07-14 12:51:15 +03:00
|
|
|
async ClearStoragesForPrivateBrowsing()
|
|
|
|
returns(BoolResponse response);
|
|
|
|
|
2023-09-12 15:40:40 +03:00
|
|
|
async ClearStorage()
|
|
|
|
returns(BoolResponse response);
|
|
|
|
|
2023-09-12 15:40:40 +03:00
|
|
|
async ShutdownStorage()
|
|
|
|
returns(BoolResponse response);
|
|
|
|
|
2016-01-27 00:51:53 +03:00
|
|
|
async StartIdleMaintenance();
|
2015-11-22 12:43:55 +03:00
|
|
|
|
2016-01-27 00:51:53 +03:00
|
|
|
async StopIdleMaintenance();
|
2019-02-23 19:17:21 +03:00
|
|
|
|
|
|
|
async AbortOperationsForProcess(ContentParentId contentParentId);
|
2015-11-22 12:43:55 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace quota
|
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|