dom/quota/PQuota.ipdl
author Jan Varga <jan.varga@gmail.com>
Wed, 15 May 2019 06:11:11 +0200
changeset 2008607 2f6ae2152532743a874910d9dc3eccb49aced9ca
parent 1877686 203d88b181067af0b69cf94f9aa68ecefbc1f976
child 2166997 8a36c8986d0efccabd7379b732aea559de91e23a
child 2176161 fca850fefd22b862003c297fe57c728e81d735f1
permissions -rw-r--r--
Bug 1546723 - Part 5: Generalize code for getting datastores; r=asuth Differential Revision: https://phabricator.services.mozilla.com/D31200

/* 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";

using mozilla::OriginAttributesPattern
  from "mozilla/OriginAttributes.h";

using mozilla::dom::quota::PersistenceType
  from "mozilla/dom/quota/PersistenceType.h";

using mozilla::dom::quota::Client::Type
  from "mozilla/dom/quota/Client.h";

using mozilla::dom::ContentParentId
  from "mozilla/dom/ipc/IdType.h";

namespace mozilla {
namespace dom {
namespace quota {

struct InitParams
{
};

struct InitTemporaryStorageParams
{
};

struct InitOriginParams
{
  PrincipalInfo principalInfo;
  PersistenceType persistenceType;
};

struct AllUsageParams
{
  bool getAll;
};

struct OriginUsageParams
{
  PrincipalInfo principalInfo;
  bool getGroupUsage;
};

union UsageRequestParams
{
  AllUsageParams;
  OriginUsageParams;
};

struct ClearResetOriginParams
{
  PrincipalInfo principalInfo;
  PersistenceType persistenceType;
  bool persistenceTypeIsExplicit;
  Type clientType;
  bool clientTypeIsExplicit;
  bool matchAll;
};

struct ClearOriginParams
{
  ClearResetOriginParams commonParams;
};

struct ResetOriginParams
{
  ClearResetOriginParams commonParams;
};

struct ClearDataParams
{
  OriginAttributesPattern pattern;
};

struct ClearAllParams
{
};

struct ResetAllParams
{
};

struct PersistedParams
{
  PrincipalInfo principalInfo;
};

struct PersistParams
{
  PrincipalInfo principalInfo;
};

struct ListInitializedOriginsParams
{
};

union RequestParams
{
  InitParams;
  InitTemporaryStorageParams;
  InitOriginParams;
  ClearOriginParams;
  ResetOriginParams;
  ClearDataParams;
  ClearAllParams;
  ResetAllParams;
  PersistedParams;
  PersistParams;
  ListInitializedOriginsParams;
};

protocol PQuota
{
  manager PBackground;

  manages PQuotaRequest;
  manages PQuotaUsageRequest;

parent:
  async __delete__();

  async PQuotaUsageRequest(UsageRequestParams params);

  async PQuotaRequest(RequestParams params);

  async StartIdleMaintenance();

  async StopIdleMaintenance();

  async AbortOperationsForProcess(ContentParentId contentParentId);
};

} // namespace quota
} // namespace dom
} // namespace mozilla