dom/simpledb/PBackgroundSDBConnection.ipdl
author Jan Varga <jan.varga@gmail.com>
Wed, 15 May 2019 06:11:11 +0200
changeset 2008607 2f6ae2152532743a874910d9dc3eccb49aced9ca
parent 1673216 b23989158dafee59a3d7c07ae7109a1e6be93670
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 PBackgroundSDBRequest;

namespace mozilla {
namespace dom {

struct SDBRequestOpenParams
{
  nsString name;
};

struct SDBRequestSeekParams
{
  uint64_t offset;
};

struct SDBRequestReadParams
{
  uint64_t size;
};

struct SDBRequestWriteParams
{
  nsCString data;
};

struct SDBRequestCloseParams
{
};

union SDBRequestParams
{
  SDBRequestOpenParams;
  SDBRequestSeekParams;
  SDBRequestReadParams;
  SDBRequestWriteParams;
  SDBRequestCloseParams;
};

protocol PBackgroundSDBConnection
{
  manager PBackground;

  manages PBackgroundSDBRequest;

parent:
  async DeleteMe();

  async PBackgroundSDBRequest(SDBRequestParams params);

child:
  async __delete__();

  async AllowToClose();

  async Closed();
};

} // namespace dom
} // namespace mozilla