PStorage.ipdl 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /* -*- Mode: C++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 8 -*- */
  2. /* This Source Code Form is subject to the terms of the Mozilla Public
  3. * License, v. 2.0. If a copy of the MPL was not distributed with this
  4. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  5. include protocol PContent;
  6. namespace mozilla {
  7. namespace dom {
  8. /* This protocol bridges async access to the database thread running on the parent process
  9. * and caches running on the child process.
  10. */
  11. nested(upto inside_cpow) sync protocol PStorage
  12. {
  13. manager PContent;
  14. parent:
  15. async __delete__();
  16. nested(inside_cpow) sync Preload(nsCString originSuffix, nsCString originNoSuffix, uint32_t alreadyLoadedCount)
  17. returns (nsString[] keys, nsString[] values, nsresult rv);
  18. async AsyncPreload(nsCString originSuffix, nsCString originNoSuffix, bool priority);
  19. async AsyncGetUsage(nsCString scope);
  20. async AsyncAddItem(nsCString originSuffix, nsCString originNoSuffix, nsString key, nsString value);
  21. async AsyncUpdateItem(nsCString originSuffix, nsCString originNoSuffix, nsString key, nsString value);
  22. async AsyncRemoveItem(nsCString originSuffix, nsCString originNoSuffix, nsString key);
  23. async AsyncClear(nsCString originSuffix, nsCString originNoSuffix);
  24. async AsyncFlush();
  25. child:
  26. async Observe(nsCString topic,
  27. nsString originAttributesPattern,
  28. nsCString originScope);
  29. async OriginsHavingData(nsCString[] origins);
  30. async LoadItem(nsCString originSuffix, nsCString originNoSuffix, nsString key, nsString value);
  31. async LoadDone(nsCString originSuffix, nsCString originNoSuffix, nsresult rv);
  32. async LoadUsage(nsCString scope, int64_t usage);
  33. async Error(nsresult rv);
  34. };
  35. }
  36. }